Home
last modified time | relevance | path

Searched refs:pw_name (Results 1 – 25 of 112) 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.c275 snprintf(toybuf, sizeof(toybuf), "%s%s", TT.cdir, pwd->pw_name); in do_edit()
283 } else printf("No crontab for '%s'- using an empty one\n", pwd->pw_name); in do_edit()
294 if (setenv("USER", pwd->pw_name, 1)) _exit(1); in do_edit()
295 if (setenv("LOGNAME", pwd->pw_name, 1)) _exit(1); in do_edit()
329 update_crontab(tname, pwd->pw_name); in do_edit()
351 do_replace(pwd->pw_name); in crontab_main()
354 else if (toys.optflags & FLAG_l) do_list(pwd->pw_name); in crontab_main()
355 else if (toys.optflags & FLAG_r) do_remove(pwd->pw_name); in crontab_main()
358 do_replace(pwd->pw_name); in crontab_main()
Duserdel.c97 update_password("/etc/passwd", pwd->pw_name, NULL); in userdel_main()
98 update_password("/etc/shadow", pwd->pw_name, NULL); in userdel_main()
112 sprintf(toybuf, "/var/spool/mail/%s",pwd->pw_name); in userdel_main()
/external/openssh/
Dauth-rhosts.c239 client_user, pw->pw_name)) { in auth_rhosts2()
245 client_user, pw->pw_name)) { in auth_rhosts2()
258 "no home directory %.200s", pw->pw_name, pw->pw_dir); in auth_rhosts2()
260 "no home directory %.200s", pw->pw_name, pw->pw_dir); in auth_rhosts2()
267 "bad ownership or modes for home directory.", pw->pw_name); in auth_rhosts2()
269 "bad ownership or modes for home directory.", pw->pw_name); in auth_rhosts2()
294 pw->pw_name, buf); in auth_rhosts2()
309 client_user, pw->pw_name)) { in auth_rhosts2()
316 client_user, pw->pw_name); in auth_rhosts2()
Dauth.c112 if (!pw || !pw->pw_name) in allowed_user()
117 spw = getspnam(pw->pw_name); in allowed_user()
157 pw->pw_name); in allowed_user()
173 "does not exist", pw->pw_name, shell); in allowed_user()
180 "is not executable", pw->pw_name, shell); in allowed_user()
196 r = match_user(pw->pw_name, hostname, ipaddr, in allowed_user()
204 pw->pw_name, hostname); in allowed_user()
212 r = match_user(pw->pw_name, hostname, ipaddr, in allowed_user()
223 "not listed in AllowUsers", pw->pw_name, hostname); in allowed_user()
229 if (ga_init(pw->pw_name, pw->pw_gid) == 0) { in allowed_user()
[all …]
Dplatform.c182 if (setpcred(pw->pw_name, creds) == -1) in platform_setusercontext_post_groups()
187 ssh_selinux_setup_exec_context(pw->pw_name); in platform_setusercontext_post_groups()
192 platform_krb5_get_principal_name(const char *pw_name) in platform_krb5_get_principal_name() argument
195 return aix_krb5_get_principal_name(pw_name); in platform_krb5_get_principal_name()
Dauth-sia.c90 if (sia_ses_init(&ent, saved_argc, saved_argv, host, pw->pw_name, in session_setup_sia()
102 pw->pw_name, host); in session_setup_sia()
106 pw->pw_name, host); in session_setup_sia()
Duidswap.c109 if (initgroups(pw->pw_name, pw->pw_gid) < 0) in temporarily_use_uid()
110 fatal("initgroups: %s: %.100s", pw->pw_name, in temporarily_use_uid()
262 if (initgroups(pw->pw_name, pw->pw_gid) < 0) in permanently_set_uid()
264 pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); in permanently_set_uid()
/external/openssh/openbsd-compat/
Dport-aix.c80 len = sizeof("LOGNAME= NAME= ") + (2 * strlen(pw->pw_name)); in aix_usrinfo()
83 i = snprintf(cp, len, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0', in aix_usrinfo()
84 pw->pw_name, '\0'); in aix_usrinfo()
176 char *authmsg = NULL, *msg = NULL, *name = ctxt->pw->pw_name; in sys_auth_passwd()
251 result = loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg); in sys_auth_allowed_user()
269 logit("Login restricted for %s: %.100s", pw->pw_name, msg); in sys_auth_allowed_user()
381 aix_krb5_get_principal_name(char *pw_name) in aix_krb5_get_principal_name() argument
386 if (getuserattr(pw_name, S_AUTHDOMAIN, &authdomain, SEC_CHAR) != 0) in aix_krb5_get_principal_name()
388 if (getuserattr(pw_name, S_AUTHNAME, &authname, SEC_CHAR) != 0) in aix_krb5_get_principal_name()
392 xasprintf(&principal, "%s@%s", authname ? authname : pw_name, authdomain); in aix_krb5_get_principal_name()
Dport-irix.c59 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); in irix_setusercontext()
72 if ((projid = getdfltprojuser(pw->pw_name)) == -1) { in irix_setusercontext()
78 (int)projid, pw->pw_name, strerror(errno)); in irix_setusercontext()
Dport-uw.c75 if (!nischeck(pw->pw_name)) { in sys_auth_passwd()
113 if (strcmp (ent->pw_name, namep) == 0) { in nischeck()
138 if (!ia_openinfo(pw->pw_name,&uinfo)) { in get_iaf_password()
Dxcrypt.c140 struct spwd *spw = getspnam(pw->pw_name); in shadow_pw()
152 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL) in shadow_pw()
155 struct pr_passwd *spw = getprpwnam(pw->pw_name); in shadow_pw()
/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/toybox/toys/posix/
Did.c100 if (TT.is_groups) printf("%s : ", pw->pw_name); in do_id()
105 if (toys.optflags&FLAG_u) s_or_u(pw->pw_name, pw->pw_uid, 1); in do_id()
111 showid("uid=", pw->pw_uid, pw->pw_name); in do_id()
117 showid(" euid=", pw->pw_uid, pw->pw_name); in do_id()
/external/selinux/policycoreutils/run_init/
Drun_init.c124 p_passwd_line->pw_name, in authenticate_via_pam()
192 p_shadow_line = getspnam(p_passwd_line->pw_name); in authenticate_via_shadow_passwd()
262 printf("Authenticating %s.\n", p_passwd_line->pw_name);
276 p_passwd_line->pw_name);
/external/toybox/toys/other/
Dlogin.c110 syslog(LOG_WARNING, "invalid password for '%s' on %s %s%s", pwd->pw_name, in login_main()
148 setenv("USER", pwd->pw_name, 1); in login_main()
149 setenv("LOGNAME", pwd->pw_name, 1); in login_main()
159 syslog(LOG_INFO, "%s logged in on %s %s %s", pwd->pw_name, in login_main()
/external/selinux/policycoreutils/newrole/
Dnewrole.c431 if (!(pw && pw->pw_name && pw->pw_name[0] && pw->pw_shell in extract_pw_data()
440 pw->pw_name = strdup(pw->pw_name); in extract_pw_data()
444 if (!(pw->pw_name && pw->pw_dir && pw->pw_shell)) { in extract_pw_data()
456 free(pw->pw_name); in extract_pw_data()
459 pw->pw_name = NULL; in extract_pw_data()
523 rc |= setenv("USER", pw->pw_name, 1); in restore_environment()
524 rc |= setenv("LOGNAME", pw->pw_name, 1); in restore_environment()
1146 pam_status = pam_start(service_name, pw.pw_name, &pam_conversation, in main()
1155 if (!authenticate_via_shadow_passwd(pw.pw_name)) in main()
1159 pw.pw_name); in main()
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/
D3-1.c38 if (strcmp(pw->pw_name, "root")) in set_nonroot()
57 pw->pw_name, (int)getuid(), (int)geteuid()); in set_nonroot()
D12-1.c35 if (strcmp(pw->pw_name, "root")) in set_nonroot()
54 pw->pw_name, (int)geteuid(), (int)getuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/
D7-1.c31 if (strcmp(pw->pw_name, "root")) in set_nonroot()
50 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.c37 if (strcmp(pw->pw_name, "root")) in set_nonroot()
56 pw->pw_name, (int)geteuid(), (int)getuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
D32-1.c38 if (strcmp(pw->pw_name, "root")) in set_nonroot()
57 pw->pw_name, (int)geteuid()); in set_nonroot()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/
D15-1.c37 if (strcmp(pw->pw_name, "root")) in set_nonroot()
61 pw->pw_name, (int)geteuid()); in set_nonroot()

12345