Home
last modified time | relevance | path

Searched refs:pwd (Results 1 – 25 of 189) sorted by relevance

12345678

/titanic_50/usr/src/lib/libtecla/common/
H A Dhomedir.c90 struct passwd pwd; /* The password entry of a user */ member
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; /* A pointer to pwd_buffer */ local
370 &pwd) == 0 && pwd != NULL) {
371 waserr = callback_fn(data, pwd->pw_name, pwd->pw_dir,
[all …]
/titanic_50/usr/src/lib/passwdutil/
H A Dnis_attr.c77 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->pw_shell = nis; in nis_to_pwd()
115 if (pwd->pw_shell[0]) in nis_to_pwd()
[all …]
H A Dnss_attr.c66 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
188 if (private_getpwnam_r(name, &pwd, pwd_scratch, in nss_getpwnam()
[all …]
/titanic_50/usr/src/lib/libpkg/common/
H A Dncgrpw.c184 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 = clpwuid(uid)) != NULL || in cpwuid()
363 (pwd = getpwuid(uid)) != NULL) { in cpwuid()
[all …]
/titanic_50/usr/src/lib/libnisdb/yptol/
H A Dshim_changepasswd.c382 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->pwd_str; in update_single_map()
550 key.dptr = pwd->pw_name; in update_single_map()
[all …]
/titanic_50/usr/src/cmd/bnu/
H A Dgetpwinfo.c50 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 = getpwnam(name)) == NULL) {
94 (void) strcpy(path, pwd->pw_dir);
95 *uid = pwd->pw_uid;
/titanic_50/usr/src/cmd/idmap/idmapd/
H A Ddirectory_provider_nsswitch.c50 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()
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, grp, in directory_provider_nsswitch_get()
250 struct passwd *pwd, in directory_provider_nsswitch_populate() argument
262 if (pwd != NULL && grp != NULL) { in directory_provider_nsswitch_populate()
[all …]
/titanic_50/usr/src/lib/libcmdutils/common/
H A Duid.c52 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 == NULL && errno != 0) { in findnextuid()
/titanic_50/usr/src/lib/pam_modules/authtok_get/
H A Dauthtok_get.c59 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()
172 if (strcmp(authtok, pwd) != 0) { in verify_authtok()
[all …]
/titanic_50/usr/src/cmd/su/
H A Dsu.c139 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.pw_name, username, ttyn); in main()
384 if ((getpwnam_r(nptr, &pwd, pwdbuf, sizeof (pwdbuf)) == NULL) || in main()
[all …]
/titanic_50/usr/src/tools/cscope-fast/
H A Dmygetwd.c47 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_50/usr/src/cmd/login/
H A Dlogin_audit.c59 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()
206 audit_failure(uint_t event_id, int failure_code, struct passwd *pwd, in audit_failure() argument
220 if (pwd != NULL) { in audit_failure()
221 uid = pwd->pw_uid; in audit_failure()
222 gid = pwd->pw_gid; in audit_failure()
H A Dlogin.c263 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 = getpwnam(user_name)) == NULL) && in verify_passwd()
1170 if (pwd == NULL || pwd->pw_uid != 0 || zflag != B_FALSE || in check_for_console()
1602 pwd = &nouser; in process_rlogin()
[all …]
/titanic_50/usr/src/cmd/cmd-inet/usr.sbin/
H A Din.rexecd.c167 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->pw_shell = "/bin/sh"; in doit()
422 if (chdir(pwd->pw_dir) < 0) { in doit()
428 if (pwd->pw_uid) in doit()
[all …]
/titanic_50/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dkuserok.c87 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()
311 princname, uid, pwd->pw_uid, luser); in krb5_kuserok()
[all …]
/titanic_50/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/
H A Dldap_service_stash.c238 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.value[i + 1]) == 0) { in dec_password()
277 sscanf((char *)pwd.value + i, "%2x", &k); in dec_password()
/titanic_50/usr/src/lib/libbsm/common/
H A Daudit_rshd.c107 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->pw_uid; in setup_session()
H A Daudit_rexecd.c142 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->pw_uid;
283 gid = pwd->pw_gid;
/titanic_50/usr/src/lib/pam_modules/unix_cred/
H A Dunix_cred.c193 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.pw_gid, in pam_sm_setcred()
361 pwd.pw_uid, pwd.pw_gid, termid, ADT_NEW) != 0) { in pam_sm_setcred()
377 pwd.pw_uid); in pam_sm_setcred()
381 if (adt_set_user(ah, pwd.pw_uid, pwd.pw_gid, pwd.pw_uid, in pam_sm_setcred()
382 pwd.pw_gid, NULL, ADT_UPDATE) != 0) { in pam_sm_setcred()
[all …]
/titanic_50/usr/src/cmd/cmd-inet/lib/nwamd/
H A Ddoor_if.c129 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->pw_name) == 0) { in nwamd_door_req_action()
291 if (chkauthattr(AUTOCONF_WRITE_AUTH, pwd->pw_name) == 0) { in nwamd_door_req_action()
[all …]
/titanic_50/usr/src/cmd/ssh/sftp/
H A Dsftp.c327 make_absolute(char *p, char *pwd) in make_absolute() argument
333 abs_str = path_append(pwd, p); in make_absolute()
538 process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) in process_get() argument
548 abs_src = make_absolute(abs_src, pwd); in process_get()
604 process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) in process_put() argument
615 tmp_dst = make_absolute(tmp_dst, pwd); in process_put()
661 abs_dst = make_absolute(tmp, pwd); in process_put()
1043 parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd, in parse_dispatch_command() argument
1073 err = process_get(conn, path1, path2, *pwd, pflag); in parse_dispatch_command()
1076 err = process_put(conn, path1, path2, *pwd, pflag); in parse_dispatch_command()
[all …]
/titanic_50/usr/src/cmd/cmd-inet/usr.bin/
H A Dfinger.c124 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 = pwdcopy(pw); in donames()
407 if (strncmp((p->pwd != NULL) ? in donames()
[all …]
/titanic_50/usr/src/cmd/tsol/updatehome/
H A Dupdatehome.c101 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_50/usr/src/lib/pam_modules/unix_session/
H A Dunix_session.c94 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_50/usr/src/cmd/mailx/
H A Dtemp.c63 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()

12345678