| /src/crypto/external/bsd/heimdal/dist/lib/roken/ |
| get_default_username.c | 66 struct passwd *pwd; local 69 pwd = k_getpwnam (user); 70 if (pwd != NULL && pwd->pw_uid == uid) 73 pwd = k_getpwuid (uid); 74 if (pwd != NULL) 75 return pwd->pw_name;
|
| getxxyyy.c | 52 copypw(struct passwd *pwd, char *buffer, size_t bufsize, const struct passwd *p) 63 memset(pwd, 0, sizeof(*pwd)); 70 pwd->el = buffer; \ 78 pwd->pw_uid = p->pw_uid; 79 pwd->pw_gid = p->pw_gid; 91 rk_getpwnam_r(const char *name, struct passwd *pwd, char *buffer, 103 copypw(pwd, buffer, bufsize, p); 105 *result = pwd; 117 rk_getpwnam_r(const char *name, struct passwd *pwd, char *buffer 158 struct passwd pwd, *result; local [all...] |
| /src/external/ibm-public/postfix/dist/src/util/ |
| chroot_uid.c | 34 #include <pwd.h> 47 struct passwd *pwd; local 56 if ((pwd = getpwnam(user_name)) == 0) 58 uid = pwd->pw_uid; 59 gid = pwd->pw_gid;
|
| username.c | 32 #include <pwd.h> 43 struct passwd *pwd; local 46 if ((pwd = getpwuid(uid)) == 0) 48 return (pwd->pw_name);
|
| fullname.c | 41 #include <pwd.h> 60 struct passwd *pwd; local 75 if ((pwd = getpwuid(uid)) == 0) 85 for (cp = pwd->pw_gecos; (ch = *(unsigned char *) cp) != 0; cp++) { 89 if (pwd->pw_name[0]) { 90 VSTRING_ADDCH(result, TOUPPER(pwd->pw_name[0])); 91 vstring_strcat(result, pwd->pw_name + 1);
|
| /src/external/mit/libuv/dist/test/ |
| test-get-passwd.c | 36 uv_passwd_t pwd; local 41 r = uv_os_get_passwd(&pwd); 43 len = strlen(pwd.username); 47 ASSERT_NULL(pwd.shell); 49 len = strlen(pwd.shell); 55 len = strlen(pwd.homedir); 59 if (len == 3 && pwd.homedir[1] == ':') 60 ASSERT_EQ(pwd.homedir[2], '\\'); 62 ASSERT_NE(pwd.homedir[len - 1], '\\'); 65 ASSERT_EQ(pwd.homedir[0], '/') 110 uv_passwd_t pwd; local 176 uv_passwd_t pwd; local [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 124 /* Check $PWD -- if it's right, it's fast. */ 125 pwd = getenv("PWD"); 126 if (pwd == NULL [all...] |
| /src/external/bsd/openldap/dist/servers/slapd/ |
| user.c | 32 #include <pwd.h> 56 struct passwd *pwd; local 69 pwd = getpwuid( uid ); 75 pwd = getpwnam( user ); 77 if ( pwd == NULL ) { 84 user = (pwd != NULL ? pwd->pw_name : NULL); 87 uid = pwd->pw_uid; 90 gid = pwd->pw_gid;
|
| /src/lib/libpam/modules/pam_chroot/ |
| pam_chroot.c | 46 #include <pwd.h> 63 struct passwd *pwd, pwres; local 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 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 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 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 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 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 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 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...] |
| /src/usr.bin/renice/ |
| renice.c | 48 #include <pwd.h> 96 struct passwd *pwd = getpwnam(*argv); local 98 if (pwd == NULL) { 103 who = (id_t)pwd->pw_uid;
|
| /src/crypto/external/bsd/heimdal/dist/kcm/ |
| client.c | 38 #include <pwd.h> 177 struct passwd pw, *pwd = NULL; local 180 if (rk_getpwuid_r(getuid(), &pw, pwbuf, sizeof(pwbuf), &pwd) == 0) { 181 gid_t gid = pwd->pw_gid;
|
| /src/crypto/external/bsd/heimdal/dist/lib/krb5/ |
| get_default_principal.c | 81 struct passwd pw, *pwd = NULL; local 84 if (rk_getpwuid_r(uid, &pw, pwbuf, sizeof(pwbuf), &pwd) == 0) 85 user = pwd->pw_name;
|
| /src/external/bsd/openpam/dist/bin/su/ |
| su.c | 47 #include <pwd.h> 77 struct passwd *pwd; local 131 if (pam_err != PAM_SUCCESS || (pwd = getpwnam(user = item)) == NULL) 148 *args = pwd->pw_shell; 160 if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { 164 if (setgid(pwd->pw_gid) == -1) { 168 if (setuid(pwd->pw_uid) == -1) {
|
| /src/external/bsd/pam-u2f/dist/tests/ |
| get_devices.c | 8 #include <pwd.h> 752 struct passwd *pwd; local 755 assert((pwd = getpwuid(geteuid())) != NULL); 756 assert((username = strdup(pwd->pw_name)) != NULL);
|
| /src/external/bsd/top/dist/ |
| username.c | 50 #include <pwd.h> 141 struct passwd *pwd; local 143 if ((pwd = getpwnam(xusername)) == NULL) 149 return(pwd->pw_uid);
|
| /src/external/gpl3/binutils/dist/libiberty/ |
| getpwd.c | 62 /* Get the working directory. Use the PWD environment variable if it's 70 static char *pwd; local 73 char *p = pwd; 79 if (! ((p = getenv ("PWD")) != 0 103 pwd = p; 117 static char *pwd = 0; local 119 if (!pwd) 120 pwd = getcwd (XNEWVEC (char, MAXPATHLEN + 1), MAXPATHLEN + 1 125 return pwd;
|
| /src/external/gpl3/binutils.old/dist/libiberty/ |
| getpwd.c | 62 /* Get the working directory. Use the PWD environment variable if it's 70 static char *pwd; local 73 char *p = pwd; 79 if (! ((p = getenv ("PWD")) != 0 103 pwd = p; 117 static char *pwd = 0; local 119 if (!pwd) 120 pwd = getcwd (XNEWVEC (char, MAXPATHLEN + 1), MAXPATHLEN + 1 125 return pwd;
|
| /src/external/gpl3/gcc/dist/libgfortran/intrinsics/ |
| getlog.c | 37 #include <pwd.h> 78 struct passwd pwd; local 88 err = getpwuid_r (geteuid (), &pwd, buf, buflen, &result); 91 p = pwd.pw_name;
|