HomeSort by: relevance | last modified time | path
    Searched refs:pwd (Results 1 - 25 of 295) sorted by relevancy

1 2 3 4 5 6 7 8 91011>>

  /src/tools/compat/
setpassent.c 6 #include <pwd.h>
  /src/tests/lib/librumphijack/
h_cwd.c 43 static char pwd[1024]; variable in typeref:typename:char[1024]
84 if (getcwd(pwd, sizeof(pwd)) == NULL)
86 if (strcmp(pwd, prefix) != 0)
92 if (getcwd(pwd, sizeof(pwd)) == NULL)
94 if (strcmp(pwd, makepath("dir")) != 0)
100 if (getcwd(pwd, sizeof(pwd)) == NULL)
102 if (strcmp(pwd, makepath("dir/dir")) != 0
    [all...]
  /src/usr.bin/newgrp/
newgrp.c 43 #include <pwd.h>
66 struct passwd *pwd; local in function:main
76 pwd = getpwuid(uid);
77 if (pwd == NULL)
81 if ((lc = login_getclass(pwd->pw_class)) == NULL)
82 errx(EXIT_FAILURE, "%s: unknown login class", pwd->pw_class);
106 pwd->pw_gid = newgrp(*argv, pwd);
107 addgrp(pwd->pw_gid);
108 if (setgid(pwd->pw_gid) < 0
    [all...]
grutil.c 38 #include <pwd.h>
112 struct passwd *pwd; local in function:addgid
114 pwd = getpwuid(getuid());
115 if (pwd == NULL)
117 pgid = pwd->pw_gid;
207 newgrp(const char *gname, struct passwd *pwd, uid_t ruid, const char *prompt)
216 return pwd->pw_gid;
235 if (ruid == 0 || pwd->pw_gid == grp->gr_gid)
253 if (strcmp(*ap, pwd->pw_name) == 0)
286 const char *gname, struct passwd *pwd, uid_t ruid, const char *prompt
    [all...]
  /src/bin/pwd/
pwd.c 1 /* $NetBSD: pwd.c,v 1.23 2021/11/16 16:57:15 kre Exp $ */
40 static char sccsid[] = "@(#)pwd.c 8.3 (Berkeley) 4/1/94";
42 __RCSID("$NetBSD: pwd.c,v 1.23 2021/11/16 16:57:15 kre Exp $");
66 * (Some scripts run /bin/pwd in order to get 'pwd -P'.)
121 char *pwd; local in function:getcwd_logical
124 /* Check $PWD -- if it's right, it's fast. */
125 pwd = getenv("PWD");
126 if (pwd == NULL
    [all...]
  /src/usr.bin/make/unit-tests/
varname-pwd.mk 1 # $NetBSD: varname-pwd.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
3 # Tests for the special PWD variable.
  /src/distrib/utils/libhack/
getpwent.c 66 #include <pwd.h>
98 struct passwd **pwd)
106 *pwd = NULL;
108 *pwd = pwres;
115 struct passwd *pwd; local in function:getpwnam
117 &pwd) == 0 ? pwd : NULL;
122 struct passwd **pwd)
132 *pwd = NULL;
134 *pwd = pwres
141 struct passwd *pwd; local in function:getpwuid
    [all...]
  /src/usr.bin/su/
su.c 53 #include <pwd.h>
105 struct passwd *pwd; local in function:main
186 if (username == NULL || (pwd = getpwnam(username)) == NULL ||
187 pwd->pw_uid != ruid)
188 pwd = getpwuid(ruid);
189 if (pwd == NULL)
191 username = estrdup(pwd->pw_name);
193 userpass = estrdup(pwd->pw_passwd);
197 if (pwd->pw_shell && *pwd->pw_shell)
    [all...]
su_pam.c 54 #include <pwd.h>
102 struct passwd *pwd, pwres; local in function:main
181 getpwnam_r(username, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
182 pwd == NULL || pwd->pw_uid != ruid) {
183 if (getpwuid_r(ruid, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0)
184 pwd = NULL;
186 if (pwd == NULL)
188 username = estrdup(pwd->pw_name);
191 if (pwd->pw_shell && *pwd->pw_shell)
    [all...]
  /src/lib/libpam/modules/pam_unix/
pam_unix.c 52 #include <pwd.h>
88 struct passwd *pwd, pwres; local in function:pam_sm_authenticate
93 pwd = NULL;
96 &pwd);
102 (void) getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd);
105 if (pwd != NULL) {
107 realpw = pwd->pw_passwd;
118 lc = login_getpwclass(pwd);
148 struct passwd *pwd, pwres; local in function:pam_sm_acct_mgmt
161 getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 |
407 struct passwd *pwd, new_pwd, old_pwd; local in function:pam_sm_chauthtok
    [all...]
  /src/lib/libpam/modules/pam_chroot/
pam_chroot.c 46 #include <pwd.h>
63 struct passwd *pwd, pwres; local in function:pam_sm_open_session
69 getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
70 pwd == NULL)
72 if (pwd->pw_uid == 0 && !openpam_get_option(pamh, "also_root"))
74 if (pwd->pw_dir == NULL)
76 if ((end = strstr(pwd->pw_dir, "/./")) != NULL) {
78 (int)(end - pwd->pw_dir), pwd->pw_dir) > (int)sizeof(buf)) {
  /src/usr.bin/login/
login_pam.c 62 #include <pwd.h>
251 if (failures > (pwd ? 0 : 1))
293 pwd = NULL;
294 (void)getpwnam_r(username, &pwres, pwbuf, sizeof(pwbuf), &pwd);
298 * within the next block. pwd can be NULL since it
301 lc = login_getclass(pwd ? pwd->pw_class : NULL);
309 if (pwd) {
310 if (pwd->pw_uid == 0)
313 if (fflag && (uid == 0 || uid == pwd->pw_uid))
    [all...]
login.c 62 #include <pwd.h>
342 if (failures > (pwd ? 0 : 1))
348 pwd = getpwnam(username);
353 * within the next block. pwd can be NULL since it
356 lc = login_getclass(pwd ? pwd->pw_class : NULL);
364 if (pwd) {
365 if (pwd->pw_uid == 0)
368 if (fflag && (uid == 0 || uid == pwd->pw_uid)) {
375 } else if (pwd->pw_passwd[0] == '\0')
    [all...]
  /src/lib/libpam/modules/pam_group/
pam_group.c 47 #include <pwd.h>
73 struct passwd *pwd, pwres; local in function:pam_sm_authenticate
83 getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
84 pwd == NULL)
86 if (pwd->pw_uid != 0 && openpam_get_option(pamh, "root_only"))
92 getpwnam_r(ruser, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
93 pwd == NULL)
110 if (pwd->pw_gid == grp->gr_gid)
113 if (strcmp(*list, pwd->pw_name) == 0)
130 if ((pam_err = authenticate(pamh, pwd, flags)) != PAM_SUCCESS
    [all...]
  /src/libexec/rexecd/
rexecd.c 56 #include <pwd.h>
151 struct passwd *pwd, pwres; local in function:doit
222 if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
223 pwd == NULL) {
245 if (*pwd->pw_passwd != '\0') {
246 namep = crypt(pass, pwd->pw_passwd);
247 if (strcmp(namep, pwd->pw_passwd) != 0) {
257 if (chdir(pwd->pw_dir) < 0) {
259 syslog(LOG_ERR, "%s does not exist for %s", pwd->pw_dir,
321 if (*pwd->pw_shell == '\0'
    [all...]
  /src/lib/libpam/modules/pam_securetty/
pam_securetty.c 48 #include <pwd.h>
65 struct passwd *pwd, pwres; local in function:pam_sm_acct_mgmt
78 getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
79 pwd == NULL)
85 if (pwd->pw_uid != 0)
112 pwd->pw_name, (const char *)hostname,
117 pwd->pw_name, (const char *)tty);
  /src/lib/libpam/modules/pam_rhosts/
pam_rhosts.c 46 #include <pwd.h>
62 struct passwd *pwd, pwres; local in function:pam_sm_authenticate
72 if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
73 pwd == NULL)
75 if (pwd->pw_uid == 0 &&
  /src/lib/libpam/modules/pam_self/
pam_self.c 48 #include <pwd.h>
63 struct passwd *pwd, pwres; local in function:pam_sm_authenticate
73 getpwnam_r(luser, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
74 pwd == NULL)
81 if (uid == (uid_t)pwd->pw_uid)
  /src/lib/libpam/modules/pam_nologin/
pam_nologin.c 51 #include <pwd.h>
73 struct passwd *pwd, pwres; local in function:pam_sm_authenticate
95 if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
96 pwd == NULL) {
99 if (pwd->pw_uid == 0)
103 lc = login_getpwclass(pwd);
  /src/tests/kernel/kqueue/
t_proc2.c 43 #include <pwd.h>
62 struct passwd *pwd; local in function:child_one
65 pwd = getpwnam(nam);
66 if (pwd == NULL)
69 if ((setuid(pwd->pw_uid)) == -1)
70 err(EXIT_FAILURE, "setuid(%d)", pwd->pw_uid);
  /src/lib/libutil/compat/
compat_gepwconf.c 48 #include <pwd.h>
49 #include <compat/include/pwd.h>
55 "include <pwd.h> to generate correct reference")
compat_login_cap.c 44 #include <pwd.h>
45 #include <compat/include/pwd.h>
  /src/usr.sbin/pwd_mkdb/
pwd_mkdb.c 99 #include <pwd.h>
257 struct passwd pwd, *tpwd; local in function:main
432 for (lineno = 0; scan(fp, &pwd, &flags, &lineno);) {
438 pwd.pw_name, pwd.pw_uid, pwd.pw_gid, pwd.pw_gecos,
439 pwd.pw_dir, pwd.pw_shell);
446 if (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-'
811 struct passwd pwd; local in function:putdbents
933 static struct passwd pwd; local in function:getdbent
    [all...]
  /src/lib/libc/compat/gen/
compat___glob13.c 8 #include <pwd.h>
  /src/lib/libpam/modules/pam_ssh/
pam_ssh.c 50 #include <pwd.h>
169 struct passwd *pwd, pwres; local in function:pam_sm_authenticate
183 if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
184 pwd == NULL)
186 if (pwd->pw_dir == NULL)
200 pam_err = openpam_borrow_cred(pamh, pwd);
206 psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase, nullok);
284 pam_ssh_start_agent(pam_handle_t *pamh, struct passwd *pwd)
308 if (setgid(pwd->pw_gid) == -1) {
310 __func__, (int)pwd->pw_gid, strerror(errno))
417 struct passwd *pwd, pwres; local in function:pam_sm_open_session
    [all...]

Completed in 121 milliseconds

1 2 3 4 5 6 7 8 91011>>