Home
last modified time | relevance | path

Searched refs:pw (Results 1 – 25 of 245) sorted by relevance

12345678910

/titanic_44/usr/src/lib/libshell/common/sh/
H A Djobs.c169 # define job_unstop(pw) argument
184 register struct process *pw,*pwnext; in job_chldtrap() local
191 for(pw=job.pwlist;pw;pw=pwnext) in job_chldtrap()
193 pwnext = pw->p_nxtjob; in job_chldtrap()
194 if((pw->p_flag&(P_BG|P_DONE)) != (P_BG|P_DONE)) in job_chldtrap()
196 pw->p_flag &= ~P_BG; in job_chldtrap()
199 shp->bckpid = pw->p_pid; in job_chldtrap()
200 shp->savexit = pw->p_exit; in job_chldtrap()
201 if(pw->p_flag&P_SIGNALLED) in job_chldtrap()
204 if(pw->p_pid==bckpid && unpost) in job_chldtrap()
[all …]
/titanic_44/usr/src/cmd/ssh/sshd/
H A Dauth.c83 allowed_user(struct passwd * pw) in allowed_user() argument
97 if (!pw || !pw->pw_name) in allowed_user()
101 spw = getspnam(pw->pw_name); in allowed_user()
113 log("Account %.100s has expired", pw->pw_name); in allowed_user()
119 pw->pw_name); in allowed_user()
126 pw->pw_name); in allowed_user()
132 if (!pw || !pw->pw_name) in allowed_user()
140 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; in allowed_user()
145 pw->pw_name, shell); in allowed_user()
151 pw->pw_name, shell); in allowed_user()
[all …]
H A Dauth-rhosts.c156 auth_rhosts(struct passwd *pw, const char *client_user) in auth_rhosts() argument
162 return auth_rhosts2(pw, client_user, hostname, ipaddr); in auth_rhosts()
166 auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostname, in auth_rhosts2_raw() argument
178 if (pw == NULL) in auth_rhosts2_raw()
182 temporarily_use_uid(pw); in auth_rhosts2_raw()
192 pw->pw_dir, rhosts_files[rhosts_file_index]); in auth_rhosts2_raw()
206 if (pw->pw_uid != 0) { in auth_rhosts2_raw()
208 client_user, pw->pw_name)) { in auth_rhosts2_raw()
214 client_user, pw->pw_name)) { in auth_rhosts2_raw()
224 if (stat(pw->pw_dir, &st) < 0) { in auth_rhosts2_raw()
[all …]
H A Dauth-krb4.c63 tkt_root, authctxt->pw->pw_uid, (long)getpid()); in krb4_init()
79 st.st_uid == authctxt->pw->pw_uid) in krb4_init()
104 struct passwd *pw; in auth_krb4_password() local
109 if ((pw = authctxt->pw) == NULL) in auth_krb4_password()
116 if (pw->pw_uid != 0 && krb_get_lrealm(realm, 1) == KSUCCESS) { in auth_krb4_password()
120 pw->pw_name); in auth_krb4_password()
124 r = krb_get_pw_in_tkt((char *) pw->pw_name, "", realm, in auth_krb4_password()
128 "failed: %s", pw->pw_name, krb_err_txt[r]); in auth_krb4_password()
132 chown(tkt_string(), pw->pw_uid, pw->pw_gid); in auth_krb4_password()
162 pw->pw_name, krb_err_txt[r]); in auth_krb4_password()
[all …]
H A Dauth-passwd.c99 struct passwd * pw = authctxt->pw; in auth_password()
116 if (pw == NULL) in auth_password()
119 if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) in auth_password()
134 HANDLE hToken = cygwin_logon_user(pw, password); in auth_password()
143 authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); in auth_password()
163 if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", in auth_password()
169 pw_password = pw->pw_passwd; in auth_password()
175 spw = getspnam(pw->pw_name); in auth_password()
181 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL) in auth_password()
H A Dauth-rh-rsa.c34 auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost, in auth_rhosts_rsa_key_allowed() argument
40 if (!auth_rhosts(pw, cuser)) in auth_rhosts_rsa_key_allowed()
43 host_status = check_key_in_hostfiles(pw, client_host_key, in auth_rhosts_rsa_key_allowed()
55 auth_rhosts_rsa(struct passwd *pw, char *cuser, Key *client_host_key) in auth_rhosts_rsa() argument
62 if (pw == NULL || client_host_key == NULL || in auth_rhosts_rsa()
69 if (!auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key)) { in auth_rhosts_rsa()
88 pw->pw_name, cuser, chost); in auth_rhosts_rsa()
H A Dauth2-pubkey.c155 if (user_key_allowed(authctxt->pw, key) && in userauth_pubkey()
175 if (user_key_allowed(authctxt->pw, key)) { in userauth_pubkey()
212 if (check_nt_auth(0, authctxt->pw) == 0) in userauth_pubkey()
221 user_key_allowed2(struct passwd *pw, Key *key, char *file) in user_key_allowed2() argument
231 if (pw == NULL) in user_key_allowed2()
235 temporarily_use_uid(pw); in user_key_allowed2()
253 secure_filename(f, file, pw, line, sizeof(line)) != 0) { in user_key_allowed2()
293 auth_parse_options(pw, options, file, linenum) == 1) { in user_key_allowed2()
314 user_key_allowed(struct passwd *pw, Key *key) in user_key_allowed() argument
319 if (pw == NULL) in user_key_allowed()
[all …]
H A Dauth1.c85 struct passwd *pw = authctxt->pw; in do_authloop() local
210 authenticated = auth_rhosts(pw, client_user); in do_authloop()
239 authenticated = auth_rhosts_rsa(pw, client_user, in do_authloop()
256 authenticated = auth_rsa(pw, n); in do_authloop()
343 !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD, pw)) { in do_authloop()
345 pw == NULL ? -1 : pw->pw_uid); in do_authloop()
350 if (authenticated && authctxt->pw->pw_uid == 0 && in do_authloop()
435 if ((authctxt->pw = getpwnamallow(user)) != NULL) { in do_authentication()
442 setproctitle("%s", authctxt->pw ? user : "unknown"); in do_authentication()
449 if (getuid() != 0 && authctxt->pw && in do_authentication()
[all …]
/titanic_44/usr/src/cmd/ssh/libssh/common/
H A Duidswap.c58 temporarily_use_uid(struct passwd *pw) in temporarily_use_uid() argument
65 (u_int)pw->pw_uid, (u_int)pw->pw_gid, in temporarily_use_uid()
95 if (initgroups(pw->pw_name, pw->pw_gid) < 0) in temporarily_use_uid()
96 fatal("initgroups: %s: %.100s", pw->pw_name, in temporarily_use_uid()
107 if (setregid(pw->pw_gid, -1) == -1) in temporarily_use_uid()
108 debug("setregid(%u, -1): %.100s", (uint_t)pw->pw_gid, strerror(errno)); in temporarily_use_uid()
110 if (setreuid(pw->pw_uid, -1) == -1) in temporarily_use_uid()
111 debug("setreuid(%u, -1): %.100s", (uint_t)pw->pw_uid, strerror(errno)); in temporarily_use_uid()
121 if (setegid(pw->pw_gid) == -1) in temporarily_use_uid()
122 fatal("setegid %u: %.100s", (u_int)pw->pw_uid, in temporarily_use_uid()
[all …]
/titanic_44/usr/src/lib/libbc/libc/compat/sys5/
H A Dgetpw.c34 struct passwd *pw; in getpw() local
37 pw = getpwuid(uid); in getpw()
38 if(pw == 0) in getpw()
40 strcpy(buf, pw->pw_name); in getpw()
42 strcat(buf, pw->pw_passwd); in getpw()
43 if (*pw->pw_age != '\0') { in getpw()
45 strcat(buf, pw->pw_age); in getpw()
48 sprintf(numbuf, "%d", pw->pw_uid); in getpw()
51 sprintf(numbuf, "%d", pw->pw_gid); in getpw()
54 strcat(buf, pw->pw_gecos); in getpw()
[all …]
/titanic_44/usr/src/cmd/lp/lib/oam/
H A Dfmtmsg.c113 wchar_t *p, *pw, *ppw; in wrap() local
156 pw = p; in wrap()
158 while (*pw) { in wrap()
159 if (iswprint(*pw)) in wrap()
160 tmpcol += wcwidth(*pw); in wrap()
164 pw++; in wrap()
171 if (!*pw) { in wrap()
176 len = pw - p; in wrap()
179 ppw = pw; in wrap()
186 while (pw > p) { in wrap()
[all …]
/titanic_44/usr/src/lib/libbc/libc/compat/4.1/
H A Dgetpw.c34 struct passwd *pw; in getpw() local
37 pw = getpwuid(uid); in getpw()
38 if(pw == 0) in getpw()
40 strcpy(buf, pw->pw_name); in getpw()
42 strcat(buf, pw->pw_passwd); in getpw()
44 sprintf(numbuf, "%d", pw->pw_uid); in getpw()
47 sprintf(numbuf, "%d", pw->pw_gid); in getpw()
50 strcat(buf, pw->pw_gecos); in getpw()
52 strcat(buf, pw->pw_dir); in getpw()
54 strcat(buf, pw->pw_shell); in getpw()
/titanic_44/usr/src/cmd/mailx/
H A Dgetname.c59 struct passwd *pw; in getname() local
66 pw = getpwuid(uid); in getname()
67 if (pw) { in getname()
68 strcpy(namebuf, pw->pw_name); in getname()
82 struct passwd *pw; in getuserid() local
89 pw = getpwnam(name); in getuserid()
90 return pw ? pw->pw_uid : (uid_t)-1; in getuserid()
/titanic_44/usr/src/cmd/newtask/
H A Dnewtask.c99 struct passwd *pw; in main() local
158 if ((pw = match_user(uid, projname, 1)) == NULL) { in main()
178 pw->pw_name, finalize_flag)) != 0) { in main()
179 setproject_err(pw->pw_name, projname, error, NULL); in main()
196 if (strcmp(pw->pw_shell, "") == 0) { in main()
198 pw->pw_shell = SHELL; in main()
200 pw->pw_shell = SHELL2; in main()
213 size_t len_home = strlen(pw->pw_dir) + strlen("HOME=") + 1; in main()
214 size_t len_logname = strlen(pw->pw_name) + strlen("LOGNAME=") + in main()
216 size_t len_shell = strlen(pw->pw_shell) + strlen("SHELL=") + 1; in main()
[all …]
/titanic_44/usr/src/lib/libnsl/yp/
H A Dyppasswd_xdr.c35 xdr_passwd(XDR *xdrsp, struct passwd *pw) in xdr_passwd() argument
37 if (!xdr_wrapstring(xdrsp, &pw->pw_name)) in xdr_passwd()
39 if (!xdr_wrapstring(xdrsp, &pw->pw_passwd)) in xdr_passwd()
41 if (!xdr_int(xdrsp, (int *)&pw->pw_uid)) in xdr_passwd()
43 if (!xdr_int(xdrsp, (int *)&pw->pw_gid)) in xdr_passwd()
45 if (!xdr_wrapstring(xdrsp, &pw->pw_gecos)) in xdr_passwd()
47 if (!xdr_wrapstring(xdrsp, &pw->pw_dir)) in xdr_passwd()
49 return (xdr_wrapstring(xdrsp, &pw->pw_shell)); in xdr_passwd()
/titanic_44/usr/src/cmd/ypcmd/yppasswd/
H A Dyppasswdxdr.c36 xdr_passwd(XDR *xdrs, struct passwd *pw) in xdr_passwd() argument
38 if (!xdr_wrapstring(xdrs, &pw->pw_name)) { in xdr_passwd()
41 if (!xdr_wrapstring(xdrs, &pw->pw_passwd)) { in xdr_passwd()
44 if (!xdr_uid_t(xdrs, &pw->pw_uid)) { in xdr_passwd()
47 if (!xdr_gid_t(xdrs, (&pw->pw_gid))) { in xdr_passwd()
50 if (!xdr_wrapstring(xdrs, &pw->pw_gecos)) { in xdr_passwd()
53 if (!xdr_wrapstring(xdrs, &pw->pw_dir)) { in xdr_passwd()
56 if (!xdr_wrapstring(xdrs, &pw->pw_shell)) { in xdr_passwd()
/titanic_44/usr/src/cmd/groups/
H A Dgroups.c65 struct passwd *pw; in main() local
80 if ((pw = getpwuid(getuid())) == NULL) { in main()
84 showgroups(pw); in main()
88 if ((pw = getpwnam(*argv)) == NULL) { in main()
95 showgroups(pw); in main()
104 showgroups(struct passwd *pw) in showgroups() argument
120 groups[0] = pw->pw_gid; in showgroups()
122 ngroups = _getgroupsbymember(pw->pw_name, groups, ngroups_max, 1); in showgroups()
127 (void) printf("%d", (int)pw->pw_gid); in showgroups()
/titanic_44/usr/src/cmd/ssh/libopenbsd-compat/common/
H A Dport-irix.c16 irix_setusercontext(struct passwd *pw) in irix_setusercontext() argument
30 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); in irix_setusercontext()
43 if ((projid = getdfltprojuser(pw->pw_name)) == -1) { in irix_setusercontext()
49 (int)projid, pw->pw_name, strerror(errno)); in irix_setusercontext()
53 debug("Setting sat id to %d", (int) pw->pw_uid); in irix_setusercontext()
54 if (satsetid(pw->pw_uid)) in irix_setusercontext()
/titanic_44/usr/src/lib/nsswitch/compat/common/
H A Dgetpwent.c184 struct passwd *pw = (struct passwd *)argp->buf.result; local
207 pw->pw_name, fields[1]);
210 if (pw->pw_age != 0 && *pw->pw_age != '\0')
212 pw->pw_name, pw->pw_passwd, pw->pw_age);
215 pw->pw_name, pw->pw_passwd);
224 pw->pw_uid,
225 pw->pw_gid,
226 fields[4] != 0 ? fields[4] : pw->pw_gecos,
227 fields[5] != 0 ? fields[5] : pw->pw_dir,
228 fields[6] != 0 ? fields[6] : pw->pw_shell);
/titanic_44/usr/src/lib/passwdutil/
H A Dutils.c61 free_pwd(struct passwd *pw) in free_pwd() argument
63 if (pw->pw_name) free(pw->pw_name); in free_pwd()
64 if (pw->pw_passwd) free(pw->pw_passwd); in free_pwd()
65 if (pw->pw_gecos) free(pw->pw_gecos); in free_pwd()
66 if (pw->pw_dir) free(pw->pw_dir); in free_pwd()
67 if (pw->pw_shell) free(pw->pw_shell); in free_pwd()
68 free(pw); in free_pwd()
/titanic_44/usr/src/cmd/acct/
H A Dacctdusg.c81 struct passwd *pw; in main() local
104 while ((pw = fgetpwent(pwf)) != NULL) { in main()
105 if ((entry = hash_find(pw->pw_uid)) == NULL) in main()
106 entry = hash_insert(pw->pw_uid); in main()
107 validate_entry(entry, pw); in main()
203 validate_entry(struct disk *entry, struct passwd *pw) in validate_entry() argument
205 (void) strlcpy(entry->dsk_name, pw->pw_name, in validate_entry()
215 struct passwd *pw; in charge() local
250 pw = getpwuid(statb.st_uid); in charge()
252 if (pw != NULL) { in charge()
[all …]
/titanic_44/usr/src/lib/libbc/libc/gen/common/
H A Dcrypt.c36 crypt(pw, salt) in crypt() argument
37 char *pw, *salt; in crypt()
55 if (pwdauth(salt+2, pw) == 0)
68 if (grpauth(salt+2, pw) == 0)
74 return (_crypt(pw, salt));
/titanic_44/usr/src/cmd/keyserv/
H A Dnewkey.c94 struct passwd *pw; in main() local
142 pw = getpwnam(username); in main()
143 if (pw == NULL) { in main()
148 uid = pw->pw_uid; in main()
246 setpublicmap(name, public, secret, database, pw) in setpublicmap() argument
251 char *pw;
292 return (ldap_update("dh192-0", name, public, secret, pw));
338 struct passwd *pw; local
349 pw = getpwuid(uid);
351 if (! pw) {
[all …]
/titanic_44/usr/src/cmd/logins/
H A Dlogins.c94 #define isauserlogin(pw) (pw->pw_uid > MAXSYSTEMLOGIN) argument
95 #define isasystemlogin(pw) (pw->pw_uid <= MAXSYSTEMLOGIN) argument
1095 struct passwd pw; member
1106 fill_localpw(struct localpw *lpw, struct passwd *pw) { in fill_localpw() argument
1112 lpw->pw.pw_name = strdup(pw->pw_name); in fill_localpw()
1113 lpw->pw.pw_passwd = strdup(pw->pw_passwd); in fill_localpw()
1114 lpw->pw.pw_uid = pw->pw_uid; in fill_localpw()
1115 lpw->pw.pw_gid = pw->pw_gid; in fill_localpw()
1116 lpw->pw.pw_age = strdup(pw->pw_age); in fill_localpw()
1117 lpw->pw.pw_comment = strdup(pw->pw_comment); in fill_localpw()
[all …]
/titanic_44/usr/src/cmd/pools/poolstat/
H A Dpoolstat.c457 int pw = 0; in default_f() local
460 pw = ff->pff_width - 2; in default_f()
462 pw = ff->pff_width - 3; in default_f()
464 pw = ff->pff_width - 4; in default_f()
466 if (pw < 0) in default_f()
467 pw = 0; in default_f()
469 ff->pff_width, pw, v); in default_f()
503 int pw = ff->pff_width - 4; in bigno_f() local
516 pw = 0; in bigno_f()
522 tag = 'K'; pw -= 1; in bigno_f()
[all …]

12345678910