Searched refs:pwd (Results 1 - 25 of 431) sorted by relevance

1234567891011>>

/freebsd-10.0-release/crypto/heimdal/lib/roken/
H A Dget_default_username.c64 struct passwd *pwd; local
67 pwd = k_getpwnam (user);
68 if (pwd != NULL && pwd->pw_uid == uid)
71 pwd = k_getpwuid (uid);
72 if (pwd != NULL)
73 return pwd->pw_name;
/freebsd-10.0-release/lib/libcompat/4.4/
H A Dcuserid.c36 #include <pwd.h>
44 struct passwd *pwd; local
46 if ((pwd = getpwuid(geteuid())) == NULL) {
52 (void)strncpy(s, pwd->pw_name, L_cuserid);
55 return (pwd->pw_name);
/freebsd-10.0-release/contrib/top/
H A Dusername.c36 #include <pwd.h>
89 struct passwd *pwd; local
95 if ((pwd = getpwnam(username)) == NULL)
101 enter_user(pwd->pw_uid, username, 1);
104 return(pwd->pw_uid);
148 struct passwd *pwd; local
152 if ((pwd = getpwuid(uid)) != NULL)
154 return(enter_user(pwd->pw_uid, pwd->pw_name, 1));
175 while ((pwd
[all...]
/freebsd-10.0-release/usr.bin/logins/
H A Dlogins.c36 #include <pwd.h>
205 struct passwd *pwd; local
213 if ((pwd = getpwent()) == NULL)
215 pwds[npwds].pw_name = xstrdup(pwd->pw_name);
216 pwds[npwds].pw_passwd = xstrdup(pwd->pw_passwd);
217 pwds[npwds].pw_uid = pwd->pw_uid;
218 pwds[npwds].pw_gid = pwd->pw_gid;
219 pwds[npwds].pw_change = pwd->pw_change;
220 pwds[npwds].pw_class = xstrdup(pwd->pw_class);
221 pwds[npwds].pw_gecos = xstrdup(pwd
236 struct xpasswd *pwd; local
293 display_user(struct xpasswd *pwd) argument
331 struct xpasswd *pwd; local
[all...]
/freebsd-10.0-release/tools/regression/lib/libc/nss/
H A Dtest-getpw.c33 #include <pwd.h>
127 free_passwd(struct passwd *pwd) argument
129 free(pwd->pw_name);
130 free(pwd->pw_passwd);
131 free(pwd->pw_class);
132 free(pwd->pw_gecos);
133 free(pwd->pw_dir);
134 free(pwd->pw_shell);
138 sdump_passwd(struct passwd *pwd, char *buffer, size_t buflen) argument
141 pwd
147 dump_passwd(struct passwd *pwd) argument
158 passwd_read_snapshot_func(struct passwd *pwd, char *line) argument
239 struct passwd *pwd; local
254 passwd_test_correctness(struct passwd *pwd, void *mdata) argument
297 passwd_check_ambiguity(struct passwd_test_data *td, struct passwd *pwd) argument
307 struct passwd *pwd; local
337 struct passwd *pwd; local
360 passwd_test_getpwent(struct passwd *pwd, void *mdata) argument
[all...]
/freebsd-10.0-release/crypto/heimdal/lib/gssapi/krb5/
H A Dpname_to_uid.c51 struct passwd pw, *pwd;
53 struct passwd *pwd;
68 if (getpwnam_r(localname, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0) {
73 pwd = getpwnam(localname);
76 if (pwd == NULL) {
81 *uidp = pwd->pw_uid;
/freebsd-10.0-release/contrib/openpam/lib/libpam/
H A Dopenpam_borrow_cred.c46 #include <pwd.h>
63 const struct passwd *pwd)
69 ENTERI(pwd->pw_uid);
76 if (geteuid() != 0 && geteuid() != pwd->pw_uid) {
97 if (geteuid() == pwd->pw_uid)
99 if (initgroups(pwd->pw_name, pwd->pw_gid) < 0 ||
100 setegid(pwd->pw_gid) < 0 || seteuid(pwd->pw_uid) < 0) {
118 * switches to those of the user specified by its =pwd argumen
62 openpam_borrow_cred(pam_handle_t *pamh, const struct passwd *pwd) argument
[all...]
/freebsd-10.0-release/crypto/heimdal/appl/login/
H A Dlogin.c142 otp_verify(struct passwd *pwd, const char *password) argument
156 krb5_verify(struct passwd *pwd, const char *password) argument
161 ret = krb5_parse_name(context, pwd->pw_name, &princ);
180 krb5_start_session (const struct passwd *pwd) argument
187 (unsigned)pwd->pw_uid);
208 krb5_get_afs_tokens (const struct passwd *pwd) argument
220 pw_dir = pwd->pw_dir;
229 cell, NULL, pwd->pw_uid, pwd->pw_dir);
231 pwd
315 do_login(const struct passwd *pwd, char *tty, char *ttyn) argument
518 check_password(struct passwd *pwd, const char *password) argument
640 struct passwd *pwd; local
[all...]
/freebsd-10.0-release/crypto/openssh/openbsd-compat/
H A Dport-solaris.h23 #include <pwd.h>
/freebsd-10.0-release/crypto/openssl/util/
H A Dfiles.pl40 $pwd=`pwd`; chop($pwd);
49 @_=split(/\//,$pwd);
H A Dmklink.pl24 my $pwd = getcwd();
25 chomp($pwd);
26 my @pwd_path = split(/[\\\/]/, $pwd);
34 # @pwd_path (interpreted is an absolute path) to the original pwd.
36 # At the end, @from_path (as a relative path from the original pwd)
38 # which means that @to_path then is a path from there to the original pwd.
/freebsd-10.0-release/usr.bin/login/
H A Dlogin.h37 extern struct passwd *pwd;
/freebsd-10.0-release/usr.sbin/pw/
H A Dpw_nis.c37 #include <pwd.h>
43 pw_nisupdate(const char * path, struct passwd * pwd, char const * user) argument
49 if (pwd != NULL)
50 pw = pw_dup(pwd);
81 addnispwent(const char *path, struct passwd * pwd) argument
83 return pw_nisupdate(path, pwd, NULL);
87 chgnispwent(const char *path, char const * login, struct passwd * pwd) argument
89 return pw_nisupdate(path, pwd, login);
H A Dpw_user.c45 #include <pwd.h>
55 static int print_user(struct passwd * pwd, int pretty, int v7);
108 struct passwd *pwd = NULL; local
299 while ((pwd = GETPWENT()) != NULL)
300 print_user(pwd, pretty, v7);
306 pwd = GETPWNAM(pw_checkname((u_char *)a_name->val, 0));
318 if (mode != M_ADD && pwd == NULL
332 if (a_name == NULL && pwd == NULL) /* Try harder */
333 pwd = GETPWUID(atoi(a_uid->val));
335 if (pwd
834 struct passwd *pwd; local
1121 print_user(struct passwd * pwd, int pretty, int v7) argument
[all...]
H A Dpwupd.c37 #include <pwd.h>
111 pw_update(struct passwd * pwd, char const * user) argument
129 if (pwd != NULL)
130 pw = pw_dup(pwd);
164 addpwent(struct passwd * pwd) argument
166 return pw_update(pwd, NULL);
170 chgpwent(char const * login, struct passwd * pwd) argument
172 return pw_update(pwd, login);
176 delpwent(struct passwd * pwd) argument
180 strlcpy(login, pwd
[all...]
/freebsd-10.0-release/lib/libpam/modules/pam_unix/
H A Dpam_unix.c48 #include <pwd.h>
92 struct passwd *pwd; local
103 pwd = getpwnam(user);
107 if (pwd != NULL) {
109 realpw = pwd->pw_passwd;
116 lc = login_getpwclass(pwd);
151 struct passwd *pwd; local
164 if (user == NULL || (pwd = getpwnam(user)) == NULL)
177 if (*pwd->pw_passwd == '\0' &&
181 if (strncmp(pwd
274 struct passwd *pwd, *old_pwd; local
[all...]
/freebsd-10.0-release/contrib/binutils/libiberty/
H A Dgetpwd.c70 static char *pwd; local
73 char *p = pwd;
103 pwd = p;
117 static char *pwd = 0; local
119 if (!pwd)
120 pwd = getcwd (XNEWVEC (char, MAXPATHLEN + 1), MAXPATHLEN + 1
125 return pwd;
/freebsd-10.0-release/contrib/gcclibs/libiberty/
H A Dgetpwd.c70 static char *pwd; local
73 char *p = pwd;
103 pwd = p;
117 static char *pwd = 0; local
119 if (!pwd)
120 pwd = getcwd (XNEWVEC (char, MAXPATHLEN + 1), MAXPATHLEN + 1
125 return pwd;
/freebsd-10.0-release/tools/regression/mlock/
H A Dmlock.c34 #include <pwd.h>
50 struct passwd *pwd; local
58 pwd = getpwnam(NOBODY);
59 if (pwd == NULL && errno == 0)
61 if (pwd == NULL)
63 if (pwd->pw_uid == 0)
77 if (seteuid(pwd->pw_uid) < 0)
/freebsd-10.0-release/usr.bin/passwd/
H A Dpasswd.c41 #include <pwd.h>
70 struct passwd *pwd = NULL; /* Keep compiler happy. */ local
98 if ((pwd = getpwuid(uid)) == NULL)
102 if ((pwd = getpwnam(*argv)) == NULL)
109 if (uid != 0 && uid != pwd->pw_uid)
113 switch (pwd->pw_fields & _PWF_SOURCE) {
116 pwd->pw_name);
120 pwd->pw_name);
140 pam_err = pam_start("passwd", pwd->pw_name, &pamc, &pamh);
/freebsd-10.0-release/lib/libpam/modules/pam_self/
H A Dpam_self.c42 #include <pwd.h>
58 struct passwd *pwd; local
66 if (luser == NULL || (pwd = getpwnam(luser)) == NULL)
73 if (uid == (uid_t)pwd->pw_uid)
/freebsd-10.0-release/crypto/openssh/
H A Dplatform.h21 #include <pwd.h>
/freebsd-10.0-release/lib/libpam/modules/pam_chroot/
H A Dpam_chroot.c40 #include <pwd.h>
56 struct passwd *pwd; local
60 user == NULL || (pwd = getpwnam(user)) == NULL)
62 if (pwd->pw_uid == 0 && !openpam_get_option(pamh, "also_root"))
64 if (pwd->pw_dir == NULL)
66 if ((end = strstr(pwd->pw_dir, "/./")) != NULL) {
68 (int)(end - pwd->pw_dir), pwd->pw_dir) > (int)sizeof(buf)) {
/freebsd-10.0-release/lib/libutil/
H A Dlogin_class.c42 #include <pwd.h>
139 substvar(const char * var, const struct passwd * pwd, int hlen, int pch, int nlen) argument
149 if (pwd != NULL) {
163 if (pwd != NULL) {
176 memmove(p, pwd->pw_dir, hlen);
183 memmove(p, pwd->pw_name, nlen);
196 setclassenvironment(login_cap_t *lc, const struct passwd * pwd, int paths) argument
199 int hlen = pwd ? strlen(pwd->pw_dir) : 0;
200 int nlen = pwd
384 setlogincontext(login_cap_t *lc, const struct passwd *pwd, mode_t mymask, unsigned long flags) argument
424 setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned int flags) argument
[all...]
/freebsd-10.0-release/lib/libpam/modules/pam_group/
H A Dpam_group.c42 #include <pwd.h>
64 struct passwd *pwd; local
69 user == NULL || (pwd = getpwnam(user)) == NULL)
71 if (pwd->pw_uid != 0 && openpam_get_option(pamh, "root_only"))
89 ruser == NULL || (pwd = getpwnam(ruser)) == NULL)
104 if (pwd->pw_gid == grp->gr_gid)
107 if (strcmp(*list, pwd->pw_name) == 0)

Completed in 206 milliseconds

1234567891011>>