/titanic_51/usr/src/lib/libtecla/common/ |
H A D | homedir.c | 53 #include <pwd.h> 90 struct passwd pwd; /* The password entry of a user */ member 255 struct passwd *ret; /* The returned pointer to pwd */ in _hd_lookup_home_dir() 261 status = getpwuid_r(geteuid(), &home->pwd, home->buffer, home->buflen, in _hd_lookup_home_dir() 264 status = getpwnam_r(user, &home->pwd, home->buffer, home->buflen, &ret); in _hd_lookup_home_dir() 273 home_dir = home->pwd.pw_dir; in _hd_lookup_home_dir() 280 struct passwd *pwd = login_user ? getpwuid(geteuid()) : getpwnam(user); in _hd_lookup_home_dir() local 281 if(!pwd) { in _hd_lookup_home_dir() 289 home_dir = pwd->pw_dir; in _hd_lookup_home_dir() 363 struct passwd *pwd; /* local 390 struct passwd *pwd; /* The pointer to the latest password entry */ global() local 420 const char *pwd = hd_getpwd(home); global() local 459 const char *pwd = getenv("PWD"); global() local [all...] |
/titanic_51/usr/src/lib/passwdutil/ |
H A D | nis_attr.c | 31 #include <pwd.h> 77 struct passwd *pwd; member 106 nis_to_pwd(char *nis, struct passwd *pwd) in nis_to_pwd() argument 108 pwd->pw_name = strsep(&nis, ":"); in nis_to_pwd() 109 pwd->pw_passwd = strsep(&nis, ":"); in nis_to_pwd() 110 pwd->pw_uid = atoi(strsep(&nis, ":")); in nis_to_pwd() 111 pwd->pw_gid = atoi(strsep(&nis, ":")); in nis_to_pwd() 112 pwd->pw_gecos = strsep(&nis, ":"); in nis_to_pwd() 113 pwd->pw_dir = strsep(&nis, ":"); in nis_to_pwd() 114 pwd in nis_to_pwd() [all...] |
H A D | nss_attr.c | 29 #include <pwd.h> 66 struct passwd *pwd; member 113 if (pwbuf->pwd == NULL) in nss_getpwnam() 114 pwbuf->pwd = (struct passwd *) in nss_getpwnam() 116 if (pwbuf->pwd == NULL) { in nss_getpwnam() 140 if (pwbuf->pwd) in nss_getpwnam() 141 free(pwbuf->pwd); in nss_getpwnam() 158 if (pwbuf->pwd) { in nss_getpwnam() 163 if (getpwnam_r(name, pwbuf->pwd, pwbuf->pwd_scratch, in nss_getpwnam() 184 struct passwd pwd; in nss_getpwnam() local [all...] |
/titanic_51/usr/src/lib/libpkg/common/ |
H A D | ncgrpw.c | 35 #include <pwd.h> 184 struct passwd *pwd; in cpwnam() local 205 if ((pwd = clpwnam(nam)) != NULL || in cpwnam() 206 (pwd = getpwnam(nam)) != NULL) { in cpwnam() 208 if (dup_pw_ent(pwd)) in cpwnam() 213 pwd = (struct passwd *)NULL; in cpwnam() 236 (void) memmove(itemp->data, pwd, in cpwnam() 246 return (pwd); in cpwnam() 340 struct passwd *pwd; in cpwuid() local 362 if ((pwd in cpwuid() 498 dup_pw_ent(struct passwd * pwd) dup_pw_ent() argument [all...] |
/titanic_51/usr/src/lib/libnisdb/yptol/ |
H A D | shim_changepasswd.c | 58 #include <pwd.h> 382 proc_maps(char *domain, struct passwd_entry *pwd) in proc_maps() argument 391 ans = proc_map_list(map_list, domain, pwd, FALSE); in proc_maps() 411 ans = proc_map_list(map_list, domain, pwd, TRUE); in proc_maps() 433 struct passwd_entry *pwd, bool_t adjunct_flag) in proc_map_list() argument 442 if ((adjunct_flag) && (!pwd->adjunct)) { in proc_map_list() 473 if (0 != (ans = update_single_map(map_name, pwd, adjunct_flag))) in proc_map_list() 534 update_single_map(char *map_name, struct passwd_entry *pwd, bool_t adjunct_flag) in update_single_map() argument 542 data.dptr = pwd->adjunct_str; in update_single_map() 544 data.dptr = pwd in update_single_map() 802 decode_pwd_entry(datum * data,struct passwd_entry * pwd,bool_t adjunct) decode_pwd_entry() argument 937 free_pwd_entry(struct passwd_entry * pwd) free_pwd_entry() argument 980 create_pwd_str(struct passwd_entry * pwd,bool_t adjunct) create_pwd_str() argument 1129 put_new_info(struct passwd_entry * pwd,char * domain) put_new_info() argument [all...] |
/titanic_51/usr/src/cmd/bnu/ |
H A D | getpwinfo.c | 30 #include <pwd.h> 50 register struct passwd *pwd; local 55 pwd = getpwnam(login_name); 56 if (pwd != NULL && pwd->pw_uid == uid) 61 if ((pwd = getpwuid(uid)) == NULL) { 62 if ((pwd = getpwuid(UUCPUID)) == NULL) 68 (void) strcpy(name, pwd->pw_name); 86 register struct passwd *pwd; local 88 if ((pwd [all...] |
/titanic_51/usr/src/cmd/idmap/idmapd/ |
H A D | directory_provider_nsswitch.c | 31 #include <pwd.h> 50 directory_entry_rpc *pent, struct passwd *pwd, struct group *grp, 82 struct passwd *pwd = NULL; in directory_provider_nsswitch_get() local 130 pwd = getpwuid(rid - LOCALRID_UID_MIN); in directory_provider_nsswitch_get() 131 if (pwd == NULL) { in directory_provider_nsswitch_get() 180 * pwd or grp. in directory_provider_nsswitch_get() 190 pwd = getpwnam(name); in directory_provider_nsswitch_get() 191 if (pwd == NULL && errno != 0) { in directory_provider_nsswitch_get() 227 if (pwd == NULL && grp == NULL) in directory_provider_nsswitch_get() 230 de = directory_provider_nsswitch_populate(&del[i], pwd, gr in directory_provider_nsswitch_get() 250 directory_provider_nsswitch_populate(directory_entry_rpc * pent,struct passwd * pwd,struct group * grp,idmap_utf8str_list * attrs) directory_provider_nsswitch_populate() argument [all...] |
/titanic_51/usr/src/lib/libcmdutils/common/ |
H A D | uid.c | 38 #include <pwd.h> 52 struct passwd *pwd; in findnextuid() local 56 for (pwd = getpwent(); pwd != NULL; pwd = getpwent()) { in findnextuid() 57 if (isreserveduid(pwd->pw_uid)) /* Skip reserved IDs */ in findnextuid() 59 if (pwd->pw_uid >= uid) { in findnextuid() 60 if (pwd->pw_uid == stop) { /* Overflow check */ in findnextuid() 64 uid = pwd->pw_uid + 1; in findnextuid() 67 if (pwd in findnextuid() [all...] |
/titanic_51/usr/src/lib/pam_modules/authtok_get/ |
H A D | authtok_get.c | 59 char *pwd; in read_authtok() local 98 res = pam_get_item(pamh, PAM_AUTHTOK, (void **)&pwd); in read_authtok() 101 if (pwd != NULL) { in read_authtok() 113 dgettext(TEXT_DOMAIN, "New Password: "), &pwd); in read_authtok() 118 if (pwd == NULL) { in read_authtok() 127 (void) memset(pwd, 0, strlen(pwd)); in read_authtok() 128 free(pwd); in read_authtok() 151 char *pwd; in verify_authtok() local 167 "Re-enter new Password: "), &pwd); in verify_authtok() [all...] |
/titanic_51/usr/src/cmd/su/ |
H A D | su.c | 52 #include <pwd.h> 139 static void update_audit(struct passwd *pwd); 143 struct passwd pwd; variable 287 if (getpwuid_r(getuid(), &pwd, pwdbuf, sizeof (pwdbuf)) == NULL || in main() 288 pam_set_item(pamh, PAM_AUSER, pwd.pw_name) != PAM_SUCCESS) in main() 322 if (getpwnam_r(nptr, &pwd, pwdbuf, sizeof (pwdbuf)) == NULL) in main() 349 pwd.pw_name, username, ttyn); in main() 359 pwd.pw_name, username, ttyn); in main() 377 syslog(pwd.pw_uid == 0 ? LOG_NOTICE : LOG_INFO, in main() 379 pwd in main() 786 audit_success(int pw_change,struct passwd * pwd) audit_success() argument 1007 audit_failure(int pw_change,struct passwd * pwd,char * user,int pamerr) audit_failure() argument 1433 update_audit(struct passwd * pwd) update_audit() argument [all...] |
/titanic_51/usr/src/tools/cscope-fast/ |
H A D | mygetwd.c | 47 char *pwd; /* PWD environment variable value */ in mygetwd() local 57 if ((pwd = getenv("PWD")) != NULL && *pwd != '\0' && in mygetwd() 58 stat(pwd, &tmp_sb) == 0 && in mygetwd() 60 (void) strcpy(dir, pwd); in mygetwd() 61 return (pwd); in mygetwd()
|
/titanic_51/usr/src/cmd/login/ |
H A D | login_audit.c | 28 #include <pwd.h> 59 audit_success(uint_t event_id, struct passwd *pwd, char *optional_text) in audit_success() argument 65 assert(pwd != NULL); in audit_success() 71 if (adt_set_user(ah, pwd->pw_uid, pwd->pw_gid, in audit_success() 72 pwd->pw_uid, pwd->pw_gid, NULL, ADT_USER)) { in audit_success() 203 * If the user id is invalid, pwd is NULL. 206 audit_failure(uint_t event_id, int failure_code, struct passwd *pwd, in audit_failure() argument 220 if (pwd ! in audit_failure() [all...] |
H A D | login.c | 82 #include <pwd.h> 263 static struct passwd *pwd = NULL; variable 518 if ((pwd = getpwnam(user_name)) == NULL) { in main() 551 if (pwd->pw_uid == 0) { in main() 576 if (di_devperm_login((const char *)ttyn, pwd->pw_uid, pwd->pw_gid, in main() 595 if (setuid(pwd->pw_uid) == -1) { in main() 610 if (pwd->pw_uid == 0) { in main() 744 if ((pwd = getpwnam(user_name)) != NULL) { in log_bad_attempts() 951 if (((pwd in verify_passwd() [all...] |
/titanic_51/usr/src/cmd/cmd-inet/usr.sbin/ |
H A D | in.rexecd.c | 50 #include <pwd.h> 167 struct passwd *pwd, pw_data; in doit() local 273 pwd = getpwnam_r(user, &pw_data, pwdbuf, sizeof (pwdbuf)); in doit() 274 if (pwd == NULL) { in doit() 339 if (setgid((gid_t)pwd->pw_gid) < 0) { in doit() 346 (void) initgroups(pwd->pw_name, pwd->pw_gid); in doit() 357 if (setuid((uid_t)pwd->pw_uid) < 0) { in doit() 417 if (*pwd->pw_shell == '\0') in doit() 418 pwd in doit() [all...] |
/titanic_51/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | kuserok.c | 41 #include <pwd.h> 87 struct passwd *pwd) in krb5_move_ccache() argument 163 "FILE:/tmp/krb5cc_%d", pwd->pw_uid); in krb5_move_ccache() 188 "/tmp/krb5cc_%d", pwd->pw_uid); in krb5_move_ccache() 189 if (safechown(ccache_name_buf, pwd->pw_uid, in krb5_move_ccache() 190 pwd->pw_gid, -1) == -1) { in krb5_move_ccache() 268 struct passwd *pwd; in krb5_kuserok() local 283 if (k5_getpwnam_r(luser, &pwx, pwbuf, sizeof(pwbuf), &pwd) != 0) in krb5_kuserok() 285 (void) strncpy(pbuf, pwd->pw_dir, sizeof(pbuf) - 1); in krb5_kuserok() 300 if (krb5_move_ccache(context, principal, pwd)) in krb5_kuserok() [all...] |
/titanic_51/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/ |
H A D | ldap_service_stash.c | 238 int dec_password(struct data pwd, struct data *ret) { in dec_password() argument 245 if (pwd.len == 0) { in dec_password() 252 if (pwd.len >= strlen("{HEX}") && in dec_password() 253 strncmp((char *)pwd.value, "{HEX}", strlen("{HEX}")) == 0) { in dec_password() 255 if ((pwd.len - strlen("{HEX}")) % 2 != 0) { in dec_password() 261 ret->value = (unsigned char *)malloc((pwd.len - strlen("{HEX}")) / 2 + 1); in dec_password() 267 ret->len = (pwd.len - strlen("{HEX}")) / 2; in dec_password() 269 for (i = strlen("{HEX}"), j = 0; i < pwd.len; i += 2, j++) { in dec_password() 272 if (isxdigit(pwd.value[i]) == 0 || isxdigit(pwd in dec_password() [all...] |
/titanic_51/usr/src/lib/libbsm/common/ |
H A D | audit_rshd.c | 90 #include <pwd.h> 107 struct passwd *pwd; in generate_record() local 114 pwd = getpwnam(locuser); in generate_record() 115 if (pwd == NULL) { in generate_record() 119 uid = pwd->pw_uid; in generate_record() 120 gid = pwd->pw_gid; in generate_record() 205 struct passwd *pwd; in setup_session() local 207 pwd = getpwnam(locuser); in setup_session() 208 if (pwd == NULL) in setup_session() 211 uid = pwd in setup_session() [all...] |
H A D | audit_rexecd.c | 37 #include <pwd.h> 142 struct passwd *pwd; local 166 pwd = getpwnam(user); 167 if (pwd == NULL) { 171 uid = pwd->pw_uid; 172 gid = pwd->pw_gid; 253 struct passwd *pwd; local 277 pwd = getpwnam(user); 278 if (pwd == NULL) { 282 uid = pwd [all...] |
/titanic_51/usr/src/lib/pam_modules/unix_cred/ |
H A D | unix_cred.c | 26 #include <pwd.h> 193 struct passwd pwd; in pam_sm_setcred() local 270 if (getpwnam_r(user, &pwd, pwbuf, sizeof (pwbuf)) == NULL) { in pam_sm_setcred() 340 if (adt_set_user(ah, pwd.pw_uid, pwd.pw_gid, in pam_sm_setcred() 341 pwd.pw_uid, pwd.pw_gid, NULL, in pam_sm_setcred() 352 apwd.pw_uid, pwd.pw_uid); in pam_sm_setcred() 360 if (adt_set_user(ah, pwd.pw_uid, pwd in pam_sm_setcred() [all...] |
/titanic_51/usr/src/cmd/cmd-inet/lib/nwamd/ |
H A D | door_if.c | 36 #include <pwd.h> 129 struct passwd *pwd) in nwamd_door_req_event_register() argument 147 struct passwd *pwd) in nwamd_door_req_event_unregister() argument 157 struct passwd *pwd) in nwamd_door_req_wlan_scan() argument 169 struct passwd *pwd) in nwamd_door_req_wlan_scan_results() argument 211 struct passwd *pwd) in nwamd_door_req_wlan_select() argument 230 struct passwd *pwd) in nwamd_door_req_wlan_set_key() argument 248 nwamd_door_req_action(nwamd_door_arg_t *req, ucred_t *ucr, struct passwd *pwd) in nwamd_door_req_action() argument 273 if (chkauthattr(AUTOCONF_SELECT_AUTH, pwd->pw_name) == 0) { in nwamd_door_req_action() 284 if (chkauthattr(AUTOCONF_WLAN_AUTH, pwd in nwamd_door_req_action() 451 nwamd_door_req_state(nwamd_door_arg_t * req,ucred_t * ucr,struct passwd * pwd) nwamd_door_req_state() argument 520 nwamd_door_req_priority_group(nwamd_door_arg_t * req,ucred_t * ucr,struct passwd * pwd) nwamd_door_req_priority_group() argument 541 struct passwd *pwd = NULL; nwamd_door_switch() local [all...] |
/titanic_51/usr/src/cmd/tsol/updatehome/ |
H A D | updatehome.c | 76 #include <pwd.h> 101 struct passwd *pwd; /* current user's password file entry */ in main() local 153 if ((pwd = getpwuid(uid)) == (struct passwd *)0) { in main() 163 if (((userp = getusernam(pwd->pw_name)) == NULL) || in main() 178 " user %s.\n"), pwd->pw_name); in main() 183 if (__setupfiles(pwd, min_sl, flags) != 0) { in main()
|
/titanic_51/usr/src/cmd/cmd-inet/usr.bin/ |
H A D | finger.c | 84 #include <pwd.h> 124 struct passwd *pwd; /* structure of /etc/passwd stuff */ member 296 p->pwd = NULL; in doall() 299 p->pwd = pwdcopy(pw); in doall() 301 p->name = p->pwd->pw_name; in doall() 344 p->pwd = NULL; in donames() 359 p->pwd = pwdcopy(pw); in donames() 371 if (p->pwd == NULL) { in donames() 372 p->pwd = pwdcopy(pw); in donames() 381 new->pwd in donames() [all...] |
/titanic_51/usr/src/lib/pam_modules/unix_session/ |
H A D | unix_session.c | 40 #include <pwd.h> 94 struct passwd pwd; in pam_sm_open_session() local 130 if (getpwnam_r(user, &pwd, buffer, sizeof (buffer)) == NULL) { in pam_sm_open_session() 139 offset = (offset_t)pwd.pw_uid * in pam_sm_open_session() 145 "too large", pwd.pw_uid); in pam_sm_open_session() 186 "lastlog: uid %d: %m", pwd.pw_uid); in pam_sm_open_session() 189 "lastlog: uid %d: %m", pwd.pw_uid); in pam_sm_open_session()
|
/titanic_51/usr/src/cmd/mailx/ |
H A D | temp.c | 44 #include <pwd.h> 63 struct passwd *pwd; in tinit() local 73 pwd = getpwuid(uid = myruid); in tinit() 74 if (!pwd) { in tinit() 79 copy(pwd->pw_name, myname); in tinit()
|
/titanic_51/usr/src/cmd/pfexecd/ |
H A D | pfexecd.c | 39 #include <pwd.h> 204 struct passwd *pwd, pwdm; in get_uid() local 207 if (getpwnam_r(v, &pwdm, buf, sizeof (buf), &pwd) == 0 && pwd != NULL) in get_uid() 208 return (pwd->pw_uid); in get_uid() 279 struct passwd *pwd, pwdm; in get_granted_privs() local 282 if (getpwuid_r(uid, &pwdm, buf, sizeof (buf), &pwd) != 0 || pwd == NULL) in get_granted_privs() 291 (void) _enum_profs(pwd->pw_name, ggp_callback, NULL, res); in get_granted_privs() 355 struct passwd pw, *pwd; in callback_pfexec() local [all...] |