/src/usr.bin/mail/ |
getname.c | 52 struct passwd *pw; local in function:getname 54 if ((pw = getpwuid(uid)) == NULL) 56 return pw->pw_name; 66 struct passwd *pw; local in function:getuserid 68 if ((pw = getpwnam(name)) == NULL) 70 return pw->pw_uid;
|
/src/lib/libc/gen/ |
pw_private.h | 10 int __pw_scan(char *bp, struct passwd *pw, int *flags);
|
pw_scan.c | 132 __pw_scan(char *bp, struct passwd *pw, int *flags) 134 pw_scan( char *bp, struct passwd *pw, int *flags) 144 _DIAGASSERT(pw != NULL); 155 if (!(pw->pw_name = strsep(&bp, ":"))) /* login */ 157 if (strlen(pw->pw_name) > (LOGIN_NAME_MAX - 1)) { 159 warnx("username too long, `%s' > %d", pw->pw_name, 164 root = !strcmp(pw->pw_name, "root"); 166 if (!(pw->pw_passwd = strsep(&bp, ":"))) /* passwd */ 182 pw->pw_uid = (uid_t)id; 191 pw->pw_gid = (gid_t)id [all...] |
/src/lib/libutil/compat/ |
compat_login_cap.c | 57 struct passwd pw; variable in typeref:struct:passwd 59 passwd50_to_passwd(pw50, &pw); 60 return __login_getpwclass50(&pw); 66 struct passwd pw; local in function:setusercontext 68 passwd50_to_passwd(pw50, &pw); 69 return __setusercontext50(lc, &pw, uid, flags);
|
compat_passwd.c | 78 struct passwd pw, opw; local in function:pw_copy 79 passwd50_to_passwd(pw50, &pw); 82 __pw_copy50(ffd, tfd, &pw, opw50 ? &opw : NULL); 89 struct passwd pw, opw; local in function:pw_copyx 90 passwd50_to_passwd(pw50, &pw); 93 return __pw_copyx50(ffd, tfd, &pw, opw50 ? &opw : NULL, errbuf,
|
/src/usr.bin/chpass/ |
field.c | 58 p_login(const char *p, struct passwd *pw, ENTRY *ep) 69 if (!(pw->pw_name = strdup(p))) { 85 p_passwd(const char *p, struct passwd *pw, ENTRY *ep) 88 if (!(pw->pw_passwd = strdup(p))) { 98 p_uid(const char *p, struct passwd *pw, ENTRY *ep) 121 pw->pw_uid = (uid_t)id; 127 p_gid(const char *p, struct passwd *pw, ENTRY *ep) 142 pw->pw_gid = gr->gr_gid; 155 pw->pw_gid = (gid_t)id; 161 p_class(const char *p, struct passwd *pw, ENTRY *ep [all...] |
edit.c | 59 edit(char *tempname, struct passwd *pw) 73 if (verify(tempname, pw)) 90 display(char *tempname, int fd, struct passwd *pw) 101 use_yp ? "YP " : "", pw->pw_name); 103 (void)fprintf(fp, "Login: %s\n", pw->pw_name); 104 (void)fprintf(fp, "Password: %s\n", pw->pw_passwd); 105 (void)fprintf(fp, "Uid [#]: %d\n", pw->pw_uid); 106 (void)fprintf(fp, "Gid [# or name]: %d\n", pw->pw_gid); 108 ttoa(chgstr, sizeof chgstr, pw->pw_change)); 110 ttoa(expstr, sizeof expstr, pw->pw_expire)) [all...] |
chpass.c | 66 static char tempname[] = "/tmp/pw.XXXXXX"; 84 struct passwd *pw, lpw, old_pw; local in function:main 92 pw = NULL; /* XXX gcc -Wuninitialized */ 158 pw = getpwnam(username); 160 pw = getpwuid(uid); 161 if (pw != NULL) 187 pw = getpwnam(username); 188 if (pw == NULL) 190 if (uid && uid != pw->pw_uid) 193 pw = getpwuid(uid) [all...] |
/src/games/canfield/cfscores/ |
cfscores.c | 64 struct passwd *pw; local in function:main 81 pw = getpwuid(uid); 82 if (pw == NULL) { 85 printuser(pw, 1); 89 while ((pw = getpwent()) != NULL) 90 printuser(pw, 0); 93 pw = getpwnam(argv[1]); 94 if (pw == NULL) { 97 printuser(pw, 1); 105 printuser(const struct passwd *pw, int printfail [all...] |
/src/usr.bin/skeyinfo/ |
skeyinfo.c | 52 struct passwd *pw = NULL; local in function:main 63 pw = getpwuid(uid); 65 pw = getpwnam(argv[0]); 71 if (!pw) { 78 (void) strlcpy(name, pw->pw_name, sizeof(name)); 87 printf("%s's ", pw->pw_name);
|
/src/usr.bin/id/ |
id.c | 69 struct passwd *pw; local in function:main 132 pw = *argv ? who(*argv) : NULL; 139 id = pw ? pw->pw_gid : rflag ? getgid() : getegid(); 148 id = pw ? pw->pw_uid : rflag ? getuid() : geteuid(); 149 if (nflag && (pw = getpwuid(id))) 150 (void)printf("%s\n", pw->pw_name); 157 group(pw, nflag); 162 pretty(pw); 220 struct passwd *pw; local in function:current 336 struct passwd *pw; local in function:who [all...] |
/src/lib/libcompat/4.4/ |
cuserid.c | 47 struct passwd *pw, pwres; local in function:cuserid 53 if (getpwuid_r(geteuid(), &pwres, pwbuf, sizeof(pwbuf), &pw) != 0 54 || pw == NULL) { 61 (void)strncpy(s, pw->pw_name, L_cuserid);
|
/src/libexec/httpd/ |
tilde-luzah-bozo.c | 63 struct passwd *pw; local in function:bozo_user_transform 79 pw = getpwnam(user); 90 if (pw == NULL) { 98 pw->pw_name, pw->pw_dir, httpd->public_html, 99 pw->pw_uid, pw->pw_gid)); 101 if (chdir(pw->pw_dir) < 0) { 102 bozowarn(httpd, "chdir1 error: %s: %s", pw->pw_dir, 126 pw->pw_dir)) [all...] |
/src/usr.bin/passwd/ |
local_passwd.c | 63 getnewpasswd(struct passwd *pw, int min_pw_len) 70 (void)printf("Changing local password for %s.\n", pw->pw_name); 72 if (uid && pw->pw_passwd[0] && 73 strcmp(crypt(getpass("Old password:"), pw->pw_passwd), 74 pw->pw_passwd)) { 79 pw->pw_name, (unsigned long)uid, pw->pw_name); 111 pw_getpwconf(option, sizeof(option), pw, "localcipher"); 134 struct passwd *pw; local in function:pwlocal_process 174 if (!(pw = getpwnam(username)) 269 struct passwd *pw; local in function:local_chpw [all...] |
yp_passwd.c | 83 getnewpasswd(struct passwd *pw, char **old_pass) 92 (void)printf("Changing NIS password for %s.\n", pw->pw_name); 97 if (pw->pw_passwd[0]) { 99 pw->pw_passwd), pw->pw_passwd)) { 137 pw_getpwconf(option, sizeof(option), pw, "ypcipher"); 153 makeypp(struct yppasswd *ypp, struct passwd *pw) 156 ypp->newpw.pw_passwd = getnewpasswd(pw, &ypp->oldpass); 159 ypp->newpw.pw_name = estrdup(pw->pw_name); 160 ypp->newpw.pw_uid = pw->pw_uid 223 struct passwd pwb, pwb2, *pw; local in function:pwyp_process 384 struct passwd *pw, pwb; local in function:yp_chpw [all...] |
/src/usr.sbin/rpc.yppasswdd/ |
yppasswdd_mkpw.c | 67 struct passwd pw; local in function:make_passwd 118 if (pw_scan(buf, &pw, NULL) == 0) 120 if (strncmp(argp->newpw.pw_name, pw.pw_name, MAXLOGNAME) == 0) 124 if (*pw.pw_passwd && 125 strcmp(crypt(argp->oldpass, pw.pw_passwd), pw.pw_passwd) != 0) 147 pw.pw_passwd = argp->newpw.pw_passwd; 148 pw.pw_change = 0; 151 pw.pw_gecos = argp->newpw.pw_gecos; 153 pw.pw_shell = argp->newpw.pw_shell [all...] |
/src/tests/lib/libc/sys/ |
t_setuid.c | 82 struct passwd *pw; local in function:ATF_TC_BODY 87 while ((pw = getpwent()) != NULL) { 94 rv = setuid(pw->pw_uid); 101 if (uid != pw->pw_uid) 110 atf_tc_fail("failed to change UID to %u", pw->pw_uid);
|
t_issetugid.c | 47 struct passwd *pw; local in function:check 51 pw = getpwnam("nobody"); 53 if (pw == NULL) 63 if (fuid != NULL && (*fuid)(pw->pw_uid) != 0) 66 if (fgid != NULL && (*fgid)(pw->pw_gid) != 0)
|
/src/usr.bin/resize/ |
resize.h | 70 x_getpwuid(uid_t uid, struct passwd *pw) 74 memset(pw, 0, sizeof(*pw)); 77 *pw = *p; 88 #define OkPasswd(pw) *((pw)->pw_name)
|
/src/games/sail/ |
main.c | 65 struct passwd *pw; local in function:initialize 87 pw = getpwuid(getuid()); 88 if (pw != NULL) { 89 strlcpy(myname, pw->pw_gecos, sizeof(myname)); 102 strlcpy(myname, pw->pw_name, sizeof(myname));
|
/src/usr.bin/finger/ |
finger.c | 193 struct passwd *pw; local in function:loginlist 199 if ((pw = getpwnam(ep->name)) == NULL) 201 pn = enter_person(pw); 224 struct passwd *pw; local in function:userlist 254 if ((pw = getpwnam(*p)) != NULL) 255 enter_person(pw); 259 while ((pw = getpwent()) != NULL) 261 if (match(pw, *p)) { 262 enter_person(pw);
|
/src/lib/libcrypt/ |
md5crypt.c | 40 __md5crypt(const char *pw, const char *salt) 50 pwl = strlen(pw); 69 UPDATE(&ctx, (const unsigned char *)pw, pwl); 77 /* Then just as many characters of the MD5(pw,salt,pw) */ 79 UPDATE(&ctx1, (const unsigned char *)pw, pwl); 81 UPDATE(&ctx1, (const unsigned char *)pw, pwl); 95 UPDATE(&ctx, (const unsigned char *)pw, 1); 115 UPDATE(&ctx1, (const unsigned char *)pw, pwl); 123 UPDATE(&ctx1, (const unsigned char *)pw, pwl) [all...] |
/src/usr.sbin/rpc.pcnfsd/ |
pcnfsd_v1.c | 76 char pw[64]; local in function:pcnfsd_auth_1_svc 86 scramble(arg->pw, pw); 89 if (check_cache(uname, pw, &r.uid, &r.gid)) { 102 c1 = strlen(pw); 105 (strcmp(p->pw_passwd, crypt(pw, p->pw_passwd)))) {
|
/src/dist/pf/sbin/pflogd/ |
privsep.c | 79 struct passwd *pw; local in function:priv_init 88 pw = getpwnam("_pflogd"); 89 if (pw == NULL) 101 if (chroot(pw->pw_dir) != 0) 106 gidset[0] = pw->pw_gid; 108 if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1) 111 if (setgid(pw->pw_gid) == -1) 117 if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) == -1 [all...] |
/src/tests/lib/libcrypt/ |
t_crypt.c | 74 const char *pw; member in struct:__anondf4c2ba30108 144 char *hash = crypt(tests[i].pw, tests[i].hash);
|