Searched refs:pw (Results 1 - 25 of 143) sorted by relevance

123456

/netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/libbb/
H A Dchange_identity.c35 const char *change_identity_e2str(const struct passwd *pw) argument
37 if (initgroups(pw->pw_name, pw->pw_gid) == -1)
40 xsetgid(pw->pw_gid);
41 xsetuid(pw->pw_uid);
45 void change_identity(const struct passwd *pw) argument
47 const char *err_msg = change_identity_e2str(pw);
H A Dsetup_environment.c33 void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw) argument
44 if (chdir(pw->pw_dir)) {
55 xsetenv("HOME", pw->pw_dir);
57 xsetenv("USER", pw->pw_name);
58 xsetenv("LOGNAME", pw->pw_name);
59 xsetenv("PATH", (pw->pw_uid ? bb_default_path : bb_default_root_path));
64 xsetenv("HOME", pw->pw_dir);
66 if (pw->pw_uid) {
67 xsetenv("USER", pw->pw_name);
68 xsetenv("LOGNAME", pw
[all...]
H A Dcorrect_password.c37 * NULL pw means "just fake it for login with bad username" */
39 int correct_password(const struct passwd *pw) argument
46 if (!pw) {
50 correct = pw->pw_passwd;
57 correct = (getspnam_r(pw->pw_name, &spw, buffer, sizeof(buffer), &result)) ? "aa" : spw.sp_pwdp;
H A Dobscure.c87 static const char *obscure_msg(const char *old_p, const char *new_p, const struct passwd *pw) argument
103 if (string_checker(new_p, pw->pw_name)) {
107 if (*pw->pw_gecos && string_checker(new_p, pw->pw_gecos)) {
160 int obscure(const char *old, const char *newval, const struct passwd *pw) argument
164 msg = obscure_msg(old, newval, pw);
/netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/testsuite/nsswitch/
H A Dgetpwnam.c11 struct passwd *pw; local
22 if ((pw = getpwnam(argv[1])) == NULL) {
28 printf("pw_name = %s\n", pw->pw_name);
29 printf("pw_passwd = %s\n", pw->pw_passwd);
30 printf("pw_uid = %d\n", pw->pw_uid);
31 printf("pw_gid = %d\n", pw->pw_gid);
32 printf("pw_gecos = %s\n", pw->pw_gecos);
33 printf("pw_dir = %s\n", pw->pw_dir);
34 printf("pw_shell = %s\n", pw->pw_shell);
H A Dgetpwuid.c11 struct passwd *pw; local
28 if ((pw = getpwuid(uid)) == NULL) {
34 printf("pw_name = %s\n", pw->pw_name);
35 printf("pw_passwd = %s\n", pw->pw_passwd);
36 printf("pw_uid = %d\n", pw->pw_uid);
37 printf("pw_gid = %d\n", pw->pw_gid);
38 printf("pw_gecos = %s\n", pw->pw_gecos);
39 printf("pw_dir = %s\n", pw->pw_dir);
40 printf("pw_shell = %s\n", pw->pw_shell);
H A Dbigfd.c12 struct passwd *pw; local
22 while((pw = getpwent()) != NULL) {
23 if (strchr(pw->pw_name, '/') != NULL) {
28 if (pw != NULL) {
H A Dgetent_pwent.c29 struct passwd *pw; local
36 pw = getpwent();
41 if (pw != NULL) {
54 pw = getpwent();
57 if (pw == NULL) break;
59 if (strchr(pw->pw_name, '/')) {
H A Dgetpwent_r.c16 struct passwd *pw; local
34 while((pw = getpwent()) != NULL) {
35 fprintf(fptr,"%s:%s:%s:%d:%d\n", pw->pw_name, pw->pw_passwd,
36 pw->pw_gecos, pw->pw_uid, pw->pw_gid);
H A Dinitgroups.c11 struct passwd *pw; local
13 if (!(pw = getpwnam(argv[1]))) {
18 result = initgroups(argv[1], pw->pw_gid);
/netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/misc/
H A Dcvsuser.c28 static struct passwd pw; local
31 pw.pw_name = strcpy (namebuf, name);
32 pw.pw_passwd = "*";
33 pw.pw_uid = 100;
34 pw.pw_gid = 100;
35 pw.pw_gecos = "";
36 pw.pw_dir = "/";
37 pw.pw_shell = "/bin/sh";
39 return &pw;
/netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/testsuite/smbd/
H A Dse_access_check_nullsd.c31 BOOL nullsd_check(struct passwd *pw, int ngroups, gid_t *groups) argument
36 result = se_access_check(NULL, pw->pw_uid, pw->pw_gid,
44 pw->pw_uid, pw->pw_gid);
49 pw->pw_name, pw->pw_uid, pw->pw_gid);
H A Dse_access_check_empty.c36 BOOL emptysd_check(struct passwd *pw, int ngroups, gid_t *groups) argument
44 result = se_access_check(sd, pw->pw_uid, pw->pw_gid,
50 printf("FAIL: no dacl for %s (%d/%d)\n", pw->pw_name,
51 pw->pw_uid, pw->pw_gid);
55 result = se_access_check(sd, pw->pw_uid, pw->pw_gid,
60 printf("FAIL: no dacl2 for %s (%d/%d)\n", pw->pw_name,
61 pw
[all...]
H A Dse_access_check_allowsome.c38 BOOL allowsome_check(struct passwd *pw, int ngroups, gid_t *groups) argument
47 result = se_access_check(sd, pw->pw_uid, pw->pw_gid,
52 len1 = (int)strlen(pw->pw_name) - strlen("user0");
53 len2 = (int)strlen(pw->pw_name) - strlen("user2");
55 if ((strncmp("user0", &pw->pw_name[MAX(len1, 0)],
57 (strncmp("user2", &pw->pw_name[MAX(len2, 0)],
61 pw->pw_name);
65 printf("FAIL: access granted for %s\n", pw->pw_name);
70 pw
[all...]
H A Dse_access_check_denysome.c40 BOOL denysome_check(struct passwd *pw, int ngroups, gid_t *groups) argument
49 result = se_access_check(sd, pw->pw_uid, pw->pw_gid,
54 len1 = (int)strlen(pw->pw_name) - strlen("user1");
55 len2 = (int)strlen(pw->pw_name) - strlen("user3");
57 if ((strncmp("user1", &pw->pw_name[MAX(len1, 0)],
59 (strncmp("user3", &pw->pw_name[MAX(len2, 0)],
63 pw->pw_name);
67 printf("FAIL: access denied for %s\n", pw->pw_name);
72 pw
[all...]
H A Dse_access_check_allowall.c38 BOOL allowall_check(struct passwd *pw, int ngroups, gid_t *groups) argument
43 result = se_access_check(sd, pw->pw_uid, pw->pw_gid,
51 pw->pw_uid, pw->pw_gid);
H A Dse_access_check_denyall.c38 BOOL denyall_check(struct passwd *pw, int ngroups, gid_t *groups) argument
43 result = se_access_check(sd, pw->pw_uid, pw->pw_gid,
50 pw->pw_uid, pw->pw_gid);
H A Dse_access_check_utils.h44 void visit_pwdb(BOOL (*fn)(struct passwd *pw, int ngroups, gid_t *groups));
/netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/source/python/
H A Dpy_winbind_conv.c27 { "pw_name", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_name) },
28 { "pw_passwd", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_passwd) },
29 { "pw_uid", PY_UID, offsetof(struct winbindd_response, data.pw.pw_uid) },
30 { "pw_guid", PY_GID, offsetof(struct winbindd_response, data.pw.pw_gid) },
31 { "pw_gecos", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_gecos) },
32 { "pw_dir", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_dir) },
33 { "pw_shell", PY_STRING, offsetof(struct winbindd_response, data.pw.pw_shell) },
/netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/loginutils/
H A Dsu.c21 struct passwd *pw; local
48 old_user = xstrdup(USE_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
53 pw = getpwnam(opt_username);
54 if (!pw)
57 /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER
60 if (!pw->pw_shell || !pw->pw_shell[0])
61 pw->pw_shell = (char *)DEFAULT_SHELL;
63 if ((cur_uid == 0) || correct_password(pw)) {
[all...]
H A Dadduser.c26 struct passwd pw; local
39 while (!fgetpwent_r(passwd, &pw, buffer, sizeof(buffer), &result)) {
40 if (strcmp(pw.pw_name, p->pw_name) == 0) {
44 if ((pw.pw_uid >= p->pw_uid) && (pw.pw_uid < max)
45 && (pw.pw_uid >= min)) {
46 p->pw_uid = pw.pw_uid + 1;
171 struct passwd pw; local
179 pw.pw_gecos = (char *)"Linux User,,,";
180 pw
[all...]
H A Dpasswd.c15 static char* new_password(const struct passwd *pw, uid_t myuid, int algo) argument
24 if (myuid && pw->pw_passwd[0]) {
28 cipher = pw_encrypt(orig, pw->pw_passwd); /* returns ptr to static */
29 if (strcmp(cipher, pw->pw_passwd) != 0) {
31 pw->pw_name);
43 && obscure(orig, newp, pw) && myuid)
92 struct passwd *pw; local
123 pw = getpwnam(name);
124 if (!pw) bb_error_msg_and_die("unknown user %s", name);
125 if (myuid && pw
[all...]
H A Dlogin.c234 struct passwd *pw; local
335 pw = getpwnam(username);
336 if (pw)
343 pw = getpwnam(username);
344 if (!pw) {
349 if (pw->pw_passwd[0] == '!' || pw->pw_passwd[0] == '*')
355 if (pw->pw_uid == 0 && !check_securetty())
359 if (!pw->pw_passwd[0])
363 if (correct_password(pw))
[all...]
/netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/ncftp-3.2.5/source/libncftp/
H A Du_getusr.c26 struct passwd pw;
29 if (GetMyPwEnt(&pw, pwbuf, sizeof(pwbuf)) == 0) {
30 (void) Strncpy(dst, pw.pw_name, size);
/netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/source/lib/
H A Dgenrand.c94 struct passwd *pw; local
117 pw = getpwnam_alloc(NULL, "root");
118 if (pw && pw->pw_passwd) {
121 mdfour(md4_tmp, (unsigned char *)pw->pw_passwd, strlen(pw->pw_passwd));
124 TALLOC_FREE(pw);

Completed in 140 milliseconds

123456