Home
last modified time | relevance | path

Searched refs:pwd (Results 1 – 25 of 181) sorted by path

12345678

/illumos-gate/usr/src/cmd/acct/
H A Daccton.c45 struct passwd *pwd; variable
55 if ((pwd = getpwnam("adm")) == NULL) { in main()
58 admuid = pwd->pw_uid; in main()
/illumos-gate/usr/src/cmd/allocate/
H A Dadd_allocatable.c69 struct passwd pwd; in main() local
117 if ((getpwuid_r(uid, &pwd, pwbuf, sizeof (pwbuf))) == NULL) { in main()
124 if (chkauthattr(DEVICE_CONFIG_AUTH, pwd.pw_name) != 1) { in main()
/illumos-gate/usr/src/cmd/auditconfig/
H A Dauditconfig.c2283 struct passwd *pwd; in get_user_id() local
2288 if ((pwd = getpwuid(uid)) == NULL) { in get_user_id()
2292 if ((pwd = getpwnam(user)) == NULL) { in get_user_id()
2297 return (pwd->pw_uid); in get_user_id()
2767 struct passwd *pwd; in print_auid() local
2770 if ((pwd = getpwuid((uid_t)auid)) != NULL) in print_auid()
2771 username = pwd->pw_name; in print_auid()
/illumos-gate/usr/src/cmd/backup/lib/
H A Drmtlib.c153 static struct passwd *pwd = 0; in rmtgetconn() local
164 pwd = getpwuid(getuid()); in rmtgetconn()
165 if (pwd == 0) { in rmtgetconn()
182 tuser = pwd->pw_name; in rmtgetconn()
196 rmtape = myrcmd(&rmtpeer, (ushort_t)sp->s_port, pwd->pw_name, in rmtgetconn()
/illumos-gate/usr/src/cmd/bart/
H A Dcreate.c177 char pwd[PATH_MAX]; in sanitize_reloc_root() local
183 (void) getcwd(pwd, sizeof (pwd)); in sanitize_reloc_root()
199 if (chdir(pwd) < 0) { in sanitize_reloc_root()
/illumos-gate/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;
/illumos-gate/usr/src/cmd/chown/
H A Dchown.c61 static struct passwd *pwd; variable
227 } else if ((pwd = getpwnam(argv[0])) != NULL) { in main()
228 uid = pwd->pw_uid; in main()
/illumos-gate/usr/src/cmd/cmd-inet/common/
H A Dstore_forw_creds.c49 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/lib/ipmgmtd/
H A Dipmgmt_door.c126 struct passwd pwd; in ipmgmt_handler() local
140 if (getpwuid_r(uid, &pwd, buf, sizeof (buf)) == in ipmgmt_handler()
147 pwd.pw_name) != 1) { in ipmgmt_handler()
/illumos-gate/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
284 if (chkauthattr(AUTOCONF_WLAN_AUTH, pwd->pw_name) == 0) { in nwamd_door_req_action()
520 struct passwd *pwd) in nwamd_door_req_priority_group() argument
541 struct passwd *pwd = NULL; in nwamd_door_switch() local
558 if ((pwd = getpwuid(uid)) == NULL) { in nwamd_door_switch()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/
H A Dfinger.c300 p->pwd = NULL; in doall()
303 p->pwd = pwdcopy(pw); in doall()
348 p->pwd = NULL; in donames()
363 p->pwd = pwdcopy(pw); in donames()
375 if (p->pwd == NULL) { in donames()
431 new->pwd = p->pwd; in donames()
490 if (p->pwd != NULL && !AlreadyPrinted(p->pwd->pw_uid)) { in print()
589 if (pers->pwd == NULL) { in shortprint()
640 if (pers->pwd == NULL) { in personprint()
700 if (pers->pwd == NULL) in decode()
[all …]
H A Drcp.c75 static struct passwd *pwd; variable
579 suser = pwd->pw_name; in toremote()
609 pwd->pw_name, in toremote()
611 pwd->pw_name, in toremote()
719 pwd->pw_name, in toremote()
741 pwd->pw_name, in toremote()
743 pwd->pw_name, in toremote()
769 pwd->pw_name, in toremote()
819 suser = pwd->pw_name; in tolocal()
826 suser = pwd->pw_name; in tolocal()
[all …]
H A Drlogin.c278 struct passwd *pwd; in main() local
463 pwd = getpwuid(uid = getuid()); in main()
464 if (pwd == NULL) { in main()
470 name = pwd->pw_name; in main()
650 null_local_username ? "" : pwd->pw_name, in main()
734 null_local_username ? "" : pwd->pw_name, in main()
H A Drsh.c212 struct passwd *pwd; in main() local
411 pwd = getpwuid(uid); in main()
412 if (pwd == NULL) { in main()
417 user = pwd->pw_name; in main()
568 pwd->pw_name, user, in main()
653 rem = rcmd_af(&host, portnumber, pwd->pw_name, user, args, in main()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/ftp/
H A Dcmds.c1414 pwd(int argc, char *argv[]) in pwd() function
H A Dcmdtab.c184 { "pwd", pwdhelp, 0, 1, 1, pwd },
H A Dftp_var.h267 extern void pwd(int argc, char *argv[]);
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/
H A Dupap.c665 char *user, *pwd, *msg; local
694 pwd = (char *) (p + ulen + 2);
701 print_string(pwd, wlen, printer, arg);
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/ilbd/
H A Dilbd_support.c116 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/cmd-inet/usr.sbin/
H A Din.comsat.c280 struct passwd *pwd; in notify() local
307 if ((pwd = getpwnam(name)) == (struct passwd *)-1) { in notify()
311 if (setuid(pwd->pw_uid) == -1) { in notify()
338 if (fstat(fd, &stb) != 0 || stb.st_uid != pwd->pw_uid) { in notify()
382 stl.st_uid != pwd->pw_uid || in notify()
H A Din.rexecd.c167 struct passwd *pwd, pw_data; in doit() local
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()
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()
456 cp = rindex(pwd->pw_shell, '/'); in doit()
460 cp = pwd->pw_shell; in doit()
[all …]
H A Din.rshd.c436 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 …]
H A Din.tftpd.c185 struct passwd *pwd; /* for "nobody" entry */ in main() local
192 pwd = getpwnam("nobody"); in main()
193 if (pwd != NULL) { in main()
194 uid_nobody = pwd->pw_uid; in main()
195 gid_nobody = pwd->pw_gid; in main()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/inetconv/
H A Dinetconv.c438 struct passwd *pwd; in valid_inetconfent() local
504 if ((pwd = getpwnam(iconf->username)) == NULL) { in valid_inetconfent()
511 if ((grp = getgrgid(pwd->pw_gid)) != NULL) { in valid_inetconfent()
517 len = snprintf(s, 1, "%d", pwd->pw_gid) + 1; in valid_inetconfent()
520 pwd->pw_gid); in valid_inetconfent()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ipqosconf/
H A Dipqosconf.c2828 struct passwd *pwd; in printuser() local
2832 pwd = getpwuid(uid); in printuser()
2833 if (pwd != NULL) { in printuser()
2834 (void) fprintf(fp, "%s\n", pwd->pw_name); in printuser()
4206 struct passwd *pwd; in readuser() local
4229 pwd = getpwnam(str); in readuser()
4230 if (pwd == NULL) { in readuser()
4233 *uid = pwd->pw_uid; in readuser()

12345678