/freebsd/lib/libc/tests/nss/ |
H A D | getpw_test.c | 49 DECLARE_TEST_DATA(passwd) 50 DECLARE_TEST_FILE_SNAPSHOT(passwd) 51 DECLARE_1PASS_TEST(passwd) 52 DECLARE_2PASS_TEST(passwd) 54 static void clone_passwd(struct passwd *, struct passwd const *); 55 static int compare_passwd(struct passwd *, struct passwd *, void *); 56 static void free_passwd(struct passwd *); 58 static void sdump_passwd(struct passwd *, char *, size_t); 60 static void dump_passwd(struct passwd *); 63 static int passwd_read_snapshot_func(struct passwd *, char *); [all …]
|
/freebsd/sys/contrib/libsodium/test/default/ |
H A D | pwhash_scrypt.c | 93 char passwd[256]; in tv() local 100 sodium_hex2bin((unsigned char *) passwd, sizeof passwd, in tv() 106 out, (unsigned long long) tests[i].outlen, passwd, in tv() 142 char passwd[256]; in tv2() local 149 sodium_hex2bin((unsigned char *) passwd, sizeof passwd, in tv2() 155 out, (unsigned long long) tests[i].outlen, passwd, in tv2() 169 const char *passwd; in tv3() member 278 char * passwd; in tv3() local 285 passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U); in tv3() 286 assert(passwd != NULL); in tv3() [all …]
|
H A D | pwhash_argon2i.c | 81 char passwd[256]; in tv() local 88 sodium_hex2bin((unsigned char *) passwd, sizeof passwd, in tv() 93 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd, in tv() 133 char passwd[256]; in tv2() local 140 sodium_hex2bin((unsigned char *) passwd, sizeof passwd, in tv2() 145 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd, in tv2() 192 const char *passwd; in tv3() member 209 char *passwd; in tv3() local 217 passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U); in tv3() 218 assert(passwd != NULL); in tv3() [all …]
|
H A D | pwhash_argon2id.c | 81 char passwd[256]; in tv() local 88 sodium_hex2bin((unsigned char *) passwd, sizeof passwd, in tv() 93 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd, in tv() 133 char passwd[256]; in tv2() local 140 sodium_hex2bin((unsigned char *) passwd, sizeof passwd, in tv2() 145 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd, in tv2() 188 const char *passwd; in tv3() member 205 char *passwd; in tv3() local 213 passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U); in tv3() 214 assert(passwd != NULL); in tv3() [all …]
|
/freebsd/usr.bin/chpass/ |
H A D | chpass.h | 43 struct passwd; 47 int (*func)(char *, struct passwd *, struct _entry *); 65 struct passwd *edit(const char *, struct passwd *); 68 int p_change(char *, struct passwd *, ENTRY *); 69 int p_class(char *, struct passwd *, ENTRY *); 70 int p_expire(char *, struct passwd *, ENTRY *); 71 int p_gecos(char *, struct passwd *, ENTRY *); 72 int p_gid(char *, struct passwd *, ENTRY *); 73 int p_hdir(char *, struct passwd *, ENTRY *); 74 int p_login(char *, struct passwd *, ENTRY *); [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/xattr/ |
H A D | xattr_013_pos.ksh | 56 create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd 73 log_mustnot get_xattr passwd $TESTDIR/myfile.$$ 74 log_mustnot rm_xattr passwd $TESTDIR/myfile.$$ 75 log_mustnot set_xattr_stdin passwd $TESTDIR/myfile.$$ </etc/passwd 78 log_mustnot set_xattr_stdin passwd $TESTDIR/new.$$ </etc/passwd 79 log_mustnot rm_xattr passwd $TESTDIR/new.$$ 87 verify_xattr $TESTDIR/myfile.$$ passwd /etc/passwd 94 log_mustnot get_xattr passwd $TESTDIR/new.$$ 96 create_xattr $TESTDIR/new.$$ passwd /etc/passwd
|
H A D | xattr_011_pos.ksh | 60 create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd 71 create_xattr $TESTDIR/cpio.$$ passwd /etc/passwd 102 compare_xattrs $TESTDIR/myfile.$$ $TESTDIR/myfile2.$$ passwd 107 log_mustnot get_xattr passwd $TESTDIR/myfile2.$$ 113 compare_xattrs $TESTDIR/myfile.$$ $TESTDIR/myfile2.$$ passwd 140 create_xattr $TESTDIR/mvfile.$$ passwd /etc/passwd 142 verify_xattr $TESTDIR/mvfile2.$$ passwd /etc/passwd 148 create_xattr $TESTDIR/pax.$$ passwd /etc/passwd 165 verify_xattr $TESTDIR/pax.$$ passwd /etc/passwd 179 create_xattr $TESTDIR/tar.$$ passwd /etc/passwd [all …]
|
H A D | xattr_005_pos.ksh | 57 create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd 65 verify_xattr $TESTDIR/clone/myfile.$$ passwd /etc/passwd 68 create_xattr $TESTDIR/clone/myfile.$$ foo /etc/passwd 72 delete_xattr $TESTDIR/myfile.$$ passwd 75 verify_xattr $TESTDIR/clone/myfile.$$ passwd /etc/passwd 76 delete_xattr $TESTDIR/clone/myfile.$$ passwd
|
/freebsd/crypto/openssh/ |
H A D | auth.h | 44 struct passwd; 66 struct passwd *pw; /* set if 'valid' */ 136 auth_rhosts2(struct passwd *, const char *, const char *, const char *); 140 int hostbased_key_allowed(struct ssh *, struct passwd *, 142 int user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, 192 int allowed_user(struct ssh *, struct passwd *); 193 struct passwd * getpwnamallow(struct ssh *, const char *user); 195 char *expand_authorized_keys(const char *, struct passwd *pw); 196 char *authorized_principals_file(struct passwd *); 203 check_key_in_hostfiles(struct passwd *, struct sshkey *, const char *, [all …]
|
H A D | platform.c | 54 platform_setusercontext(struct passwd *pw) in platform_setusercontext() 102 platform_setusercontext_post_groups(struct passwd *pw) in platform_setusercontext_post_groups() 159 platform_locked_account(struct passwd *pw) in platform_locked_account() 162 char *passwd = pw->pw_passwd; in platform_locked_account() local 177 iaf_passwd = passwd = get_iaf_password(pw); in platform_locked_account() 179 passwd = spw->sp_pwdp; in platform_locked_account() 184 if (passwd && *passwd) { in platform_locked_account() 186 if (strcmp(passwd, LOCKED_PASSWD_STRING) == 0) in platform_locked_account() 190 if (strncmp(passwd, LOCKED_PASSWD_PREFIX, in platform_locked_account() 195 if (strstr(passwd, LOCKED_PASSWD_SUBSTR)) in platform_locked_account()
|
/freebsd/include/ |
H A D | pwd.h | 111 struct passwd { struct 147 struct passwd *getpwnam(const char *); 148 struct passwd *getpwuid(uid_t); 152 struct passwd *getpwent(void); 157 int getpwnam_r(const char *, struct passwd *, char *, size_t, 158 struct passwd **); 159 int getpwuid_r(uid_t, struct passwd *, char *, size_t, 160 struct passwd **); 164 int getpwent_r(struct passwd *, char *, size_t, struct passwd **); 169 struct passwd * (*)(const char *), [all …]
|
/freebsd/usr.sbin/pw/tests/ |
H A D | helper_functions.shin | 11 cp ${TESTDIR}/master.passwd ${HOME} || \ 12 atf_fail "Populating master.passwd in ${HOME}" 15 # Generate the passwd file 16 pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ 17 atf_fail "generate passwd from master.passwd" 23 cp ${TESTDIR}/master.passwd ${HOME}/etc || \ 24 atf_fail "Populating master.passwd in ${HOME}/etc" 28 # Generate the passwd file 29 pwd_mkdb -p -d ${HOME}/etc ${HOME}//etc/master.passwd || \ 30 atf_fail "generate passwd from master.passwd"
|
H A D | pw_useradd_test.sh | 12 grep "^test:.*" $HOME/master.passwd 21 atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd 31 grep '^test:.*:Test User,work!,123,user@example.com:' $HOME/master.passwd 41 atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd 52 grep "^test:.*:Test User,work,123:456,456:" $HOME/master.passwd 62 atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd 183 atf_check -s exit:1 -o empty grep "^test user:.*" $HOME/master.passwd 187 atf_check -s exit:1 -o empty grep "^test user:.*" $HOME/master.passwd 199 atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd 203 atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd [all …]
|
/freebsd/usr.sbin/periodic/etc/daily/ |
H A D | 200.backup-passwd | 15 if [ ! -f /etc/master.passwd ] 32 if [ ! -f $bak/master.passwd.bak ] 36 cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 39 if ! cmp -s $bak/master.passwd.bak /etc/master.passwd 43 diff ${daily_diff_flags} -I '^#' $bak/master.passwd.bak /etc/master.passwd |\ 45 mv $bak/master.passwd.bak $bak/master.passwd.bak2 46 cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3
|
/freebsd/contrib/one-true-awk/testdir/ |
H A D | T.redir | 5 $awk '{ print >"foo" }' /etc/passwd 6 diff foo /etc/passwd || echo 'BAD: T.redir (print >"foo")' 9 $awk '{ print >>"foo" }' /etc/passwd 10 diff foo /etc/passwd || echo 'BAD: T.redir (print >>"foo")' 14 NR%2 == 0 { print >"foo" }' /etc/passwd 15 diff foo /etc/passwd || echo 'BAD: T.redir (print > and >>"foo")' 18 $awk '{ print | "cat >foo" }' /etc/passwd 19 diff foo /etc/passwd || echo 'BAD: T.redir (print | "cat >foo")' 31 $awk '{ print >"/dev/stderr" }' /etc/passwd 1>foo1 2>foo2 32 diff foo2 /etc/passwd || echo 'BAD: T.redir (print >"/dev/stderr")' [all …]
|
H A D | T.getline | 27 while (getline <"/etc/passwd") 32 cmp -s /etc/passwd foo || echo 'BAD: T.getline (getline <file)' 34 cat /etc/passwd | $awk ' 41 cmp -s /etc/passwd foo || echo 'BAD: T.getline (getline <"-")' 49 ' /etc/passwd >foo 50 cmp -s /etc/passwd foo || echo 'BAD: T.getline (getline <arg)' 58 ' /etc/passwd >foo 59 cmp -s /etc/passwd foo || echo 'BAD: T.getline (getline x <arg)' 67 ' /etc/passwd >foo 68 cmp -s /etc/passwd foo || echo 'BAD: T.getline (cat arg | getline)' [all …]
|
/freebsd/contrib/kyua/utils/process/ |
H A D | isolation_test.cpp | 59 namespace passwd = utils::passwd; 142 const passwd::user _unprivileged_user; 148 check_drop_privileges(const passwd::user& unprivileged_user) : in check_drop_privileges() 326 const passwd::user user = passwd::current_user(); in ATF_TEST_CASE_BODY() 328 passwd::user other_user = user; in ATF_TEST_CASE_BODY() 346 const passwd::user unprivileged_user = passwd::find_user_by_name( in ATF_TEST_CASE_BODY() 366 passwd::user root = passwd::user("root", 0, 0); in ATF_TEST_CASE_BODY() 368 passwd::set_current_user_for_testing(root); in ATF_TEST_CASE_BODY() 370 passwd::user unprivileged_user = passwd::current_user(); in ATF_TEST_CASE_BODY() 392 passwd::user root = passwd::user("root", 0, 0); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_pwhash/ |
H A D | crypto_pwhash.c | 130 const char * const passwd, unsigned long long passwdlen, in crypto_pwhash() argument 136 return crypto_pwhash_argon2i(out, outlen, passwd, passwdlen, salt, in crypto_pwhash() 139 return crypto_pwhash_argon2id(out, outlen, passwd, passwdlen, salt, in crypto_pwhash() 149 const char * const passwd, unsigned long long passwdlen, in crypto_pwhash_str() argument 152 return crypto_pwhash_argon2id_str(out, passwd, passwdlen, in crypto_pwhash_str() 158 const char * const passwd, unsigned long long passwdlen, in crypto_pwhash_str_alg() argument 163 return crypto_pwhash_argon2i_str(out, passwd, passwdlen, in crypto_pwhash_str_alg() 166 return crypto_pwhash_argon2id_str(out, passwd, passwdlen, in crypto_pwhash_str_alg() 175 const char * const passwd, in crypto_pwhash_str_verify() argument 180 return crypto_pwhash_argon2id_str_verify(str, passwd, passwdlen); in crypto_pwhash_str_verify() [all …]
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | xcrypt.c | 73 struct passwd *pw; in pick_salt() 74 char *passwd, *p; in pick_salt() local 83 if ((passwd = shadow_pw(pw)) == NULL) in pick_salt() 85 if (passwd[0] == '$' && (p = strrchr(passwd+1, '$')) != NULL) { in pick_salt() 86 typelen = p - passwd + 1; in pick_salt() 87 strlcpy(salt, passwd, MINIMUM(typelen, sizeof(salt))); in pick_salt() 88 explicit_bzero(passwd, strlen(passwd)); in pick_salt() 129 shadow_pw(struct passwd *pw) in shadow_pw()
|
/freebsd/lib/libc/net/ |
H A D | nss_compat.c | 47 struct passwd; 190 DECLARE_TERMINATOR(passwd); 196 int (*fn)(const char *, struct passwd *, char *, size_t, int *); in __nss_compat_getpwnam_r() 198 struct passwd *pwd; in __nss_compat_getpwnam_r() 206 pwd = va_arg(ap, struct passwd *); in __nss_compat_getpwnam_r() 213 *(struct passwd **)retval = pwd; in __nss_compat_getpwnam_r() 221 int (*fn)(uid_t, struct passwd *, char *, size_t, int *); in __nss_compat_getpwuid_r() 223 struct passwd *pwd; in __nss_compat_getpwuid_r() 231 pwd = va_arg(ap, struct passwd *); in __nss_compat_getpwuid_r() 238 *(struct passwd **)retval = pwd; in __nss_compat_getpwuid_r() [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/xattr/ |
H A D | xattr_005_pos.ksh | 66 create_xattr $TESTDIR/myfile.${TESTCASE_ID} passwd /etc/passwd 74 verify_xattr $TESTDIR/clone/myfile.${TESTCASE_ID} passwd /etc/passwd 77 create_xattr $TESTDIR/clone/myfile.${TESTCASE_ID} foo /etc/passwd 81 delete_xattr $TESTDIR/myfile.${TESTCASE_ID} passwd 84 verify_xattr $TESTDIR/clone/myfile.${TESTCASE_ID} passwd /etc/passwd 85 delete_xattr $TESTDIR/clone/myfile.${TESTCASE_ID} passwd
|
H A D | xattr_011_pos.ksh | 67 create_xattr $TESTDIR/myfile.${TESTCASE_ID} passwd /etc/passwd 78 create_xattr $TESTDIR/cpio.${TESTCASE_ID} passwd /etc/passwd 104 compare_xattrs $TESTDIR/myfile.${TESTCASE_ID} $TESTDIR/myfile2.${TESTCASE_ID} passwd 138 create_xattr $TESTDIR/mvfile.${TESTCASE_ID} passwd /etc/passwd 140 verify_xattr $TESTDIR/mvfile2.${TESTCASE_ID} passwd /etc/passwd 146 create_xattr $TESTDIR/pax.${TESTCASE_ID} passwd /etc/passwd 164 verify_xattr $TESTDIR/pax.${TESTCASE_ID} passwd /etc/passwd 175 create_xattr $TESTDIR/tar.${TESTCASE_ID} passwd /etc/passwd 187 verify_xattr $TESTDIR/tar.${TESTCASE_ID} passwd /etc/passwd
|
/freebsd/crypto/openssl/apps/ |
H A D | passwd.c | 49 char *passwd, BIO *out, int quiet, int table, 96 char *infile = NULL, *salt = NULL, *passwd = NULL, **passwds = NULL; in passwd_main() local 226 passwd = passwd_malloc = in passwd_main() 261 passwd = *passwds++; in passwd_main() 262 if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, bio_out, in passwd_main() 270 assert(passwd != NULL); in passwd_main() 272 int r = BIO_gets(in, passwd, pw_maxlen + 1); in passwd_main() 274 char *c = (strchr(passwd, '\n')); in passwd_main() 286 (passed_salt, &salt, &salt_malloc, passwd, bio_out, quiet, in passwd_main() 314 static char *md5crypt(const char *passwd, const char *magic, const char *salt) in md5crypt() argument [all …]
|
/freebsd/lib/libc/gen/ |
H A D | getpwent.c | 94 int __pw_parse_entry(char *, size_t, struct passwd *, int, int *errnop); 101 static struct passwd *getpw(int (*fn)(union key, struct passwd *, char *, 102 size_t, struct passwd **), union key); 103 static int wrap_getpwnam_r(union key, struct passwd *, char *, 104 size_t, struct passwd **); 105 static int wrap_getpwuid_r(union key, struct passwd *, char *, size_t, 106 struct passwd **); 107 static int wrap_getpwent_r(union key, struct passwd *, char *, size_t, 108 struct passwd **); 112 static int pwdb_parse_entry_v3(char *, size_t, struct passwd *, int *); [all …]
|
/freebsd/lib/libpam/modules/pam_xdg/ |
H A D | pam_xdg.c | 56 struct passwd *passwd; in _pam_xdg_open() local 74 if ((passwd = getpwnam(user)) == NULL) { in _pam_xdg_open() 101 rv = fchownat(rt_dir_prefix, user, passwd->pw_uid, passwd->pw_gid, 0); in _pam_xdg_open() 119 if (sb.st_uid != passwd->pw_uid || in _pam_xdg_open() 120 sb.st_gid != passwd->pw_gid) { in _pam_xdg_open() 121 …SE_ERROR("%s/%s isn't owned by %d:%d\n", RUNTIME_DIR_PREFIX, user, passwd->pw_uid, passwd->pw_gid); in _pam_xdg_open() 212 struct passwd *passwd; in _pam_xdg_close() local 229 if ((passwd = getpwnam(user)) == NULL) { in _pam_xdg_close() 249 if (sb.st_uid != passwd->pw_uid || in _pam_xdg_close() 250 sb.st_gid != passwd->pw_gid) { in _pam_xdg_close() [all …]
|