Home
last modified time | relevance | path

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

1234

/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.c108 if (!pw || !pw->pw_name) in allowed_user()
113 spw = getspnam(pw->pw_name); in allowed_user()
153 pw->pw_name); in allowed_user()
169 "does not exist", pw->pw_name, shell); in allowed_user()
176 "is not executable", pw->pw_name, shell); in allowed_user()
192 if (match_user(pw->pw_name, hostname, ipaddr, in allowed_user()
196 pw->pw_name, hostname); in allowed_user()
203 if (match_user(pw->pw_name, hostname, ipaddr, in allowed_user()
209 "not listed in AllowUsers", pw->pw_name, hostname); in allowed_user()
215 if (ga_init(pw->pw_name, pw->pw_gid) == 0) { in allowed_user()
[all …]
Dauth-rhosts.c249 client_user, pw->pw_name)) { in auth_rhosts2_raw()
255 client_user, pw->pw_name)) { in auth_rhosts2_raw()
268 "no home directory %.200s", pw->pw_name, pw->pw_dir); in auth_rhosts2_raw()
270 "no home directory %.200s", pw->pw_name, pw->pw_dir); in auth_rhosts2_raw()
277 "bad ownership or modes for home directory.", pw->pw_name); in auth_rhosts2_raw()
279 "bad ownership or modes for home directory.", pw->pw_name); in auth_rhosts2_raw()
304 pw->pw_name, buf); in auth_rhosts2_raw()
319 client_user, pw->pw_name)) { in auth_rhosts2_raw()
326 client_user, pw->pw_name); in auth_rhosts2_raw()
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()
256 if (initgroups(pw->pw_name, pw->pw_gid) < 0) in permanently_set_uid()
258 pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); in permanently_set_uid()
Dauth-skey.c81 skey_haskey(authctxt->pw->pw_name) == 0 && in skey_respond()
82 skey_passcheck(authctxt->pw->pw_name, responses[0]) != -1) in skey_respond()
Dsession.c256 setproctitle("%s", authctxt->pw->pw_name); in do_authenticated()
767 record_utmp_only(pid, s->tty, s->pw->pw_name, in do_pre_login()
821 s->pw->pw_name, in do_exec()
878 record_login(pid, s->tty, pw->pw_name, pw->pw_uid, in do_login()
1180 child_set_env(&env, &envsize, "USER", pw->pw_name); in do_setup_env()
1181 child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); in do_setup_env()
1183 child_set_env(&env, &envsize, "LOGIN", pw->pw_name); in do_setup_env()
1213 _PATH_MAILDIR, pw->pw_name); in do_setup_env()
1426 logit("User %.100s not allowed because %s exists", pw->pw_name, nl); in do_nologin()
1509 if (setlogin(pw->pw_name) < 0) in do_setusercontext()
[all …]
Dauth2-pubkey.c404 tag, command, pw->pw_name); in subprocess()
452 child_set_env(&child_env, &envsize, "USER", pw->pw_name); in subprocess()
453 child_set_env(&child_env, &envsize, "LOGNAME", pw->pw_name); in subprocess()
653 "u", user_pw->pw_name, (char *)NULL); in match_principals_command()
674 "u", user_pw->pw_name, in match_principals_command()
792 authorized_principals == NULL ? pw->pw_name : NULL, in check_authkeys_file()
873 use_authorized_principals ? NULL : pw->pw_name, &reason) != 0) in user_cert_trusted_ca()
943 "u", user_pw->pw_name, (char *)NULL); in user_key_command_allowed2()
975 "u", user_pw->pw_name, in user_key_command_allowed2()
996 av[1] = xstrdup(user_pw->pw_name); in user_key_command_allowed2()
Dauth-krb5.c86 platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); in auth_krb5_password()
87 client = platform_client ? platform_client : authctxt->pw->pw_name; in auth_krb5_password()
162 authctxt->pw->pw_name)) { in auth_krb5_password()
/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.c100 struct spwd *spw = getspnam(pw->pw_name); in shadow_pw()
112 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL) in shadow_pw()
115 struct pr_passwd *spw = getprpwnam(pw->pw_name); in shadow_pw()
Dport-solaris.c217 if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf, in solaris_set_default_project()
220 if (setproject(defaultproject->pj_name, pw->pw_name, in solaris_set_default_project()
226 debug("getdefaultproj(%s): %s", pw->pw_name, strerror(errno)); in solaris_set_default_project()
/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/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/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/selinux/policycoreutils/newrole/
Dnewrole.c435 if (!(pw && pw->pw_name && pw->pw_name[0] && pw->pw_shell in extract_pw_data()
444 pw->pw_name = strdup(pw->pw_name); in extract_pw_data()
448 if (!(pw->pw_name && pw->pw_dir && pw->pw_shell)) { in extract_pw_data()
460 free(pw->pw_name); in extract_pw_data()
524 rc |= setenv("USER", pw->pw_name, 1); in restore_environment()
525 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()
1238 free(pw.pw_name); in main()
[all …]
/external/selinux/libselinux/utils/
Dtogglesebool.c83 if (pwd && pwd->pw_name) in main()
86 argv[i], pwd->pw_name); in main()
/external/toybox/toys/lsb/
Dsu.c85 setenv("USER", up->pw_name, 1); in su_main()
86 setenv("LOGNAME", up->pw_name, 1); in su_main()
/external/iptables/extensions/
Dlibxt_owner.c304 if (pwd != NULL && pwd->pw_name != NULL) { in owner_mt_print_item_v0()
305 printf(" %s", pwd->pw_name); in owner_mt_print_item_v0()
353 if (pwd != NULL && pwd->pw_name != NULL) { in owner_mt6_print_item_v0()
354 printf(" %s", pwd->pw_name); in owner_mt6_print_item_v0()
402 if (pwd != NULL && pwd->pw_name != NULL) { in owner_mt_print_item()
403 printf(" %s", pwd->pw_name); in owner_mt_print_item()

1234