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

1 2 3

  /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/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/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_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_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/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/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/from/
from.c 49 #include <pwd.h>
61 struct passwd *pwd; local in function:main
97 if (!(pwd = getpwuid(getuid())))
107 _PATH_MAILDIR, pwd->pw_name);
  /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/usr.bin/renice/
renice.c 48 #include <pwd.h>
96 struct passwd *pwd = getpwnam(*argv); local in function:main
98 if (pwd == NULL) {
103 who = (id_t)pwd->pw_uid;
  /src/lib/libpam/modules/pam_ftpusers/
pam_ftpusers.c 47 #include <pwd.h>
64 struct passwd *pwd, pwres; local in function:pam_sm_acct_mgmt
77 getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
78 pwd == NULL)
  /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/usr.sbin/sdpd/
main.c 41 #include <pwd.h>
172 struct passwd *pwd = getpwnam(user); local in function:drop_root
174 if (pwd == NULL) {
179 uid = pwd->pw_uid;
  /src/libexec/utmp_update/
utmp_update.c 43 #include <pwd.h>
78 struct passwd *pwd; local in function:main
127 if ((pwd = getpwuid(ruid)) == NULL)
131 if (strcmp(pwd->pw_name, utx->ut_name) != 0)
133 "`%s' in utmpx entry", pwd->pw_name, utx->ut_name);
  /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/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/sys/dev/isa/
wss.c 401 int pwd; local in function:mad_read
406 pwd = M_PASSWD_928;
409 pwd = M_PASSWD_929;
412 pwd = M_PASSWD_931;
417 bus_space_write_1(sc->sc_iot, sc->mad_ioh, MC_PASSWD_REG, pwd);
425 int pwd; local in function:mad_write
430 pwd = M_PASSWD_928;
433 pwd = M_PASSWD_929;
436 pwd = M_PASSWD_931;
441 bus_space_write_1(sc->sc_iot, sc->mad_ioh, MC_PASSWD_REG, pwd);
    [all...]
  /src/lib/libc/posix1e/
acl_to_text_nfs4.c 42 #include <pwd.h>
57 struct passwd *pwd; local in function:format_who
76 pwd = getpwuid(*id);
78 pwd = NULL;
79 if (pwd == NULL)
82 snprintf(str, size, "user:%s", pwd->pw_name);
  /src/games/warp/
intrp.c 140 struct passwd *pwd = getpwnam(tildename); local in function:filexp
142 snprintf(scrbuf, sizeof(scrbuf), "%s%s",pwd->pw_dir,s);
143 tildedir = savestr(pwd->pw_dir);
527 struct passwd *pwd = getpwuid(uid); local in function:getrealname
529 s = pwd->pw_gecos;
  /src/lib/libpam/modules/pam_lastlog/
pam_lastlog.c 58 #include <pwd.h>
117 struct passwd *pwd, pwres; local in function:pam_sm_open_session
133 getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
134 pwd == NULL)
180 lc = login_getpwclass(pwd);
189 dolastlogx(pamh, quiet, pwd, rhost, tty, ss, &now);
194 dolastlog(pamh, quiet, pwd, rhost, tty, &now);
303 dolastlogx(pam_handle_t *pamh, int quiet, const struct passwd *pwd,
309 if (getlastlogx(_PATH_LASTLOGX, pwd->pw_uid, &ll) != NULL)
327 if (updlastlogx(_PATH_LASTLOGX, pwd->pw_uid, &ll) != 0
    [all...]
  /src/sbin/dump/
dumprmt.c 56 #include <pwd.h>
110 static struct passwd *pwd = NULL; local in function:rmtgetconn
118 pwd = getpwuid(getuid());
119 if (pwd == NULL)
122 if ((name = strdup(pwd->pw_name)) == NULL)
  /src/usr.bin/write/
write.c 60 #include <pwd.h>
220 struct passwd *pwd; local in function:do_write
226 if ((pwd = getpwuid(myuid)) != NULL)
227 login = pwd->pw_name;
  /src/bin/ksh/
path.c 287 char *cp, cdpath[256], pwd[256], file[256], result[256]; local in function:main
290 printf("enter PWD: "); gets(pwd);
296 rv = make_path(pwd, file, &cp, result, sizeof(result));
  /src/bin/sh/
cd.c 53 * The cd and pwd commands.
112 error("PWD not set");
306 setvar("PWD", curdir, VEXPORT);
309 unsetvar("PWD", 0);
343 setvar("PWD", curdir, VEXPORT);
367 * Posix says the default should be 'pwd -L' (as below), however
392 setvar("PWD", curdir, VEXPORT);
419 setvar("PWD", curdir, VEXPORT);
433 char *pwd; local in function:getpwd
443 * sh startup, so fetching PWD from the entry environmen
471 char *pwd; local in function:find_curdir
    [all...]

Completed in 19 milliseconds

1 2 3