/dragonfly/usr.bin/uudecode/ |
H A D | uudecode.c | 172 struct passwd *pw; in decode2() local 219 pw = NULL; in decode2() 224 pw = getpwnam(q + 1); in decode2() 227 if (pw != NULL) { in decode2() 228 n = strlen(pw->pw_dir); in decode2() 239 q = memcpy(p - n, pw->pw_dir, n); in decode2()
|
/dragonfly/lib/libpam/modules/pam_rhosts/ |
H A D | pam_rhosts.c | 57 struct passwd *pw; in pam_sm_authenticate() local 66 if ((pw = getpwnam(user)) == NULL) in pam_sm_authenticate() 68 if (pw->pw_uid == 0 && in pam_sm_authenticate()
|
/dragonfly/usr.sbin/inetd/ |
H A D | builtins.c | 343 struct passwd *pw = NULL; in ident_stream() local 559 pw = getpwuid(uc.cr_uid); in ident_stream() 560 if (pw == NULL) in ident_stream() 564 snprintf(idbuf, sizeof(idbuf), "%u", (unsigned)pw->pw_uid); in ident_stream() 566 strlcpy(idbuf, pw->pw_name, sizeof(idbuf)); in ident_stream() 573 if (asprintf(&p, "%s/.noident", pw->pw_dir) == -1) in ident_stream() 595 if (initgroups(pw->pw_name, pw->pw_gid) == -1) in ident_stream() 597 if (seteuid(pw->pw_uid) == -1) in ident_stream() 606 if (asprintf(&p, "%s/.fakeid", pw->pw_dir) == -1) in ident_stream()
|
/dragonfly/lib/libcrypt/ |
H A D | deprecated-crypt-sha512.c | 49 crypt_deprecated_sha512(const char *pw, const char *salt) in crypt_deprecated_sha512() argument 86 __crypt__sha512_process_bytes(pw, strlen(pw), &ctx); in crypt_deprecated_sha512()
|
H A D | deprecated-crypt-sha256.c | 49 crypt_deprecated_sha256(const char *pw, const char *salt) in crypt_deprecated_sha256() argument 86 __crypt__sha256_process_bytes(pw, strlen(pw), &ctx); in crypt_deprecated_sha256()
|
/dragonfly/usr.bin/top/ |
H A D | username.c | 88 struct passwd *pw; in username() local 115 if ((pw = getpwuid(uid)) != NULL) in username() 117 strncpy(data->name, pw->pw_name, MAXLOGNAME-1); in username()
|
/dragonfly/crypto/openssh/ |
H A D | monitor_wrap.c | 250 if (len != sizeof(pw->id)) \ 252 memcpy(&pw->id, p, len); \ 259 struct passwd *pw; in mm_getpwnamallow() local 282 pw = NULL; in mm_getpwnamallow() 287 pw = xcalloc(sizeof(*pw), 1); in mm_getpwnamallow() 296 if ((r = sshbuf_get_cstring(m, &pw->pw_name, NULL)) != 0 || in mm_getpwnamallow() 299 (r = sshbuf_get_cstring(m, &pw->pw_gecos, NULL)) != 0 || in mm_getpwnamallow() 304 (r = sshbuf_get_cstring(m, &pw->pw_dir, NULL)) != 0 || in mm_getpwnamallow() 305 (r = sshbuf_get_cstring(m, &pw->pw_shell, NULL)) != 0) in mm_getpwnamallow() 346 return (pw); in mm_getpwnamallow() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/tls/ |
H A D | pkcs5.c | 422 static int pkcs12_key_gen(const u8 *pw, size_t pw_len, const u8 *salt, in pkcs12_key_gen() argument 453 *pos++ = pw[i % pw_len]; in pkcs12_key_gen() 514 u8 *pw; in pkcs12_crypto_init_sha1() local 523 pw = os_malloc(2 * (pw_len + 1)); in pkcs12_crypto_init_sha1() 524 if (!pw) in pkcs12_crypto_init_sha1() 528 WPA_PUT_BE16(&pw[2 * i], passwd[i]); in pkcs12_crypto_init_sha1() 532 if (pkcs12_key_gen(pw, pw_len, params->salt, params->salt_len, in pkcs12_crypto_init_sha1() 535 pkcs12_key_gen(pw, pw_len, params->salt, params->salt_len, in pkcs12_crypto_init_sha1() 538 os_free(pw); in pkcs12_crypto_init_sha1() 542 os_free(pw); in pkcs12_crypto_init_sha1()
|
/dragonfly/usr.bin/talk/ |
H A D | get_names.c | 66 struct passwd *pw; in get_names() local 68 if ((pw = getpwuid(getuid())) == NULL) in get_names() 70 my_name = pw->pw_name; in get_names()
|
/dragonfly/libexec/dma/ |
H A D | dma.c | 182 struct passwd *pw; in add_recp() local 226 pw = getpwnam(it->addr); in add_recp() 227 if (pw == NULL) in add_recp() 440 struct passwd *pw; in main() local 443 pw = getpwnam(DMA_ROOT_USER); in main() 444 if (pw == NULL) { in main() 451 if (setuid(pw->pw_uid) != 0) in main()
|
/dragonfly/usr.bin/killall/ |
H A D | killall.c | 119 struct passwd *pw; in main() local 280 pw = getpwnam(user); in main() 281 if (pw == NULL) in main() 283 uid = pw->pw_uid; in main() 289 pw = getpwuid(uid); in main() 290 if (pw) in main() 291 user = pw->pw_name; in main()
|
/dragonfly/lib/libtelnet/ |
H A D | sra.c | 441 struct passwd pws, *pw; in check_user() local 450 if (getpwnam_r(name, &pws, pwbuf, sizeof(pwbuf), &pw) == 0 && in check_user() 451 pw != NULL) { in check_user() 452 if (pw->pw_shell == NULL) in check_user() 455 salt = pw->pw_passwd; in check_user() 458 if (*pw->pw_passwd == '\0' || strcmp(xpasswd, pw->pw_passwd)) in check_user()
|
/dragonfly/contrib/tnftp/src/ |
H A D | main.c | 148 struct passwd *pw; in main() local 473 pw = NULL; in main() 476 pw = getpwnam(cp); in main() 477 if (pw == NULL) in main() 478 pw = getpwuid(getuid()); in main() 479 if (pw != NULL) { in main() 480 if (localhome == NULL && !EMPTYSTRING(pw->pw_dir)) in main() 481 localhome = ftp_strdup(pw->pw_dir); in main() 482 localname = ftp_strdup(pw->pw_name); in main()
|
/dragonfly/lib/librpcsvc/ |
H A D | xcrypt.c | 122 passwd2des(char *pw, char *key) in passwd2des() argument 127 for (i = 0; *pw; i = (i+1)%8) { in passwd2des() 128 key[i] ^= *pw++ << 1; in passwd2des()
|
/dragonfly/sbin/reboot/ |
H A D | reboot.c | 58 struct passwd *pw; in main() local 112 user = (pw = getpwuid(getuid())) ? in main() 113 pw->pw_name : "???"; in main()
|
/dragonfly/usr.bin/rwall/ |
H A D | rwall.c | 128 struct passwd *pw; in makemsg() local 145 whom = (pw = getpwuid(getuid())) ? pw->pw_name : "???"; in makemsg()
|
/dragonfly/usr.sbin/chroot/ |
H A D | chroot.c | 54 struct passwd *pw; in main() local 139 if ((pw = getpwnam(user)) != NULL) in main() 140 uid = pw->pw_uid; in main()
|
/dragonfly/usr.sbin/cron/crontab/ |
H A D | crontab.c | 61 static struct passwd *pw; variable 129 if (!(pw = getpwuid(getuid()))) in parse_args() 131 strncpy(User, pw->pw_name, (sizeof User)-1); in parse_args() 145 if (!(pw = getpwnam(optarg))) in parse_args() 147 strncpy(User, pw->pw_name, (sizeof User)-1); in parse_args() 545 e = load_entry(tmp, check_error, pw, envp);
|
/dragonfly/contrib/dhcpcd/src/ |
H A D | privsep.c | 97 struct passwd *pw; in ps_init() local 101 if ((ctx->ps_user = pw = getpwnam(PRIVSEP_USER)) == NULL) { in ps_init() 112 if (stat(pw->pw_dir, &st) == -1 || !S_ISDIR(st.st_mode)) { in ps_init() 115 PRIVSEP_USER, pw->pw_dir); in ps_init() 127 struct passwd *pw = ctx->ps_user; in ps_dropprivs() local 130 logdebugx("chrooting as %s to %s", pw->pw_name, pw->pw_dir); in ps_dropprivs() 131 if (chroot(pw->pw_dir) == -1 && in ps_dropprivs() 133 logerr("%s: chroot: %s", __func__, pw->pw_dir); in ps_dropprivs() 137 if ((setgroups(1, &pw->pw_gid) == -1 || in ps_dropprivs() 138 setgid(pw->pw_gid) == -1 || in ps_dropprivs() [all …]
|
/dragonfly/usr.bin/who/ |
H A D | who.c | 229 struct passwd *pw; in who_am_i() local 255 pw = getpwuid(getuid()); in who_am_i() 258 print(pw ? pw->pw_name : "?", p, now, "", getpid(), 0, 0, 0, 0); in who_am_i()
|
/dragonfly/usr.bin/enigma/ |
H A D | enigma.c | 36 setup(const char *pw) in setup() argument 44 strncpy(salt, pw, sizeof(salt)); in setup() 45 cryptpw = crypt(pw, salt); in setup()
|
/dragonfly/contrib/libarchive/libarchive/ |
H A D | archive_cryptor_private.h | 150 #define archive_pbkdf2_sha1(pw, pw_len, salt, salt_len, rounds, dk, dk_len)\ argument 151 __archive_cryptor.pbkdf2sha1(pw, pw_len, salt, salt_len, rounds, dk, dk_len) 172 int (*pbkdf2sha1)(const char *pw, size_t pw_len, const uint8_t *salt,
|
/dragonfly/usr.sbin/ppp/ |
H A D | auth.c | 100 struct passwd *pw; in auth_CheckPasswd() local 106 pw = getpwnam(name); in auth_CheckPasswd() 108 if (pw) { in auth_CheckPasswd() 109 cryptpw = crypt(key, pw->pw_passwd); in auth_CheckPasswd() 111 result = (cryptpw != NULL) && !strcmp(cryptpw, pw->pw_passwd); in auth_CheckPasswd()
|
/dragonfly/contrib/pam_passwdqc/ |
H A D | passwdqc_check.c | 532 const char *newpass, const char *oldpass, const struct passwd *pw) in passwdqc_check() argument 587 if (pw) { in passwdqc_check() 588 if (!(u_name = unify(NULL, pw->pw_name)) || in passwdqc_check() 589 !(u_gecos = unify(NULL, pw->pw_gecos)) || in passwdqc_check() 590 !(u_dir = unify(NULL, pw->pw_dir))) in passwdqc_check() 601 if (pw && in passwdqc_check()
|
/dragonfly/usr.sbin/pw/ |
H A D | pwupd.c | 109 char *pw; in fmtpwentry() local 111 pw = (type == PWF_MASTER) ? in fmtpwentry() 121 pwd->pw_name, pw, (long) pwd->pw_uid, (long) pwd->pw_gid, in fmtpwentry()
|