/freebsd-10.0-release/usr.sbin/jexec/ |
H A D | jexec.c | 46 #include <pwd.h> 52 pwd = getpwnam(username); \ 53 if (pwd == NULL) { \ 59 lcap = login_getpwclass(pwd); \ 63 if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0) \ 72 struct passwd *pwd = NULL; local 121 if (setgid(pwd->pw_gid) != 0) 123 if (setusercontext(lcap, pwd, pwd->pw_uid,
|
/freebsd-10.0-release/bin/pwd/ |
H A D | pwd.c | 38 static char sccsid[] = "@(#)pwd.c 8.3 (Berkeley) 4/1/94"; 100 (void)fprintf(stderr, "usage: pwd [-L | -P]\n"); 108 char *pwd; local 114 if ((pwd = getenv("PWD")) != NULL && *pwd == '/') { 115 if (stat(pwd, &lg) == -1 || stat(".", &phy) == -1) 118 return (pwd);
|
/freebsd-10.0-release/lib/libc/gen/ |
H A D | getpwent.c | 53 #include <pwd.h> 74 /* Counter as stored in /etc/pwd.db */ 262 struct passwd *pwd; local 284 pwd = va_arg(ap, struct passwd *); 289 strlen(pwd->pw_name) + 1; 290 if (pwd->pw_passwd != NULL) 291 desired_size += strlen(pwd->pw_passwd) + 1; 292 if (pwd->pw_class != NULL) 293 desired_size += strlen(pwd->pw_class) + 1; 294 if (pwd 366 struct passwd *pwd; local 503 getpwent_r(struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result) argument 541 getpwnam_r(const char *name, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result) argument 580 getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result) argument 619 pwd_init(struct passwd *pwd) argument 635 static struct passwd pwd; variable in typeref:struct:passwd 675 wrap_getpwnam_r(union key key, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **res) argument 683 wrap_getpwuid_r(union key key, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **res) argument 691 wrap_getpwent_r(union key key __unused, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **res) argument 813 struct passwd *pwd; local 966 pwdb_parse_entry_v3(char *buffer, size_t bufsize, struct passwd *pwd, int *errnop) argument 1037 pwdb_parse_entry_v4(char *buffer, size_t bufsize, struct passwd *pwd, int *errnop) argument 1108 struct passwd *pwd; local 1304 struct passwd *pwd; local 1476 compat_use_template(struct passwd *pwd, struct passwd *template, char *buffer, size_t bufsize) argument 1588 compat_redispatch(struct compat_state *st, enum nss_lookup_type how, enum nss_lookup_type lookup_how, const char *name, const char *lookup_name, uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, int *errnop) argument 1748 struct passwd *pwd; local 2001 __pw_parse_entry(char *buffer, size_t bufsize __unused, struct passwd *pwd, int master, int *errnop __unused) argument [all...] |
/freebsd-10.0-release/usr.bin/tip/tip/ |
H A D | log.c | 55 struct passwd *pwd; local 65 if ((pwd = getpwuid(getuid())) == NOPWD) 68 user = pwd->pw_name;
|
/freebsd-10.0-release/usr.sbin/pwd_mkdb/ |
H A D | pwd_mkdb.c | 55 #include <pwd.h> 81 static struct passwd pwd; /* password structure */ variable in typeref:struct:passwd 207 while (scan(fp, &pwd)) 208 if (!is_comment && strlen(pwd.pw_name) >= MAXLOGNAME) { 209 warnx("%s: username too long", pwd.pw_name); 358 for (cnt = 1; scan(fp, &pwd); ++cnt) { 360 (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-')) { 377 (!username || (strcmp(username, pwd.pw_name) == 0))) { 380 COMPACT(pwd [all...] |
/freebsd-10.0-release/lib/libypclnt/ |
H A D | ypclnt_passwd.c | 45 #include <pwd.h> 118 ypclnt_passwd(ypclnt_t *ypclnt, const struct passwd *pwd, const char *passwd) argument 122 return (yppasswd_remote(ypclnt, pwd, passwd)); 124 return (yppasswd_local(ypclnt, pwd)); 137 yppasswd_local(ypclnt_t *ypclnt, const struct passwd *pwd) argument 148 yppwd.newpw.pw_uid = pwd->pw_uid; 149 yppwd.newpw.pw_gid = pwd->pw_gid; 150 yppwd.newpw.pw_change = pwd->pw_change; 151 yppwd.newpw.pw_expire = pwd->pw_expire; 152 yppwd.newpw.pw_fields = pwd 237 yppasswd_remote(ypclnt_t *ypclnt, const struct passwd *pwd, const char *passwd) argument [all...] |
/freebsd-10.0-release/contrib/openpam/bin/su/ |
H A D | su.c | 47 #include <pwd.h> 77 struct passwd *pwd; local 131 if (pam_err != PAM_SUCCESS || (pwd = getpwnam(user = item)) == NULL) 148 *args = pwd->pw_shell; 160 if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { 164 if (setgid(pwd->pw_gid) == -1) { 168 if (setuid(pwd->pw_uid) == -1) {
|
/freebsd-10.0-release/usr.bin/login/ |
H A D | login.c | 68 #include <pwd.h> 118 struct passwd *pwd; variable in typeref:struct:passwd 285 if (failures > (pwd ? 0 : 1)) 317 pwd = getpwnam(username); 318 if (pwd != NULL && pwd->pw_uid == 0) 326 if (pwd != NULL && fflag && 327 (uid == (uid_t)0 || uid == (uid_t)pwd->pw_uid)) { 340 if (pwd && rval == 0) 356 pwd [all...] |
H A D | login_audit.c | 44 #include <pwd.h> 67 uid_t uid = pwd->pw_uid; 68 gid_t gid = pwd->pw_gid; 82 if (au_user_mask(pwd->pw_name, &aumask) == -1) 145 uid = pwd->pw_uid; 146 gid = pwd->pw_gid; 175 uid_t uid = pwd->pw_uid; 176 gid_t gid = pwd->pw_gid;
|
/freebsd-10.0-release/usr.bin/newgrp/ |
H A D | newgrp.c | 43 #include <pwd.h> 56 static struct passwd *pwd; variable in typeref:struct:passwd 81 if ((pwd = getpwuid(getuid())) == NULL) 137 initres = initgroups(pwd->pw_name, pwd->pw_gid); 138 setres = setgid(pwd->pw_gid); 173 if (pwd->pw_gid == grp->gr_gid) 176 if (strcmp(*p, pwd->pw_name) == 0) { 265 shell = pwd->pw_shell; 268 if (chdir(pwd [all...] |
/freebsd-10.0-release/usr.bin/su/ |
H A D | su.c | 90 #include <pwd.h> 152 struct passwd *pwd = NULL; local 259 pwd = getpwnam(username); 260 if (pwd == NULL || pwd->pw_uid != ruid) 261 pwd = getpwuid(ruid); 262 if (pwd == NULL) { 271 username = strdup(pwd->pw_name); 276 if (pwd->pw_shell != NULL && *pwd [all...] |
/freebsd-10.0-release/contrib/pam_modules/pam_passwdqc/ |
H A D | passwdqc.h | 8 #include <pwd.h>
|
/freebsd-10.0-release/lib/libpam/modules/pam_securetty/ |
H A D | pam_securetty.c | 42 #include <pwd.h> 58 struct passwd *pwd; local 67 if (user == NULL || (pwd = getpwnam(user)) == NULL) 73 if (pwd->pw_uid != 0)
|
/freebsd-10.0-release/libexec/lukemftpd/ |
H A D | nbsd2fbsd.h | 7 #include <pwd.h> 26 /* NetBSD pwd.h */
|
/freebsd-10.0-release/usr.bin/mail/ |
H A D | getname.c | 39 #include <pwd.h>
|
/freebsd-10.0-release/contrib/nvi/common/ |
H A D | util.c | 29 #include <pwd.h> 156 struct passwd *pwd; local 174 (pwd = getpwnam(h)) != NULL) || 175 (pwd = getpwuid(getuid())) != NULL) 176 h = pwd->pw_dir; 184 if ((pwd = getpwnam(u)) == NULL) { 188 h = pwd->pw_dir;
|
/freebsd-10.0-release/crypto/heimdal/lib/gssapi/mech/ |
H A D | gss_pname_to_uid.c | 80 struct passwd pw, *pwd; 82 struct passwd *pwd; 110 if (getpwnam_r(localname, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0) 111 pwd = NULL; 113 pwd = getpwnam(localname); 120 if (pwd != NULL) { 121 *uidp = pwd->pw_uid;
|
/freebsd-10.0-release/lib/libpam/modules/pam_nologin/ |
H A D | pam_nologin.c | 44 #include <pwd.h> 64 struct passwd *pwd; local 77 pwd = getpwnam(user); 78 if (pwd == NULL) 83 * if pwd->pw_uid is 0. That class should have "ignorenologin" 86 lc = login_getpwclass(pwd);
|
/freebsd-10.0-release/release/picobsd/tinyware/login/ |
H A D | pico-login.c | 70 #include <pwd.h> 139 struct passwd *pwd; variable in typeref:struct:passwd 309 if (failures > (pwd ? 0 : 1)) 314 pwd = getpwnam(username); 322 if (pwd != NULL) { 323 if (pwd->pw_uid == 0) 327 uid == (uid_t)pwd->pw_uid)) { 330 } else if (pwd->pw_passwd[0] == '\0') { 357 * PAM authentication may have changed "pwd" to the 361 if (pwd ! [all...] |
/freebsd-10.0-release/usr.sbin/nscd/agents/ |
H A D | passwd.c | 35 #include <pwd.h> 49 passwd_marshal_func(struct passwd *pwd, char *buffer, size_t *buffer_size) argument 57 strlen(pwd->pw_name) + 1; 58 if (pwd->pw_passwd != NULL) 59 desired_size += strlen(pwd->pw_passwd) + 1; 60 if (pwd->pw_class != NULL) 61 desired_size += strlen(pwd->pw_class) + 1; 62 if (pwd->pw_gecos != NULL) 63 desired_size += strlen(pwd->pw_gecos) + 1; 64 if (pwd [all...] |
/freebsd-10.0-release/contrib/openpam/modules/pam_unix/ |
H A D | pam_unix.c | 44 #include <pwd.h> 75 struct passwd *pwd; local 86 if ((pwd = getpwnam(user)) == NULL) 122 if ((!pwd->pw_passwd[0] && (flags & PAM_DISALLOW_NULL_AUTHTOK)) || 123 (crypt_password = crypt(password, pwd->pw_passwd)) == NULL || 124 strcmp(crypt_password, pwd->pw_passwd) != 0)
|
/freebsd-10.0-release/contrib/tcp_wrappers/ |
H A D | safe_finger.c | 28 #include <pwd.h> 61 struct passwd *pwd; local 67 if ((pwd = getpwnam(UNPRIV_NAME)) && pwd->pw_uid > 0) { 68 setgid(pwd->pw_gid); 69 setuid(pwd->pw_uid);
|
/freebsd-10.0-release/libexec/rshd/ |
H A D | rshd.c | 81 #include <pwd.h> 191 struct passwd *pwd; local 343 pwd = getpwnam(luser); 344 if (pwd == NULL) { 353 lc = login_getpwclass(pwd); 354 if (pwd->pw_uid) 357 if (chdir(pwd->pw_dir) < 0) { 359 login_getcapbool(lc, "requirehome", !!pwd->pw_uid)) { 365 pwd->pw_dir = slash; 391 if (setusercontext(lc, pwd, pw [all...] |
/freebsd-10.0-release/contrib/opie/ |
H A D | opiesu.c | 65 #include <pwd.h> 143 struct passwd *pwd; local 150 if (!(pwd = getpwnam(name))) 153 thisuser.pw_uid = pwd->pw_uid; 154 thisuser.pw_gid = pwd->pw_gid; 156 if (!(thisuser.pw_name = malloc(strlen(pwd->pw_name) + 1))) 158 strcpy(thisuser.pw_name, pwd->pw_name); 160 if (!(thisuser.pw_dir = malloc(strlen(pwd->pw_dir) + 1))) 162 strcpy(thisuser.pw_dir, pwd->pw_dir); 164 if (!(thisuser.pw_shell = malloc(strlen(pwd 309 struct passwd *pwd; local [all...] |
/freebsd-10.0-release/crypto/openssh/ |
H A D | sftp-server-main.c | 21 #include <pwd.h>
|