/illumos-gate/usr/src/cmd/mailx/ |
H A D | temp.c | 61 struct passwd *pwd; in tinit() local 71 pwd = getpwuid(uid = myruid); in tinit() 72 if (!pwd) { in tinit() 77 copy(pwd->pw_name, myname); in tinit()
|
/illumos-gate/usr/src/cmd/tcpd/ |
H A D | safe_finger.c | 60 struct passwd *pwd; local 66 if ((pwd = getpwnam(UNPRIV_NAME)) && pwd->pw_uid > 0) { 67 setgid(pwd->pw_gid); 68 setuid(pwd->pw_uid);
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/ilbd/ |
H A D | ilbd_support.c | 116 ilbd_check_client_config_auth(const struct passwd *pwd) in ilbd_check_client_config_auth() argument 118 if (chkauthattr(NET_ILB_CONFIG_AUTH, pwd->pw_name) == 0) { in ilbd_check_client_config_auth() 120 " configuration operation", pwd->pw_name); in ilbd_check_client_config_auth() 128 ilbd_check_client_enable_auth(const struct passwd *pwd) in ilbd_check_client_enable_auth() argument 130 if (chkauthattr(NET_ILB_ENABLE_AUTH, pwd->pw_name) == 0) { in ilbd_check_client_enable_auth() 132 " enable/disable operation", pwd->pw_name); in ilbd_check_client_enable_auth()
|
/illumos-gate/usr/src/cmd/ptools/pcred/ |
H A D | pcred.c | 292 struct passwd *pwd; in initcred() local 300 pwd = getpwnam(login); in initcred() 302 if (pwd == NULL) { in initcred() 307 uid = pwd->pw_uid; in initcred() 308 gid = pwd->pw_gid; in initcred() 316 pwd = getpwnam(user); in initcred() 317 if (pwd == NULL) { in initcred() 326 uid = pwd->pw_uid; in initcred()
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | subshell.c | 528 if(!shp->pwd) in sh_subshell() 543 sp->shpwd = shp->pwd; in sh_subshell() 547 if(xp->pwdfd>0 && strcmp(xp->pwd,shp->pwd)==0) in sh_subshell() 574 sp->pwd = (shp->pwd?strdup(shp->pwd):0); in sh_subshell() 743 if(!shp->pwd || strcmp(sp->pwd,shp->pwd)) in sh_subshell() 747 if(shp->pwd) in sh_subshell() 752 chdir(sp->pwd); in sh_subshell() 755 chdir(sp->pwd); in sh_subshell() 756 shp->pwd=sp->pwd; in sh_subshell() 764 shp->pwd = sp->pwd; in sh_subshell() [all …]
|
/illumos-gate/usr/src/lib/passwdutil/ |
H A D | files_attr.c | 80 struct passwd *pwd; member 244 if (pwbuf->pwd == NULL) { in files_getpwnam() 285 if (pwbuf->pwd) { in files_getpwnam() 311 if (pwbuf->pwd) free(pwbuf->pwd); in files_getpwnam() 361 if (pwbuf->pwd) free(pwbuf->pwd); in files_user_to_authenticate() 485 pw = pwbuf->pwd; in files_getattr() 605 if (pwbuf->pwd) free(pwbuf->pwd); in files_getattr() 654 pw = pwbuf->pwd; in files_update() 1101 if (pwbuf->pwd) { in files_putpwnam() 1117 if (pwbuf->pwd) { in files_putpwnam() [all …]
|
/illumos-gate/usr/src/cmd/prstat/ |
H A D | prtable.c | 57 struct passwd *pwd; in pwd_getid() local 59 if ((pwd = getpwnam(name)) == NULL) in pwd_getid() 61 return (pwd->pw_uid); in pwd_getid() 68 struct passwd *pwd; in pwd_getname() local 71 if (noresolve || (pwd = getpwuid(uid)) == NULL) { in pwd_getname() 79 n = mbstowcs(NULL, pwd->pw_name, 0); in pwd_getname() 84 width - 1, pwd->pw_name, '*'); in pwd_getname() 86 (void) snprintf(name, length, "%s", pwd->pw_name); in pwd_getname()
|
/illumos-gate/usr/src/cmd/userattr/ |
H A D | userattr.c | 76 struct passwd *pwd; in main() local 103 if ((pwd = getpwuid(uid)) == NULL) { in main() 108 user = pwd->pw_name; in main() 110 if ((pwd = getpwnam(user)) == NULL) { in main()
|
/illumos-gate/usr/src/cmd/cmd-inet/common/ |
H A D | store_forw_creds.c | 49 struct passwd *pwd; in store_forw_creds() local 54 if (!(pwd = getpwnam(lusername))) in store_forw_creds() 58 if (seteuid(pwd->pw_uid)) in store_forw_creds() 62 pwd->pw_uid); in store_forw_creds()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ |
H A D | in.rshd.c | 436 struct passwd *pwd; in doit() local 725 pwd = getpwnam(locuser); in doit() 841 if (pwd && (pwd->pw_uid == 0)) { in doit() 875 if (chdir(pwd->pw_dir) < 0) { in doit() 1056 if (*pwd->pw_shell == '\0') in doit() 1057 pwd->pw_shell = "/bin/sh"; in doit() 1066 if (setgid(pwd->pw_gid) == -1) { in doit() 1093 if (setuid(pwd->pw_uid) == -1) { in doit() 1100 if (chdir(pwd->pw_dir) < 0) { in doit() 1248 cp = pwd->pw_shell; in doit() [all …]
|
/illumos-gate/usr/src/cmd/tip/ |
H A D | log.c | 23 struct passwd *pwd; in logent() local 35 if ((pwd = getpwuid(uid)) == NOPWD) in logent() 38 user = pwd->pw_name; in logent()
|
/illumos-gate/usr/src/cmd/renice/ |
H A D | renice.c | 106 struct passwd *pwd; in main() local 193 if ((pwd = getpwnam(*argv)) != NULL) { in main() 194 who = pwd->pw_uid; in main() 293 struct passwd *pwd = getpwnam(*argv); in parse_obsolete_options() local 295 if (pwd == NULL) { in parse_obsolete_options() 302 who = pwd->pw_uid; in parse_obsolete_options()
|
/illumos-gate/usr/src/lib/libbsm/common/ |
H A D | audit_ftpd.c | 138 struct passwd *pwd; in generate_record() local 146 pwd = getpwnam(locuser); in generate_record() 147 if (pwd == NULL) { in generate_record() 151 uid = pwd->pw_uid; in generate_record() 152 gid = pwd->pw_gid; in generate_record()
|
/illumos-gate/usr/src/cmd/krb5/kadmin/dbutil/ |
H A D | kdb5_create.c | 168 krb5_data pwd, seed; local 264 pwd.data = mkey_password; 265 pwd.length = strlen(mkey_password); 276 &pwd, &master_salt, &mkey); 426 krb5_data pwd; local 437 pwd.data = mkey_password; 438 pwd.length = strlen(mkey_password); 439 kret = krb5_c_random_seed(context, &pwd);
|
/illumos-gate/usr/src/lib/pam_modules/rhosts_auth/ |
H A D | rhosts_auth.c | 53 struct passwd pwd; in pam_sm_authenticate() local 87 if (getpwnam_r(lusername, &pwd, pwd_buffer, sizeof (pwd_buffer)) in pam_sm_authenticate() 91 if (pwd.pw_uid == 0) in pam_sm_authenticate()
|
/illumos-gate/usr/src/lib/pam_modules/roles/ |
H A D | roles.c | 59 struct passwd *pw_entry, pwd; in pam_sm_acct_mgmt() local 101 if ((pw_entry = getpwnam_r(username, &pwd, buf, sizeof (buf))) == NULL) in pam_sm_acct_mgmt() 103 if ((pw_entry = getpwuid_r(pw_entry->pw_uid, &pwd, buf, in pam_sm_acct_mgmt() 147 if ((pw_entry = getpwuid_r(uid, &pwd, buf, in pam_sm_acct_mgmt()
|
/illumos-gate/usr/src/lib/pam_modules/dial_auth/ |
H A D | dial_auth.c | 60 struct passwd pwd; in pam_sm_authenticate() local 96 if (getpwnam_r(user, &pwd, pwd_buffer, sizeof (pwd_buffer)) == NULL) in pam_sm_authenticate() 136 if (pwd.pw_shell != NULL && strcmp(pwd.pw_shell, line) == 0) in pam_sm_authenticate()
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/misc/ |
H A D | fts.c | 481 if (fts->pwd) in popdirs() 486 fts->pwd = fts->pwd->pwd; in popdirs() 994 else if (fts->pwd != f) in fts_read() 996 f->pwd = fts->pwd; in fts_read() 997 fts->pwd = f; in fts_read() 1137 || fts->pwd && fts->pwd->symlink in fts_read() 1145 if (fts->pwd) in fts_read() 1146 fts->pwd = fts->pwd->pwd; in fts_read() 1299 else if (fts->pwd != f) in fts_read() 1301 f->pwd = fts->pwd; in fts_read() [all …]
|
/illumos-gate/usr/src/cmd/acct/ |
H A D | accton.c | 45 struct passwd *pwd; variable 55 if ((pwd = getpwnam("adm")) == NULL) { in main() 58 admuid = pwd->pw_uid; in main()
|
/illumos-gate/usr/src/cmd/ldap/ns_ldap/ |
H A D | standalone.c | 122 char *pwd; in readPwd() local 142 if ((pwd = strdup(passwdBuf)) == NULL) { in readPwd() 148 return (pwd); in readPwd()
|
/illumos-gate/usr/src/cmd/rpcsvc/ |
H A D | rwall.c | 154 struct passwd *pwd; in init_who() local 161 pwd = getpwuid(getuid()); in init_who() 162 if (pwd) in init_who() 163 (void) strncpy(who, pwd->pw_name, sizeof (who)); in init_who()
|
/illumos-gate/usr/src/lib/pam_modules/ldap/ |
H A D | ldap_utils.c | 85 authenticate(ns_cred_t **credpp, char *usrname, char *pwd, in authenticate() argument 103 if ((usrname == NULL) || (pwd == NULL) || (usrname[0] == '\0') || in authenticate() 104 (pwd[0] == '\0')) in authenticate() 112 credp->cred.unix_cred.passwd = strdup(pwd); in authenticate()
|
/illumos-gate/usr/src/lib/libpkg/common/ |
H A D | verify.c | 388 struct passwd *pwd; in averify() local 783 pwd = cpwuid((int)status.st_uid); in averify() 784 if (pwd) in averify() 785 (void) strcpy(ainfo->owner, pwd->pw_name); in averify() 792 } else if ((pwd = cpwnam(ainfo->owner)) == NULL) { in averify() 797 } else if ((uid = pwd->pw_uid) != status.st_uid) { in averify() 800 uid = pwd->pw_uid; in averify() 803 pwd = cpwuid((int)status.st_uid); in averify() 804 if (pwd == NULL) in averify() 809 pwd->pw_name); in averify()
|
/illumos-gate/usr/src/lib/libnwam/common/ |
H A D | libnwam_backend.c | 64 struct passwd *pwd; in nwam_check_auths() local 67 if ((pwd = getpwuid(uid)) == NULL) { in nwam_check_auths() 74 if (chkauthattr(AUTOCONF_SELECT_AUTH, pwd->pw_name) == 0) in nwam_check_auths() 79 if (chkauthattr(AUTOCONF_WLAN_AUTH, pwd->pw_name) == 0) in nwam_check_auths() 88 if (chkauthattr(AUTOCONF_WRITE_AUTH, pwd->pw_name) == 0) { in nwam_check_auths() 93 pwd->pw_name) == 0) in nwam_check_auths()
|
/illumos-gate/usr/src/cmd/mdb/common/modules/genunix/ |
H A D | memory.c | 81 page_walk_data_t *pwd; in page_walk_init() local 108 pwd->pw_hashleft = hashsz; in page_walk_init() 109 pwd->pw_hashloc = ptr; in page_walk_init() 131 pwd->pw_hashleft = -1; in page_walk_init() 132 pwd->pw_first = 0; in page_walk_init() 137 wsp->walk_data = pwd; in page_walk_init() 173 if (pwd->pw_first == 0) in page_walk_step() 174 pwd->pw_first = pp; in page_walk_step() 194 pwd->pw_hashloc); in page_walk_step() 197 pwd->pw_hashleft--; in page_walk_step() [all …]
|