/freebsd/lib/libc/tests/nss/ |
H A D | getpw_test.c | 29 #include <pwd.h> 125 free_passwd(struct passwd *pwd) in free_passwd() argument 127 free(pwd->pw_name); in free_passwd() 128 free(pwd->pw_passwd); in free_passwd() 129 free(pwd->pw_class); in free_passwd() 130 free(pwd->pw_gecos); in free_passwd() 131 free(pwd->pw_dir); in free_passwd() 132 free(pwd->pw_shell); in free_passwd() 136 sdump_passwd(struct passwd *pwd, char *buffer, size_t buflen) in sdump_passwd() argument 139 pwd->pw_name, pwd->pw_passwd, pwd->pw_uid, pwd->pw_gid, in sdump_passwd() [all …]
|
/freebsd/usr.bin/logins/ |
H A D | logins.c | 34 #include <pwd.h> 203 struct passwd *pwd; in get_users() local 211 if ((pwd = getpwent()) == NULL) in get_users() 213 pwds[npwds].pw_name = xstrdup(pwd->pw_name); in get_users() 214 pwds[npwds].pw_passwd = xstrdup(pwd->pw_passwd); in get_users() 215 pwds[npwds].pw_uid = pwd->pw_uid; in get_users() 216 pwds[npwds].pw_gid = pwd->pw_gid; in get_users() 217 pwds[npwds].pw_change = pwd->pw_change; in get_users() 218 pwds[npwds].pw_class = xstrdup(pwd->pw_class); in get_users() 219 pwds[npwds].pw_gecos = xstrdup(pwd->pw_gecos); in get_users() [all …]
|
/freebsd/bin/pkill/tests/ |
H A D | pkill-j_test.sh | 18 sleep=$(pwd)/sleep.txt 24 command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount & 27 command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & 48 ! test -f "${PWD}/${base}_1_1.pid" && 49 ! test -f "${PWD}/${base}_1_2.pid" ; then 54 [ -f ${PWD}/${base}_1_1.pid ] && kill "$(cat ${PWD}/${base}_1_1.pid)" 55 [ -f ${PWD}/${base}_1_2.pid ] && kill "$(cat ${PWD}/${base}_1_2.pid)" 61 command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount & 64 command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount & 70 ! test -f ${PWD}/${base}_2_1.pid && [all …]
|
H A D | pgrep-j_test.sh | 18 sleep=$(pwd)/sleep.txt 24 command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount & 27 command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount & 44 pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ 45 "$(cat ${PWD}/${base}_1_2.pid)" | sort) 51 [ -f ${PWD}/${base}_1_1.pid ] && kill "$(cat ${PWD}/${base}_1_1.pid)" 52 [ -f ${PWD}/${base}_1_2.pid ] && kill "$(cat ${PWD}/${base}_1_2.pid)" 58 command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount & 61 command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount & 65 pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ [all …]
|
/freebsd/usr.sbin/pw/ |
H A D | pw_user.c | 40 #include <pwd.h> 73 static int print_user(struct passwd *pwd, bool pretty, bool v7); 133 create_and_populate_homedir(struct userconf *cnf, struct passwd *pwd, in create_and_populate_homedir() argument 139 mkdir_home_parents(conf.rootfd, pwd->pw_dir); in create_and_populate_homedir() 147 copymkdir(conf.rootfd, pwd->pw_dir, skelfd, homemode, pwd->pw_uid, in create_and_populate_homedir() 148 pwd->pw_gid, 0); in create_and_populate_homedir() 150 pwd->pw_name, (uintmax_t)pwd->pw_uid, pwd->pw_dir); in create_and_populate_homedir() 154 pw_set_passwd(struct passwd *pwd, int fd, bool precrypted, bool update) in pw_set_passwd() argument 163 if (!pwd->pw_passwd || *pwd->pw_passwd != '*') { in pw_set_passwd() 164 pwd->pw_passwd = "*"; /* No access */ in pw_set_passwd() [all …]
|
/freebsd/libexec/nuageinit/ |
H A D | nuage.lua | 82 local function adduser(pwd) 83 if (type(pwd) ~= "table") then 92 local f = io.popen(cmd .. " usershow " .. pwd.name .. " -7 2> /dev/null") 98 if not pwd.gecos then 99 pwd.gecos = pwd.name .. " User" 101 if not pwd.homedir then 102 pwd.homedir = "/home/" .. pwd.name 105 if pwd.groups then 106 local list = splitlist(pwd.groups) 111 if pwd.primary_group and pwd.primary_group ~= pwd.name then [all …]
|
/freebsd/crypto/heimdal/appl/login/ |
H A D | login.c | 142 otp_verify(struct passwd *pwd, const char *password) in otp_verify() argument 156 krb5_verify(struct passwd *pwd, const char *password) in krb5_verify() argument 161 ret = krb5_parse_name(context, pwd->pw_name, &princ); in krb5_verify() 180 krb5_start_session (const struct passwd *pwd) in krb5_start_session() argument 187 (unsigned)pwd->pw_uid); in krb5_start_session() 208 krb5_get_afs_tokens (const struct passwd *pwd) in krb5_get_afs_tokens() argument 220 pw_dir = pwd->pw_dir; in krb5_get_afs_tokens() 229 cell, NULL, pwd->pw_uid, pwd->pw_dir); in krb5_get_afs_tokens() 231 pwd->pw_uid, pwd->pw_dir); in krb5_get_afs_tokens() 309 * Actually log in the user. `pwd' contains all the relevant [all …]
|
/freebsd/lib/nss_tacplus/ |
H A D | nss_tacplus.c | 20 #include <pwd.h> 112 tacplus_getpwnam_r(const char *name, struct passwd *pwd, char *buffer, in tacplus_getpwnam_r() argument 150 memset(pwd, 0, sizeof(*pwd)); in tacplus_getpwnam_r() 153 pwd->pw_name = tacplus_copystr(name, &buffer, &bufsize); in tacplus_getpwnam_r() 154 if (pwd->pw_name == NULL) in tacplus_getpwnam_r() 158 pwd->pw_passwd = tacplus_copystr("*", &buffer, &bufsize); in tacplus_getpwnam_r() 163 pwd->pw_uid = DEF_UID; in tacplus_getpwnam_r() 164 pwd->pw_gid = DEF_GID; in tacplus_getpwnam_r() 186 pwd->pw_uid = num; in tacplus_getpwnam_r() 195 pwd->pw_gid = num; in tacplus_getpwnam_r() [all …]
|
/freebsd/lib/libutil/ |
H A D | login_class.c | 39 #include <pwd.h> 140 substvar(const char * var, const struct passwd * pwd, int hlen, int pch, int nlen) in substvar() argument 150 if (pwd != NULL) { in substvar() 164 if (pwd != NULL) { in substvar() 177 memmove(p, pwd->pw_dir, hlen); in substvar() 184 memmove(p, pwd->pw_name, nlen); in substvar() 197 setclassenvironment(login_cap_t *lc, const struct passwd * pwd, int paths) in setclassenvironment() argument 200 int hlen = pwd ? strlen(pwd->pw_dir) : 0; in setclassenvironment() 201 int nlen = pwd ? strlen(pwd->pw_name) : 0; in setclassenvironment() 204 if (hlen && pwd->pw_dir[hlen-1] != '/') in setclassenvironment() [all …]
|
/freebsd/lib/libc/gen/ |
H A D | getpwent.c | 52 #include <pwd.h> 73 /* Counter as stored in /etc/pwd.db */ 259 struct passwd *pwd; in pwd_marshal_func() local 281 pwd = va_arg(ap, struct passwd *); in pwd_marshal_func() 286 strlen(pwd->pw_name) + 1; in pwd_marshal_func() 287 if (pwd->pw_passwd != NULL) in pwd_marshal_func() 288 desired_size += strlen(pwd->pw_passwd) + 1; in pwd_marshal_func() 289 if (pwd->pw_class != NULL) in pwd_marshal_func() 290 desired_size += strlen(pwd->pw_class) + 1; in pwd_marshal_func() 291 if (pwd->pw_gecos != NULL) in pwd_marshal_func() [all …]
|
/freebsd/libexec/nuageinit/tests/ |
H A D | nuageinit.sh | 7 export NUAGE_FAKE_ROOTDIR="$PWD" 34 …atf_check -s exit:1 -e match:"nuageinit: error parsing nocloud.*" /usr/libexec/nuageinit "${PWD}"/… 35 printf "instance-id: iid-local01\nlocal-hostname: cloudimg\n" > "${PWD}"/media/nuageinit/meta-data 36 atf_check -s exit:0 /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud 42 atf_check -s exit:0 /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud 49 printf "instance-id: iid-local01\n" > "${PWD}"/media/nuageinit/meta-data 50 printf "#!/bin/sh\necho yeah\n" > "${PWD}"/media/nuageinit/user-data 51 chmod 755 "${PWD}"/media/nuageinit/user-data 52 atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud 58 printf "instance-id: iid-local01\n" > "${PWD}"/media/nuageinit/meta-data [all …]
|
/freebsd/contrib/wpa/src/eap_peer/ |
H A D | eap_pwd.c | 2 * EAP peer method: EAP-pwd (RFC 5931) 66 return "PWD-ID-Req"; in eap_pwd_state_txt() 68 return "PWD-Commit-Req"; in eap_pwd_state_txt() 70 return "PWD-Confirm-Req"; in eap_pwd_state_txt() 78 return "PWD-UNK"; in eap_pwd_state_txt() 86 wpa_printf(MSG_DEBUG, "EAP-PWD: %s -> %s", in eap_pwd_state() 103 wpa_printf(MSG_INFO, "EAP-PWD: No password configured!"); in eap_pwd_init() 109 wpa_printf(MSG_INFO, "EAP-PWD: No identity configured!"); in eap_pwd_init() 114 wpa_printf(MSG_INFO, "EAP-PWD: memory allocation data fail"); in eap_pwd_init() 119 wpa_printf(MSG_INFO, "EAP-PWD: memory allocation id fail"); in eap_pwd_init() [all …]
|
/freebsd/usr.sbin/jexec/ |
H A D | jexec.c | 44 #include <pwd.h> 63 const struct passwd *pwd = NULL; in main() local 103 get_user_info(username, &pwd, &lcap); in main() 118 get_user_info(username, &pwd, &lcap); in main() 127 if (setgid(pwd->pw_gid) != 0) in main() 129 if (setusercontext(lcap, pwd, pwd->pw_uid, username in main() 134 setenv("USER", pwd->pw_name, 1); in main() 135 setenv("HOME", pwd->pw_dir, 1); in main() 137 *pwd->pw_shell ? pwd->pw_shell : _PATH_BSHELL, 1); in main() 138 if (clean && username && !dflag && chdir(pwd->pw_dir) < 0) in main() [all …]
|
/freebsd/bin/sh/tests/parameters/ |
H A D | pwd2.0 | 1 # Check that PWD is exported and accepted from the environment. 7 TP=$(pwd) 11 [ "$PWD" = "$TP/link" ] 12 [ "$(pwd)" = "$TP/link" ] 13 [ "$(pwd -P)" = "$TP/test1" ] 14 [ "$(${SH} -c pwd)" = "$TP/link" ] 15 [ "$(${SH} -c pwd\ -P)" = "$TP/test1" ] 17 [ "$(pwd)" = "$TP" ] 19 [ "$PWD" = "$TP/test1" ] 20 [ "$(pwd)" = "$TP/test1" ] [all …]
|
H A D | pwd1.0 | 1 # Check that bogus PWD values are not accepted from the environment. 5 [ "$(PWD=foo ${SH} -c 'pwd')" = / ] || : $((failures += 1)) 6 [ "$(PWD=/var/empty ${SH} -c 'pwd')" = / ] || : $((failures += 1)) 7 [ "$(PWD=/var/empty/foo ${SH} -c 'pwd')" = / ] || : $((failures += 1)) 8 [ "$(PWD=/bin/ls ${SH} -c 'pwd')" = / ] || : $((failures += 1))
|
/freebsd/contrib/netbsd-tests/lib/librumphijack/ |
H A D | h_cwd.c | 43 static char pwd[1024]; variable 84 if (getcwd(pwd, sizeof(pwd)) == NULL) in simple() 86 if (strcmp(pwd, prefix) != 0) in simple() 92 if (getcwd(pwd, sizeof(pwd)) == NULL) in simple() 94 if (strcmp(pwd, makepath("dir")) != 0) in simple() 100 if (getcwd(pwd, sizeof(pwd)) == NULL) in simple() 102 if (strcmp(pwd, makepath("dir/dir")) != 0) in simple() 106 if (getcwd(pwd, sizeof(pwd)) == NULL) in simple() 108 if (strcmp(pwd, makepath("dir")) != 0) in simple() 113 if (getcwd(pwd, sizeof(pwd)) == NULL) in simple() [all …]
|
/freebsd/lib/libpam/modules/pam_unix/ |
H A D | pam_unix.c | 47 #include <pwd.h> 91 struct passwd *pwd; in pam_sm_authenticate() local 103 pwd = getpwnam(user); in pam_sm_authenticate() 107 if (pwd != NULL) { in pam_sm_authenticate() 109 realpw = pwd->pw_passwd; in pam_sm_authenticate() 126 lc = login_getpwclass(pwd); in pam_sm_authenticate() 165 struct passwd *pwd; in pam_sm_acct_mgmt() local 178 if (user == NULL || (pwd = getpwnam(user)) == NULL) in pam_sm_acct_mgmt() 191 if (*pwd->pw_passwd == '\0' && in pam_sm_acct_mgmt() 195 if (strncmp(pwd->pw_passwd, LOCKED_PREFIX, LOCKED_PREFIX_LEN) == 0) in pam_sm_acct_mgmt() [all …]
|
/freebsd/contrib/wpa/src/eap_server/ |
H A D | eap_server_pwd.c | 2 * hostapd / EAP-pwd (RFC 5931) server 62 return "PWD-ID-Req"; in eap_pwd_state_txt() 64 return "PWD-Commit-Req"; in eap_pwd_state_txt() 66 return "PWD-Confirm-Req"; in eap_pwd_state_txt() 72 return "PWD-Unk"; in eap_pwd_state_txt() 79 wpa_printf(MSG_DEBUG, "EAP-pwd: %s -> %s", in eap_pwd_state() 91 wpa_printf(MSG_INFO, "EAP-PWD (server): Password is not " in eap_pwd_init() 101 wpa_printf(MSG_DEBUG, "EAP-pwd: Selected group number %d", in eap_pwd_init() 111 wpa_printf(MSG_INFO, "EAP-PWD: Memory allocation password " in eap_pwd_init() 126 "EAP-pwd: Memory allocation of salt failed"); in eap_pwd_init() [all …]
|
/freebsd/crypto/openssl/ |
H A D | NOTES-NONSTOP.md | 215 assumes that your PWD is set according to your installation standards. 217 ./Configure nonstop-nsx --prefix=${PWD} \ 218 --openssldir=${PWD}/ssl no-threads \ 220 ./Configure nonstop-nsx_g --prefix=${PWD} \ 221 --openssldir=${PWD}/ssl no-threads \ 223 ./Configure nonstop-nsx_put --prefix=${PWD} \ 224 --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 226 ./Configure nonstop-nsx_spt_floss --prefix=${PWD} \ 227 --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 229 ./Configure nonstop-nsx_64 --prefix=${PWD} \ [all …]
|
/freebsd/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) in ypclnt_passwd() argument 122 return (yppasswd_remote(ypclnt, pwd, passwd)); in ypclnt_passwd() 124 return (yppasswd_local(ypclnt, pwd)); in ypclnt_passwd() 137 yppasswd_local(ypclnt_t *ypclnt, const struct passwd *pwd) in yppasswd_local() argument 148 yppwd.newpw.pw_uid = pwd->pw_uid; in yppasswd_local() 149 yppwd.newpw.pw_gid = pwd->pw_gid; in yppasswd_local() 150 yppwd.newpw.pw_change = pwd->pw_change; in yppasswd_local() 151 yppwd.newpw.pw_expire = pwd->pw_expire; in yppasswd_local() 152 yppwd.newpw.pw_fields = pwd->pw_fields; in yppasswd_local() [all …]
|
/freebsd/usr.sbin/pwd_mkdb/ |
H A D | pwd_mkdb.c | 43 #include <pwd.h> 69 static struct passwd pwd; /* password structure */ variable 190 while (scan(fp, &pwd)) in main() 191 if (!is_comment && strlen(pwd.pw_name) >= MAXLOGNAME) { in main() 192 warnx("%s: username too long", pwd.pw_name); in main() 341 for (cnt = 1; scan(fp, &pwd); ++cnt) { in main() 343 (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-')) { in main() 360 (!username || (strcmp(username, pwd.pw_name) == 0))) { in main() 363 COMPACT(pwd.pw_name); in main() 365 SCALAR(pwd.pw_uid); in main() [all …]
|
/freebsd/usr.bin/env/tests/ |
H A D | env_test.sh | 87 env -P "${PWD}" 91 env -P "${PWD}" magic_words 103 atf_check -o match:"^${PWD}/magic=words$" \ 104 env "${PWD}/magic=words" 106 env -P "${PATH}:${PWD}" "magic=words" 108 env command "${PWD}/magic=words" 110 env PATH="${PATH}:${PWD}" command "magic=words" 121 atf_check -o inline:"${PWD}\n" \ 122 env pwd 127 env -C "${subdir}" pwd [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_pwhash/argon2/ |
H A D | argon2.c | 87 const uint32_t parallelism, const void *pwd, const size_t pwdlen, in argon2_hash() argument 115 context.pwd = (uint8_t *) pwd; in argon2_hash() 160 const uint32_t parallelism, const void *pwd, in argon2i_hash_encoded() argument 165 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, in argon2i_hash_encoded() 171 const uint32_t parallelism, const void *pwd, in argon2i_hash_raw() argument 175 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, in argon2i_hash_raw() 181 const uint32_t parallelism, const void *pwd, in argon2id_hash_encoded() argument 186 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, in argon2id_hash_encoded() 192 const uint32_t parallelism, const void *pwd, in argon2id_hash_raw() argument 196 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, in argon2id_hash_raw() [all …]
|
/freebsd/bin/sh/tests/builtins/ |
H A D | cd1.0 | 11 [ "$PWD" = "$P" ] 12 [ "$(pwd)" = "$P" ] 14 [ "$PWD" = "$P" ] 15 [ "$(pwd)" = "$P" ] 23 (cd -L 1/../1 && [ "$(pwd -L)" = "$P/$T/1" ]) 24 (cd -L link1 && [ "$(pwd -L)" = "$P/$T/link1" ]) 25 (cd -L link1 && [ "$(pwd -P)" = "$P/$T/1/2" ]) 26 (cd -P link1 && [ "$(pwd -L)" = "$P/$T/1/2" ]) 27 (cd -P link1 && [ "$(pwd -P)" = "$P/$T/1/2" ])
|
/freebsd/usr.sbin/syslogd/tests/ |
H A D | syslogd_forwarded_format_test.sh | 52 local logfile="${PWD}/${format}_forwarded.log" 53 local pcapfile="${PWD}/${format}_forwarded.pcap" 79 local logfile="${PWD}/${format}_forwarded.log" 80 local pcapfile="${PWD}/${format}_forwarded.pcap" 106 local logfile="${PWD}/${format}_forwarded.log" 107 local pcapfile="${PWD}/${format}_forwarded.pcap" 131 local logfile="${PWD}/${format}_forwarded.log" 132 local pcapfile="${PWD}/${format}_forwarded.pcap" 156 local logfile="${PWD}/${format}_forwarded.log" 157 local pcapfile="${PWD}/${format}_forwarded.pcap" [all …]
|