Home
last modified time | relevance | path

Searched refs:pw (Results 26 – 50 of 182) sorted by relevance

12345678

/dragonfly/usr.bin/calendar/
H A Dcalendar.c176 struct passwd *pw; in main() local
328 while ((pw = getpwent()) != NULL) { in main()
332 if (!cd_home(pw->pw_dir)) in main()
349 if (setgid(pw->pw_gid) == -1) in main()
350 err(1, "setgid(%u)", pw->pw_gid); in main()
351 if (initgroups(pw->pw_name, pw->pw_gid) == -1) in main()
352 err(1, "initgroups(%s)", pw->pw_name); in main()
353 if (setuid(pw->pw_uid) == -1) in main()
354 err(1, "setuid(%u)", pw->pw_uid); in main()
400 pw->pw_name, pw->pw_uid, user_timeout); in main()
[all …]
/dragonfly/lib/libcrypt/
H A Dcrypt.h30 char *crypt_des(const char *pw, const char *salt);
31 char *crypt_md5(const char *pw, const char *salt);
32 char *crypt_blowfish(const char *pw, const char *salt);
35 char *crypt_deprecated_sha256(const char *pw, const char *salt);
36 char *crypt_deprecated_sha512(const char *pw, const char *salt);
/dragonfly/tools/
H A Dpw-update.sh60 if pw -V ${etcdir} usershow ${_name} -q >/dev/null; then
66 if ! pw -V ${etcdir} groupshow ${_gid} -q >/dev/null; then
79 pw -V ${etcdir} useradd ${_name} \
94 if pw -V ${etcdir} groupshow ${_name} -q >/dev/null; then
98 pw -V ${etcdir} groupadd ${_name} -g ${_gid} -M "${_members}"
106 pw -V ${etcdir} usermod ${_name} -g ${_gid}
132 pw -V ${etcdir} usermod ${user} \
163 pw -V ${etcdir} groupmod ${group} -g ${_gid} -M "${_members}"
/dragonfly/crypto/openssh/
H A Dauth2-pubkey.c91 struct passwd *pw = authctxt->pw; in userauth_pubkey() local
290 if (PRIVSEP(user_key_allowed(ssh, pw, key, 0, NULL))) { in userauth_pubkey()
323 match_principals_file(struct passwd *pw, char *file, in match_principals_file() argument
332 temporarily_use_uid(pw); in match_principals_file()
517 if (match_principals_file(pw, principals_file, in user_cert_trusted_ca()
543 if (auth_authorise_keyopts(pw, cert_opts, 0, in user_cert_trusted_ca()
552 if (auth_authorise_keyopts(pw, principals_opts, 0, in user_cert_trusted_ca()
602 temporarily_use_uid(pw); in user_key_allowed2()
606 found_key = auth_check_authkeys_file(pw, f, file, in user_key_allowed2()
777 options.authorized_keys_files[i], pw); in user_key_allowed()
[all …]
H A Dsshpty.c166 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument
177 gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid; in pty_setowner()
190 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner()
193 if (st.st_uid != pw->pw_uid || st.st_gid != gid) { in pty_setowner()
194 if (chown(tty, pw->pw_uid, gid) == -1) { in pty_setowner()
196 (st.st_uid == pw->pw_uid || st.st_uid == 0)) in pty_setowner()
198 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
202 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
H A Dssh-keysign.c65 valid_request(struct passwd *pw, char *host, struct sshkey **ret, char **pkalgp, in valid_request() argument
147 if (strcmp(pw->pw_name, luser) != 0) in valid_request()
182 struct passwd *pw; in main() local
206 if ((pw = getpwuid(getuid())) == NULL) in main()
208 pw = pwcopy(pw); in main()
210 permanently_set_uid(pw); in main()
220 (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw, "", "", in main()
273 if (valid_request(pw, host, &key, &pkalg, data, dlen) < 0) in main()
H A Dmisc.c458 pwcopy(struct passwd *pw) in pwcopy() argument
463 copy->pw_passwd = xstrdup(pw->pw_passwd == NULL ? "*" : pw->pw_passwd); in pwcopy()
1139 struct passwd *pw; in tilde_expand() local
1181 slash = (len = strlen(pw->pw_dir)) == 0 || pw->pw_dir[len - 1] != '/'; in tilde_expand()
2252 return safe_path(file, &st, pw->pw_dir, pw->pw_uid, err, errlen); in safe_path_fd()
2650 if (pw == NULL && (pw = getpwuid(getuid())) == NULL) { in subprocess()
2680 drop_privs(pw); in subprocess()
2747 initgroups(pw->pw_name, pw->pw_gid) == -1) { in subprocess()
2749 pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); in subprocess()
2752 if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1) { in subprocess()
[all …]
H A Dssh-keygen.c363 pw->pw_name, hostname); in do_convert_to_ssh2()
3313 struct passwd *pw; in main() local
3348 pw = getpwuid(getuid()); in main()
3349 if (!pw) in main()
3351 pw = pwcopy(pw); in main()
3689 do_show_cert(pw); in main()
3695 do_download(pw); in main()
3708 do_fingerprint(pw); in main()
3715 do_convert_to(pw); in main()
3717 do_convert_from(pw); in main()
[all …]
H A Dauth2-hostbased.c155 if (PRIVSEP(hostbased_key_allowed(ssh, authctxt->pw, cuser, in userauth_hostbased()
176 hostbased_key_allowed(struct ssh *ssh, struct passwd *pw, in hostbased_key_allowed() argument
199 if (auth_rhosts2(pw, cuser, chost, chost) == 0) { in hostbased_key_allowed()
210 if (auth_rhosts2(pw, cuser, resolvedname, ipaddr) == 0) { in hostbased_key_allowed()
227 host_status = check_key_in_hostfiles(pw, key, lookup, in hostbased_key_allowed()
233 host_status = check_key_in_hostfiles(pw, key, lookup, in hostbased_key_allowed()
/dragonfly/lib/libc/net/
H A Drcmdsh.c70 struct passwd *pw; in rcmdsh() local
79 if ((pw = getpwnam(locuser)) == NULL) { in rcmdsh()
134 if (setuid(pw->pw_uid) == -1) { in rcmdsh()
136 pw->pw_uid, strerror(errno)); in rcmdsh()
146 if (pw->pw_shell[0] == '\0') in rcmdsh()
149 rshprog = pw->pw_shell; in rcmdsh()
/dragonfly/usr.sbin/pw/
H A DREADME2 pw is a command-line driven passwd/group editor utility that provides
8 single command `pw'.
11 defaults (see pw.conf.5), so that adding a user is as easy as issuing
12 the command "pw useradd <loginid>". Creation of a unique primary
21 $FreeBSD: src/usr.sbin/pw/README,v 1.5.2.1 2001/01/14 08:43:04 dougb Exp $
22 $DragonFly: src/usr.sbin/pw/README,v 1.2 2003/06/17 04:30:01 dillon Exp $
H A DMakefile3 PROG= pw
4 SRCS= pw.c pw_conf.c pw_user.c pw_group.c pw_log.c pw_nis.c pw_vpw.c \
9 MAN= pw.conf.5 pw.8
/dragonfly/usr.bin/getent/
H A Dgetent.c371 struct passwd *pw; in passwd() local
379 pw->pw_name, pw->pw_passwd, pw->pw_uid, \ in passwd()
380 pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell) in passwd()
385 while ((pw = getpwent()) != NULL) in passwd()
390 pw = getpwuid((uid_t)id); in passwd()
392 pw = getpwnam(argv[i]); in passwd()
393 if (pw != NULL) in passwd()
/dragonfly/usr.sbin/cron/lib/
H A Dentry.c85 struct passwd *pw, char **envp) in load_entry() argument
259 if (!pw) { in load_entry()
306 pw = getpwnam(username); in load_entry()
307 if (pw == NULL) { in load_entry()
312 pw->pw_gid = grp->gr_gid; in load_entry()
313 Debug(DPARS, ("load_entry()...uid %d, gid %d\n",pw->pw_uid,pw->pw_gid)) in load_entry()
319 if (pw->pw_expire && time(NULL) >= pw->pw_expire) { in load_entry()
324 e->uid = pw->pw_uid; in load_entry()
325 e->gid = pw->pw_gid; in load_entry()
348 sprintf(envstr, "HOME=%s", pw->pw_dir); in load_entry()
[all …]
/dragonfly/contrib/nvi2/ex/
H A Dex_cd.c35 struct passwd *pw; in ex_cd() local
59 if ((pw = getpwuid(getuid())) == NULL || in ex_cd()
60 pw->pw_dir == NULL || pw->pw_dir[0] == '\0') { in ex_cd()
65 dir = pw->pw_dir; in ex_cd()
/dragonfly/usr.sbin/sshd/
H A Dauth-passwd-custom.c45 struct passwd *pw = authctxt->pw; in sys_auth_passwd() local
49 char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; in sys_auth_passwd()
/dragonfly/games/sail/
H A Dmain.c65 struct passwd *pw; in initialize() local
87 pw = getpwuid(getuid()); in initialize()
88 if (pw != NULL) { in initialize()
89 strlcpy(myname, pw->pw_gecos, sizeof(myname)); in initialize()
102 strlcpy(myname, pw->pw_name, sizeof(myname)); in initialize()
/dragonfly/usr.bin/wall/
H A Dwall.c81 struct passwd *pw; in main() local
126 pw = getpwnam(ep->name); in main()
127 if (!pw) in main()
132 if (g->gid == pw->pw_gid) in main()
169 struct passwd *pw; in makemsg() local
190 whom = (pw = getpwuid(getuid())) ? pw->pw_name : "???"; in makemsg()
/dragonfly/contrib/libarchive/libarchive/
H A Darchive_cryptor.c50 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, in pbkdf2_sha1() argument
54 CCKeyDerivationPBKDF(kCCPBKDF2, (const char *)pw, in pbkdf2_sha1()
66 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, in pbkdf2_sha1() argument
79 (PUCHAR)(uintptr_t)pw, (ULONG)pw_len, in pbkdf2_sha1()
91 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, in pbkdf2_sha1() argument
120 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, in pbkdf2_sha1() argument
123 pbkdf2_hmac_sha1((unsigned)pw_len, (const uint8_t *)pw, rounds, in pbkdf2_sha1()
131 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, in pbkdf2_sha1() argument
135 PKCS5_PBKDF2_HMAC_SHA1(pw, pw_len, salt, salt_len, rounds, in pbkdf2_sha1()
144 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, in pbkdf2_sha1() argument
[all …]
/dragonfly/lib/libc/gen/
H A Dpwcache.c259 struct passwd *pw; in user_from_uid() local
292 if ((pw = (*_pwcache_getpwuid)(uid)) == NULL) { in user_from_uid()
309 return (pw->pw_name); in user_from_uid()
311 strlcpy(ptr->name, pw->pw_name, UNMLEN); in user_from_uid()
395 struct passwd *pw; in uid_from_user() local
435 if ((pw = (*_pwcache_getpwnam)(name)) == NULL) in uid_from_user()
437 *uid = pw->pw_uid; in uid_from_user()
441 if ((pw = (*_pwcache_getpwnam)(name)) == NULL) { in uid_from_user()
446 *uid = ptr->uid = pw->pw_uid; in uid_from_user()
/dragonfly/usr.bin/lock/
H A Dlock.c79 struct passwd *pw; in main() local
91 pw = NULL; in main()
106 if (!(pw = getpwuid(getuid()))) in main()
108 mypw = strdup(pw->pw_passwd); in main()
188 if (pw != NULL) in main()
189 printf("lock: %s using %s on %s.", pw->pw_name, in main()
/dragonfly/libexec/ftpd/
H A Dftpd.c103 struct passwd *pw; variable
1030 pw = NULL; in user()
1147 pw = NULL; in end_login()
1343 if (pw == NULL) { in pass()
1361 if (pw->pw_expire && time(NULL) >= pw->pw_expire) in pass()
1379 pw = NULL; in pass()
1408 pw->pw_name); in pass()
1410 pw = NULL; in pass()
1415 pw = NULL; in pass()
1425 initgroups(pw->pw_name, pw->pw_gid); in pass()
[all …]
/dragonfly/libexec/dma/
H A Ddma-mbox-create.c89 struct passwd *pw; in main() local
129 pw = getpwnam(user); in main()
130 if (!pw) in main()
137 user_uid = pw->pw_uid; in main()
/dragonfly/usr.bin/newkey/
H A Dnewkey.c98 struct passwd *pw; in main() local
115 pw = getpwnam(argv[2]); in main()
116 if (pw == NULL) in main()
118 (void)user2netname(name, (int)pw->pw_uid, NULL); in main()
/dragonfly/usr.sbin/authpf/
H A Dauthpf.c86 struct passwd *pw; in main() local
133 pw = getpwuid(uid); in main()
134 if (pw == NULL) { in main()
139 if ((lc = login_getclass(pw->pw_class)) != NULL) in main()
140 shell = login_getcapstr(lc, "shell", pw->pw_shell, in main()
141 pw->pw_shell); in main()
143 shell = pw->pw_shell; in main()
149 pw->pw_name, pw->pw_uid); in main()
160 if (strlcpy(luser, pw->pw_name, sizeof(luser)) >= sizeof(luser)) { in main()
161 syslog(LOG_ERR, "username too long: %s", pw->pw_name); in main()

12345678