Home
last modified time | relevance | path

Searched refs:pw_name (Results 1 – 25 of 118) sorted by relevance

12345

/external/toybox/toys/pending/
Duseradd.c64 pwd.pw_name = s;
97 if (getgrnam(pwd.pw_name)) error_exit("group '%s' in use", pwd.pw_name);
119 entry = xmprintf("%s:%s:%ld:%ld:%s:%s:%s", pwd.pw_name, pwd.pw_passwd,
122 if (update_password("/etc/passwd", pwd.pw_name, entry)) error_exit("updating passwd file failed");
126 entry = xmprintf("%s:!!:%u::::::", pwd.pw_name,
128 else entry = xmprintf("%s:!!:%u:0:99999:7:::", pwd.pw_name,
130 update_password("/etc/shadow", pwd.pw_name, entry);
151 if (xrun((char *[]){"passwd", pwd.pw_name, 0})) error_exit("passwd");
Dipcs.c212 printf("%-10d %-10.10s", shmid, pw->pw_name); in shm_array()
222 printf("%-10d %-10.10s", shmid, pw->pw_name); in shm_array()
227 if ((pw = getpwuid(buf.shm_perm.cuid))) printf(" %-10s", pw->pw_name); in shm_array()
231 if ((pw = getpwuid(buf.shm_perm.uid))) printf(" %-10s", pw->pw_name); in shm_array()
238 printf("%-10d %-10.10s", shmid, pw->pw_name); in shm_array()
310 if (pw) printf("%-8d %-10.10s", semid, pw->pw_name); in sem_array()
319 if ((pw = getpwuid(buf.sem_perm.cuid))) printf(" %-10s", pw->pw_name); in sem_array()
323 if ((pw = getpwuid(buf.sem_perm.uid))) printf(" %-10s", pw->pw_name); in sem_array()
329 if (pw) printf("%-10d %-10.9s", semid, pw->pw_name); in sem_array()
390 if (pw) printf("%-8d %-10.10s", msqid, pw->pw_name); in msg_array()
[all …]
Dcrontab.c278 snprintf(toybuf, sizeof(toybuf), "%s%s", TT.cdir, pwd->pw_name); in do_edit()
286 } else printf("No crontab for '%s'- using an empty one\n", pwd->pw_name); in do_edit()
297 if (setenv("USER", pwd->pw_name, 1)) _exit(1); in do_edit()
298 if (setenv("LOGNAME", pwd->pw_name, 1)) _exit(1); in do_edit()
332 update_crontab(tname, pwd->pw_name); in do_edit()
354 do_replace(pwd->pw_name); in crontab_main()
357 else if (toys.optflags & FLAG_l) do_list(pwd->pw_name); in crontab_main()
358 else if (toys.optflags & FLAG_r) do_remove(pwd->pw_name); in crontab_main()
361 do_replace(pwd->pw_name); in crontab_main()
Dchsh.c40 if (geteuid() && strcmp(passwd_info->pw_name, user))
44 user = passwd_info->pw_name;
49 if (!(shadow_info = getspnam(passwd_info->pw_name))) perror_exit("getspnam");
Duserdel.c95 update_password("/etc/passwd", pwd->pw_name, NULL); in userdel_main()
96 update_password("/etc/shadow", pwd->pw_name, NULL); in userdel_main()
110 sprintf(toybuf, "/var/spool/mail/%s",pwd->pw_name); in userdel_main()
/external/toybox/toys/posix/
Did.c99 if ((pw = getpwuid(uid))) username = pw->pw_name; in do_id()
104 if (TT.is_groups) printf("%s : ", pw->pw_name); in do_id()
108 if (FLAG(u)) showone("", pw->pw_name, pw->pw_uid, 1); in do_id()
130 showid("uid=", pw->pw_uid, pw->pw_name); in do_id()
136 showid(" euid=", pw->pw_uid, pw->pw_name); in do_id()
/external/python/cpython2/Lib/test/
Dtest_pwd.py14 self.assertEqual(e[0], e.pw_name)
15 self.assertIsInstance(e.pw_name, basestring)
44 entriesbyname.setdefault(e.pw_name, []).append(e)
52 self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
/external/python/cpython3/Lib/test/
Dtest_pwd.py15 self.assertEqual(e[0], e.pw_name)
16 self.assertIsInstance(e.pw_name, str)
45 entriesbyname.setdefault(e.pw_name, []).append(e)
53 self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
/external/selinux/policycoreutils/newrole/
Dnewrole.c446 if (!(pw && pw->pw_name && pw->pw_name[0] && pw->pw_shell in extract_pw_data()
455 pw->pw_name = strdup(pw->pw_name); in extract_pw_data()
459 if (!(pw->pw_name && pw->pw_dir && pw->pw_shell)) { in extract_pw_data()
471 free(pw->pw_name); in extract_pw_data()
474 pw->pw_name = NULL; in extract_pw_data()
538 rc |= setenv("USER", pw->pw_name, 1); in restore_environment()
539 rc |= setenv("LOGNAME", pw->pw_name, 1); in restore_environment()
1160 pam_status = pam_start(service_name, pw.pw_name, &pam_conversation, in main()
1169 if (!authenticate_via_shadow_passwd(pw.pw_name)) in main()
1173 pw.pw_name); in main()
[all …]
/external/selinux/policycoreutils/run_init/
Drun_init.c122 p_passwd_line->pw_name, in authenticate_via_pam()
196 p_shadow_line = getspnam(p_passwd_line->pw_name); in authenticate_via_shadow_passwd()
266 printf("Authenticating %s.\n", p_passwd_line->pw_name);
280 p_passwd_line->pw_name);
/external/musl/src/passwd/
Dgetpw_a.c37 if (name && !strcmp(name, (*res)->pw_name) in __getpw_a()
107 pw->pw_name = *buf; in __getpw_a()
108 pw->pw_passwd = pw->pw_name + passwdbuf[PWNAMELEN]; in __getpw_a()
125 if (name && strcmp(name, pw->pw_name) in __getpw_a()
/external/rust/crates/nix/patches/
Dunistd.diff9 - name: CStr::from_ptr(pw.pw_name).to_string_lossy().into_owned(),
11 + name: if pw.pw_name.is_null() { Default::default() } else { CStr::from_ptr(pw.pw_n…
/external/musl/src/legacy/
Dcuserid.c16 size_t len = strnlen(pw.pw_name, L_cuserid); in cuserid()
20 memcpy(buf, pw.pw_name, len+1); in cuserid()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/
D3-1.c37 if (strcmp(pw->pw_name, "root")) in set_nonroot()
56 pw->pw_name, (int)getuid(), (int)geteuid()); in set_nonroot()
D12-1.c34 if (strcmp(pw->pw_name, "root")) in set_nonroot()
53 pw->pw_name, (int)geteuid(), (int)getuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/
D7-1.c30 if (strcmp(pw->pw_name, "root")) in set_nonroot()
49 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/
D26-1.c30 if (strcmp(pw->pw_name, "root")) in set_nonroot()
49 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/
D20-1.c36 if (strcmp(pw->pw_name, "root")) in set_nonroot()
55 pw->pw_name, (int)geteuid(), (int)getuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/
D15-1.c36 if (strcmp(pw->pw_name, "root")) in set_nonroot()
60 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
D32-1.c37 if (strcmp(pw->pw_name, "root")) in set_nonroot()
56 pw->pw_name, (int)geteuid()); in set_nonroot()
D34-1.c37 if (strcmp(pw->pw_name, "root")) in set_nonroot()
56 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/
D15-1.c36 if (strcmp(pw->pw_name, "root")) in set_nonroot()
60 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlock/
D12-1.c39 if (strcmp(pw->pw_name, "root")) in set_nonroot()
70 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_open/
D3-1.c37 if (strcmp(pw->pw_name, "root")) in set_nonroot()
56 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/
D9-1.c49 if (strcmp(pw->pw_name, "root") && pw->pw_uid != getuid()) in main()
67 printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid); in main()

12345