Symbol: getuid
bin/ls/ls.c
498
if (!f_listdot && getuid() == (uid_t)0 && !f_noautodot)
bin/sh/options.c
290
if (setuid(getuid()) == -1)
bin/sh/options.c
91
privileged = (getuid() != geteuid() || getgid() != getegid());
crypto/heimdal/appl/ftp/ftp/ftp.c
174
struct passwd *pw = k_getpwuid(getuid());
crypto/heimdal/appl/ftp/ftp/main.c
138
pw = k_getpwuid(getuid());
crypto/heimdal/appl/push/push.c
648
struct passwd *pwd = getpwuid (getuid ());
crypto/heimdal/appl/rcp/rcp.c
110
if ((pwd = getpwuid(userid = getuid())) == NULL)
crypto/heimdal/appl/rsh/rsh.c
854
uid = getuid ();
crypto/heimdal/appl/su/su.c
363
if (!issuid() && getuid() != 0)
crypto/heimdal/appl/su/su.c
377
pwd = getpwuid(getuid());
crypto/heimdal/lib/hx509/softp11.c
830
struct passwd *pw = getpwuid(getuid());
crypto/heimdal/lib/kafs/afskrb5.c
306
return krb5_afslog_uid (context, id, cell, realm, getuid());
crypto/heimdal/lib/kafs/afskrb5.c
316
return krb5_afslog_uid_home (context, id, cell, realm, getuid(), homedir);
crypto/heimdal/lib/kafs/afssys.c
102
if (getuid() != 0 && !issuid() && (p = getenv("AFSLIBPATH")) != NULL)
crypto/heimdal/lib/krb5/config_file.c
442
struct passwd *pw = getpwuid(getuid());
crypto/heimdal/lib/krb5/expand_path.c
303
int ret = asprintf(str, "%ld", (unsigned long)getuid());
crypto/heimdal/lib/krb5/get_default_principal.c
69
uid = getuid();
crypto/heimdal/lib/roken/get_default_username.c
63
uid_t uid = getuid ();
crypto/heimdal/lib/roken/geteuid.c
43
return getuid();
crypto/heimdal/lib/roken/glob.c
368
if ((pwd = k_getpwuid(getuid())) == NULL)
crypto/heimdal/lib/roken/issuid.c
46
if(getuid() != geteuid())
crypto/krb5/src/clients/kinit/kinit.c
52
pw = getpwuid(getuid());
crypto/krb5/src/clients/kpasswd/kpasswd.c
26
pw = getpwuid(getuid());
crypto/krb5/src/clients/ksu/main.c
110
uid_t ruid = getuid ();
crypto/krb5/src/include/k5-util.h
69
# define krb5_seteuid(EUID) setresuid(getuid(), (uid_t)(EUID), geteuid())
crypto/krb5/src/kadmin/cli/kadmin.c
525
} else if ((pw = getpwuid(getuid()))) {
crypto/krb5/src/lib/krb5/os/expand_path.c
294
if (asprintf(str, "%lu", (unsigned long)getuid()) < 0)
crypto/krb5/src/lib/krb5/os/krbfileio.c
71
uid = getuid();
crypto/krb5/src/util/profile/prof_file.c
196
uid = getuid();
crypto/krb5/src/util/support/secure_getenv.c
84
if (getuid() != geteuid())
crypto/krb5/src/util/verto/ev.c
2722
return getuid () != geteuid ()
crypto/openssh/authfile.c
102
if ((st.st_uid == getuid()) && (st.st_mode & 077) != 0) {
crypto/openssh/channels.c
2517
if ((euid != 0) && (getuid() != euid)) {
crypto/openssh/channels.c
2519
(u_int)euid, (u_int)getuid());
crypto/openssh/hostfile.c
485
dotsshdir = tilde_expand_filename("~/" _PATH_SSH_USER_DIR, getuid());
crypto/openssh/logintest.c
100
pw = getpwuid(getuid());
crypto/openssh/logintest.c
145
t1 = login_get_lastlog_time(getuid());
crypto/openssh/logintest.c
185
t2 = login_get_lastlog_time(getuid());
crypto/openssh/misc.c
2776
if (pw == NULL && (pw = getpwuid(getuid())) == NULL) {
crypto/openssh/openbsd-compat/glob.c
397
if ((getuid() != geteuid()) || (h = getenv("HOME")) == NULL) {
crypto/openssh/openbsd-compat/glob.c
398
if ((pwd = getpwuid(getuid())) == NULL)
crypto/openssh/platform.c
45
return (getuid() == 0 || geteuid() == 0);
crypto/openssh/platform.c
67
if (!options.use_pam && (getuid() == 0 || geteuid() == 0))
crypto/openssh/platform.c
72
if (getuid() == 0 || geteuid() == 0)
crypto/openssh/platform.c
81
if (getuid() == 0 || geteuid() == 0) {
crypto/openssh/platform.c
89
if (getuid() == 0 || geteuid() == 0) {
crypto/openssh/readconf.c
2584
if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
crypto/openssh/regress/check-perm.c
193
safely_chroot(path, getuid());
crypto/openssh/regress/misc/fuzz-harness/authkeys_fuzz.cc
34
struct passwd *pw = getpwuid(getuid());
crypto/openssh/scp.c
652
if ((pwd = getpwuid(userid = getuid())) == NULL)
crypto/openssh/servconf.c
2206
arg2 = tilde_expand_filename(arg, getuid());
crypto/openssh/servconf.c
2230
*charptr = tilde_expand_filename(arg, getuid());
crypto/openssh/servconf.c
823
expanded = tilde_expand_filename(path, getuid());
crypto/openssh/session.c
1443
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
crypto/openssh/session.c
2286
if (getuid() == 0)
crypto/openssh/sftp-server-main.c
45
if ((user_pw = getpwuid(getuid())) == NULL) {
crypto/openssh/sftp-server-main.c
47
(u_long)getuid());
crypto/openssh/sftp.c
1696
tmp = tilde_expand_filename(path1, getuid());
crypto/openssh/ssh-add.c
1022
if ((pw = getpwuid(getuid())) == NULL) {
crypto/openssh/ssh-add.c
1024
(u_int)getuid());
crypto/openssh/ssh-add.c
724
path = tilde_expand_filename(hostkey_files[i], getuid());
crypto/openssh/ssh-agent.c
1993
if ((euid != 0) && (getuid() != euid)) {
crypto/openssh/ssh-agent.c
1995
(u_int) euid, (u_int) getuid());
crypto/openssh/ssh-keygen.c
3419
pw = getpwuid(getuid());
crypto/openssh/ssh-keygen.c
3421
fatal("No user exists for uid %lu", (u_long)getuid());
crypto/openssh/ssh-keysign.c
211
if ((pw = getpwuid(getuid())) == NULL)
crypto/openssh/ssh.c
1509
cp = tilde_expand_filename(options.control_path, getuid());
crypto/openssh/ssh.c
1517
p = tilde_expand_filename(options.identity_agent, getuid());
crypto/openssh/ssh.c
1525
p = tilde_expand_filename(options.revoked_host_keys, getuid());
crypto/openssh/ssh.c
1534
getuid());
crypto/openssh/ssh.c
1576
cp = tilde_expand_filename(options.user_hostfiles[j], getuid());
crypto/openssh/ssh.c
208
cp = tilde_expand_filename(paths[i], getuid());
crypto/openssh/ssh.c
2448
cp = tilde_expand_filename(options.identity_files[i], getuid());
crypto/openssh/ssh.c
2497
getuid());
crypto/openssh/ssh.c
716
pw = getpwuid(getuid());
crypto/openssh/ssh.c
718
logit("No user exists for uid %lu", (u_long)getuid());
crypto/openssh/ssh.c
891
p = tilde_expand_filename(optarg, getuid());
crypto/openssh/sshd-auth.c
682
privsep_chroot = (getuid() == 0 || geteuid() == 0);
crypto/openssh/sshd-session.c
1056
privsep_chroot = (getuid() == 0 || geteuid() == 0);
crypto/openssh/sshd.c
1791
need_chroot = ((getuid() == 0 || geteuid() == 0) ||
crypto/openssh/sshd.c
1806
(sb.st_uid != getuid () ||
crypto/openssh/uidswap.c
165
if (setuid(getuid()) == -1)
crypto/openssh/uidswap.c
184
uid_t old_uid = getuid();
crypto/openssh/uidswap.c
233
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) {
crypto/openssh/uidswap.c
235
__func__, (u_int)getuid(), (u_int)geteuid(),
crypto/openssl/crypto/uid.c
52
return getuid() != geteuid() || getgid() != getegid();
include/unistd.h
354
uid_t getuid(void);
lib/libc/gen/glob-compat11.c
423
(pwd = getpwuid(getuid())) != NULL)
lib/libc/gen/glob.c
485
(pwd = getpwuid(getuid())) != NULL)
lib/libc/gen/posix_spawn.c
128
if (seteuid(getuid()) != 0)
lib/libfetch/common.c
1637
if ((pwd = getpwuid(getuid())) == NULL ||
lib/libipsec/test-policy.c
234
if (getuid() != 0)
lib/libpam/modules/pam_ksu/pam_ksu.c
235
ruid = getuid();
lib/libpam/modules/pam_rootok/pam_rootok.c
56
if (getuid() == 0)
lib/libpam/modules/pam_self/pam_self.c
69
uid = getuid();
lib/libpam/modules/pam_unix/pam_unix.c
312
if (getuid() == 0 &&
lib/libpam/modules/pam_unix/pam_unix.c
317
if (getuid() == 0 &&
lib/libpam/modules/pam_unix/pam_unix.c
388
if (getuid() != 0 && new_pass[0] == '\0' &&
lib/libutil/pw_util.c
310
if (setuid(getuid()) == -1)
lib/libypclnt/ypclnt_passwd.c
80
if (getuid() != 0)
libexec/rpc.rwalld/rwalld.c
80
setuid(getuid());
libexec/talkd/talkd.c
78
if (getuid())
libexec/ulog-helper/ulog-helper.c
62
uid = getuid();
sbin/bsdlabel/bsdlabel.c
676
uid = getuid();
sbin/dump/dumprmt.c
135
pwd = getpwuid(getuid());
sbin/dump/main.c
312
(void)setuid(getuid()); /* rmthost() is the only reason to be setuid */
sbin/init/init.c
199
if (getuid() != 0)
sbin/ipf/ipfstat/ipfstat.c
263
(void)setuid(getuid());
sbin/ipf/ipfstat/ipfstat.c
274
(void)setuid(getuid());
sbin/ipf/ipftest/ip_fil.c
61
uid = getuid();
sbin/ipf/ipnat/ipnat.c
173
(void) setuid(getuid());
sbin/ipf/ipnat/ipnat.c
205
(void) setuid(getuid());
sbin/mksnap_ffs/mksnap_ffs.c
139
if ((stbuf.st_mode & S_ISTXT) && stbuf.st_uid != getuid())
sbin/mount/mount.c
445
if (rval == EXIT_SUCCESS && getuid() == 0)
sbin/pfctl/parse.y
7587
if (st.st_uid != 0 && st.st_uid != getuid()) {
sbin/ping/ping.c
250
if (setuid(getuid()) != 0)
sbin/ping/ping.c
252
uid = getuid();
sbin/ping/ping6.c
407
if (getuid()) {
sbin/ping/ping6.c
440
if (t < 1 && getuid()) {
sbin/ping/ping6.c
457
if (getuid()) {
sbin/ping/ping6.c
735
if (seteuid(getuid()) != 0)
sbin/ping/ping6.c
737
if (setuid(getuid()) != 0)
sbin/reboot/reboot.c
420
user = (pw = getpwuid(getuid())) ?
sbin/restore/dirs.c
582
myuid = getuid();
sbin/restore/tape.c
163
if (setuid(getuid()) != 0) {
sbin/restore/tape.c
583
uid = getuid();
sbin/shutdown/shutdown.c
240
whom = (pw = getpwuid(getuid())) ? pw->pw_name : "???";
sys/security/audit/bsm_token.c
1265
getegid(), getuid(), getgid(), getpid(),
sys/security/audit/bsm_token.c
1273
return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(),
tests/sys/capsicum/capability-fd.cc
1267
EXPECT_EQ(other_uid, getuid());
tests/sys/capsicum/capability-fd.cc
840
if (getuid() == 0) {
tests/sys/capsicum/capmode.cc
258
uid_t my_uid = getuid();
tests/sys/capsicum/capmode.cc
297
if (policy >= 0 && (!SCHED_SETSCHEDULER_REQUIRES_ROOT || getuid() == 0)) {
tests/sys/capsicum/capmode.cc
359
if (!MLOCK_REQUIRES_ROOT || getuid() == 0) {
tests/sys/capsicum/capsicum-test.h
277
if (getuid() != 0) { GTEST_SKIP() << "requires root"; }
tests/sys/capsicum/fcntl.cc
35
sprintf(shm_name, "/capsicum-test-%d", getuid());
tests/sys/capsicum/linux.cc
1016
if (getuid() == 0) {
tests/sys/capsicum/procdesc.cc
553
EXPECT_EQ(other_uid, getuid());
tests/sys/capsicum/procdesc.cc
554
if (verbose) fprintf(stderr, "uid=%d euid=%d\n", getuid(), geteuid());
tests/sys/capsicum/syscalls.h
99
#define getuid_ getuid
tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c
369
if (chown(pfile, getuid(), getgid()) == -1) {
tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c
373
fprintf(stderr, "chown(%s, %d, %d)\n", pfile, (int)getuid(),
tests/sys/file/path_test.c
120
ATF_REQUIRE_ERRNO(EBADF, fchown(pathfd, getuid(), getgid()) == -1);
tests/sys/file/path_test.c
413
ATF_REQUIRE_MSG(fchownat(pathfd, "", getuid(), getgid(),
tests/sys/file/path_test.c
442
fchownat(pathfd, "", getuid(), getgid(), AT_EMPTY_PATH) == -1);
tests/sys/fs/fusefs/statfs.cc
126
EXPECT_EQ(getuid(), statbuf.f_owner);
tests/sys/fs/fusefs/statfs.cc
167
EXPECT_EQ(getuid(), statbuf.f_owner);
tests/sys/fs/fusefs/statfs.cc
74
EXPECT_EQ(getuid(), statbuf.f_owner);
tests/sys/kern/inotify_test.c
552
error = fchown(fd, getuid(), getgid());
tests/sys/mac/bsdextended/ugidfw_test.c
205
if (getuid() != 0) {
tools/regression/ethernet/ethermulti/ethermulti.c
248
getuid(), geteuid());
tools/regression/ethernet/ethermulti/ethermulti.c
81
if (getuid() != 0)
tools/regression/netinet/ipsockopt/ipsockopt.c
753
if (getuid() != 0 && socktype == SOCK_RAW)
tools/regression/netinet/ipsockopt/ipsockopt.c
77
if (getuid() != 0)
tools/regression/netinet/ipsockopt/ipsockopt.c
926
getuid(), geteuid());
tools/regression/netinet/ipsockopt/ipsockopt.c
932
getuid(), geteuid());
tools/regression/netinet/ipsockopt/ipsockopt.c
936
getuid(), geteuid());
tools/regression/priv/main.c
541
if (getuid() != 0 && geteuid() != 0)
tools/regression/security/cap_test/cap_test_capmode.c
120
CHECK_SYSCALL_SUCCEEDS(setuid, getuid());
tools/regression/security/cap_test/cap_test_capmode.c
146
CHECK_SYSCALL_VOID_NOT_ECAPMODE(getuid);
tools/regression/sockets/unix_cmsg/unix_cmsg.c
307
uc_cfg.proc_cred.uid = getuid();
tools/tools/syscall_timing/syscall_timing.c
329
getuid();
tools/tools/syscall_timing/syscall_timing.c
680
uid = getuid();
usr.bin/at/privs.h
72
real_uid = getuid(); \
usr.bin/calendar/calendar.c
79
if (getuid()) {
usr.bin/chpass/chpass.c
128
uid = getuid();
usr.bin/chpass/edit.c
186
(void)fchown(fileno(fp), getuid(), getgid());
usr.bin/env/envopts.c
73
(getuid() != 0 ||
usr.bin/finger/finger.c
152
if (getuid() == 0 || geteuid() == 0) {
usr.bin/from/from.c
89
if (!(pwd = getpwuid(getuid())))
usr.bin/id/id.c
184
id = pw ? pw->pw_uid : rflag ? getuid() : geteuid();
usr.bin/id/id.c
241
pw = getpwuid(rid = getuid());
usr.bin/id/id.c
284
uid = getuid();
usr.bin/id/id.c
472
if ((pw = getpwuid(getuid())) == NULL)
usr.bin/id/id.c
485
if ((pw = getpwuid(getuid())) == NULL)
usr.bin/id/id.c
495
if ((pw = getpwuid(getuid())) == NULL)
usr.bin/killall/killall.c
279
uid = getuid();
usr.bin/killall/killall.c
433
getuid() != 0 ? "belonging to you " : "");
usr.bin/ktrace/ktrace.c
139
if (fstat(fd, &sb) != 0 || sb.st_uid != getuid())
usr.bin/limits/limits.c
424
if ((*argv || doeval) && getuid() == 0) {
usr.bin/lock/lock.c
111
if (!(pw = getpwuid(getuid())))
usr.bin/lock/lock.c
112
errx(1, "unknown uid %d", getuid());
usr.bin/lock/lock.c
128
if (setuid(getuid()) != 0)
usr.bin/lock/lock.c
240
if (getuid() == 0)
usr.bin/lock/lock.c
248
if (getuid() == 0)
usr.bin/login/login.c
198
uid = getuid();
usr.bin/mail/lex.c
64
char isedit = *name != '%' || getuserid(myname) != getuid();
usr.bin/mail/v7.local.c
86
if ((np = getname(uid = getuid())) != NULL)
usr.bin/msgs/msgs.c
162
if (setuid(uid = getuid()) != 0)
usr.bin/newgrp/newgrp.c
109
if (setuid(getuid()) < 0)
usr.bin/newgrp/newgrp.c
178
if (!dbmember && *grp->gr_passwd != '\0' && getuid() != 0) {
usr.bin/newgrp/newgrp.c
65
if (seteuid(getuid()) < 0) \
usr.bin/newgrp/newgrp.c
76
if (seteuid(getuid()) < 0)
usr.bin/newgrp/newgrp.c
79
if ((pwd = getpwuid(getuid())) == NULL)
usr.bin/passwd/passwd.c
93
uid = getuid();
usr.bin/quota/quota.c
142
errflag += showuid(getuid());
usr.bin/rwall/rwall.c
133
pw = getpwuid(getuid());
usr.bin/su/su.c
243
ruid = getuid();
usr.bin/talk/get_names.c
72
if ((pw = getpwuid(getuid())) == NULL)
usr.bin/tip/tip/log.c
57
if ((pwd = getpwuid(getuid())) == NOPWD)
usr.bin/tip/tip/tip.c
63
uid = getuid();
usr.bin/tip/tip/value.c
270
return ((mode & (rw<<ROOT)) && getuid() == 0);
usr.bin/wall/wall.c
202
whom = (pw = getpwuid(getuid())) ? pw->pw_name : "???";
usr.bin/which/which.c
111
(getuid() != 0 ||
usr.bin/who/who.c
286
if ((pwd = getpwuid(getuid())) != NULL)
usr.bin/write/write.c
117
myuid = getuid();
usr.sbin/bluetooth/hcsecd/hcsecd.c
101
if (getuid() != 0)
usr.sbin/bluetooth/sdpd/main.c
156
if ((uid = getuid()) != 0) {
usr.sbin/cron/cron/externs.h
87
#define MY_UID(pw) getuid()
usr.sbin/cron/crontab/crontab.c
122
if (!(pw = getpwuid(getuid())))
usr.sbin/cron/crontab/crontab.c
137
if (getuid() != ROOT_UID)
usr.sbin/cron/crontab/crontab.c
337
if (fchown(t, getuid(), getgid()) < 0) {
usr.sbin/cron/crontab/crontab.c
339
if (chown(Filename, getuid(), getgid()) < 0) {
usr.sbin/cron/crontab/crontab.c
394
if (setuid(getuid()) < 0)
usr.sbin/cron/lib/misc.c
579
int swap_uids(void) { save_euid = geteuid(); return seteuid(getuid()); }
usr.sbin/cron/lib/misc.c
582
int swap_uids(void) { return setreuid(geteuid(), getuid()); }
usr.sbin/edquota/edquota.c
117
if (getuid())
usr.sbin/edquota/edquota.c
275
fchown(tmpfd, getuid(), getgid());
usr.sbin/edquota/edquota.c
443
if (setuid(getuid()) != 0)
usr.sbin/jail/command.c
977
*pwdp = pwd = username ? getpwnam(username) : getpwuid(getuid());
usr.sbin/jail/command.c
985
jail_warnx(j, "unknown uid %d", getuid());
usr.sbin/jexec/jexec.c
194
uid = getuid();
usr.sbin/lpr/common_source/rmjob.c
92
if (getuid() == 0)
usr.sbin/lpr/lpc/lpc.c
200
if ((c->c_opts & LPC_PRIVCMD) && getuid() &&
usr.sbin/lpr/lpc/lpc.c
83
uid = getuid();
usr.sbin/lpr/lpc/lpc.c
98
if ((c->c_opts & LPC_PRIVCMD) && getuid() &&
usr.sbin/lpr/lpd/lpd.c
131
uid = getuid();
usr.sbin/lpr/lpq/lpq.c
78
uid = getuid();
usr.sbin/lpr/lpr/lpr.c
134
uid = getuid();
usr.sbin/lpr/lpr/lpr.c
275
userid = getuid();
usr.sbin/lpr/lprm/lprm.c
83
uid = getuid();
usr.sbin/lpr/lprm/lprm.c
95
if (getuid() == 0) {
usr.sbin/lpr/lprm/lprm.c
98
if ((p = getpwuid(getuid())) == NULL)
usr.sbin/lpr/pac/pac.c
103
uid = getuid();
usr.sbin/newsyslog/newsyslog.c
339
if (needroot && getuid() && geteuid())
usr.sbin/ppp/id.c
64
uid = getuid();
usr.sbin/rwhod/rwhod.c
173
if (getuid())
usr.sbin/traceroute/traceroute.c
527
if (setuid(getuid()) != 0) {
usr.sbin/traceroute6/traceroute6.c
600
uid = getuid();
usr.sbin/watchdogd/watchdogd.c
124
if (getuid() != 0)
usr.sbin/ypldap/parse.y
666
if (st.st_uid != 0 && st.st_uid != getuid()) {