bin/pax/file_subs.c
676
geteuid() == 0)
bin/ps/ps.c
537
uidlist.l.uids[uidlist.count++] = geteuid();
bin/rm/rm.c
144
uid = geteuid();
bin/sh/exec.c
422
if (statb.st_uid == geteuid()) {
bin/sh/options.c
91
privileged = (getuid() != geteuid() || getgid() != getegid());
bin/sh/parser.c
1994
euid = geteuid();
bin/sh/parser.c
2338
ps[i] = (geteuid() != 0) ? '$' : '#';
bin/sh/show.c
381
if (geteuid() == 0)
bin/sh/var.c
174
vps1.text = __DECONST(char *, geteuid() ? "PS1=$ " : "PS1=# ");
bin/test/test.c
380
if (S_ISDIR(s.st_mode) || geteuid() != 0)
bin/test/test.c
408
return s.st_uid == geteuid();
cddl/compat/opensolaris/include/priv.h
16
return (geteuid() == 0);
crypto/heimdal/appl/afsutil/pagsh.c
171
struct passwd *pw = k_getpwuid(geteuid());
crypto/heimdal/appl/afsutil/pagsh.c
173
errx(1, "no such user: %d", (int)geteuid());
crypto/heimdal/appl/login/login.c
603
if (geteuid() != 0)
crypto/heimdal/kdc/main.c
68
if ((runas_string || chroot_string) && geteuid() != 0)
crypto/heimdal/lib/krb5/context.c
1471
if (geteuid() == 0)
crypto/heimdal/lib/krb5/replay.c
311
ret = asprintf(&name, "FILE:rc_%s_%u", tmp, (unsigned)geteuid());
crypto/heimdal/lib/roken/iruserok.c
249
uid = geteuid();
crypto/heimdal/lib/roken/issuid.c
46
if(getuid() != geteuid())
crypto/krb5/src/clients/ksu/main.c
389
if ( geteuid() != source_uid) {
crypto/krb5/src/include/k5-util.h
69
# define krb5_seteuid(EUID) setresuid(getuid(), (uid_t)(EUID), geteuid())
crypto/krb5/src/include/k5-util.h
71
# define krb5_seteuid(EUID) setreuid(geteuid(), (uid_t)(EUID))
crypto/krb5/src/lib/krb5/ccache/cc_keyring.c
288
return (uid == geteuid()) ? KEY_SPEC_USER_KEYRING : -1;
crypto/krb5/src/lib/krb5/ccache/cc_keyring.c
497
uidnum = geteuid();
crypto/krb5/src/lib/krb5/ccache/ccselect_k5identity.c
141
if (k5_getpwuid_r(geteuid(), &pwx, pwbuf, sizeof(pwbuf), &pwd) != 0)
crypto/krb5/src/lib/krb5/os/expand_path.c
302
if (asprintf(str, "%lu", (unsigned long)geteuid()) < 0)
crypto/krb5/src/lib/krb5/os/expand_path.c
311
uid_t euid = geteuid();
crypto/krb5/src/lib/krb5/rcache/rc_dfl.c
90
uid_t euid = geteuid();
crypto/krb5/src/lib/rpc/auth_unix.c
188
uid = geteuid();
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/audit-linux.c
64
if ((rc == -EPERM) && (geteuid() != 0))
crypto/openssh/audit.c
126
(int)geteuid());
crypto/openssh/audit.c
136
debug("audit event euid %d user %s event %d (%s)", geteuid(),
crypto/openssh/audit.c
152
debug("audit session open euid %d user %s tty name %s", geteuid(),
crypto/openssh/audit.c
168
debug("audit session close euid %d user %s tty name %s", geteuid(),
crypto/openssh/audit.c
180
debug("audit run command euid %d user %s command '%.200s'", geteuid(),
crypto/openssh/auth-krb5.c
249
"FILE:/tmp/krb5cc_%d_XXXXXXXXXX", geteuid());
crypto/openssh/loginrec.c
1721
if (geteuid() != 0)
crypto/openssh/loginrec.c
429
if (geteuid() != 0) {
crypto/openssh/logintest.c
128
if ((int)geteuid() != 0) {
crypto/openssh/misc.c
2872
if (geteuid() == 0 &&
crypto/openssh/openbsd-compat/bsd-getpeereid.c
66
*euid = geteuid();
crypto/openssh/openbsd-compat/glob.c
397
if ((getuid() != geteuid()) || (h = getenv("HOME")) == NULL) {
crypto/openssh/openbsd-compat/port-aix.c
252
if (pw->pw_uid == 0 || geteuid() != 0) {
crypto/openssh/openbsd-compat/port-aix.c
319
if (geteuid() != 0)
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/session.c
1443
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
crypto/openssh/ssh-agent.c
2270
setuid(geteuid());
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
1400
if (geteuid() == 0 && setgroups(0, NULL) == -1)
crypto/openssh/sshd.c
1791
need_chroot = ((getuid() == 0 || geteuid() == 0) ||
crypto/openssh/uidswap.c
127
if (setuid(geteuid()) == -1)
crypto/openssh/uidswap.c
128
debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno));
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/openssh/uidswap.c
65
saved_euid = geteuid();
crypto/openssh/uidswap.c
77
if (geteuid() != 0) {
crypto/openssl/crypto/uid.c
52
return getuid() != geteuid() || getgid() != getegid();
include/unistd.h
347
uid_t geteuid(void);
lib/libc/gen/getpwent.c
1220
if (geteuid() == 0) {
lib/libc/gen/getpwent.c
725
if (geteuid() != 0 ||
lib/libc/net/rcmd.c
103
if (geteuid()) {
lib/libc/net/rcmd.c
462
uid = geteuid();
lib/libc/rpc/auth_unix.c
193
uid = geteuid();
lib/libc/rpc/key_call.c
333
if (kcp->uid != geteuid()) {
lib/libc/rpc/key_call.c
334
kcp->uid = geteuid();
lib/libc/rpc/key_call.c
392
kcp->uid = geteuid();
lib/libc/rpc/key_call.c
422
res = (*__key_encryptsession_pk_LOCAL)(geteuid(), arg);
lib/libc/rpc/key_call.c
427
res = (*__key_decryptsession_pk_LOCAL)(geteuid(), arg);
lib/libc/rpc/key_call.c
432
res = (*__key_gendes_LOCAL)(geteuid(), 0);
lib/libc/rpc/netname.c
82
uid = geteuid();
lib/libc/rpc/rpcb_clnt.c
557
(void) snprintf(uidbuf, sizeof uidbuf, "%d", geteuid());
lib/libc/rpc/rpcb_clnt.c
598
(void) snprintf(uidbuf, sizeof uidbuf, "%d", geteuid());
lib/libcompat/4.4/cuserid.c
43
if ((pwd = getpwuid(geteuid())) == NULL) {
lib/libpam/modules/pam_krb5/pam_krb5.c
460
euid = geteuid(); /* Usually 0 */
lib/libpam/modules/pam_ksu/pam_ksu.c
236
euid = geteuid();
lib/libpam/modules/pam_ssh/pam_ssh.c
298
setuid(geteuid());
lib/libutil/login_cap.c
314
euid = geteuid();
lib/libutil/login_class.c
628
if (geteuid() == uid && (lc = login_getuserclass(pwd)) != NULL) {
libexec/rpc.rwalld/rwalld.c
75
if (geteuid() == 0) {
libexec/rtld-elf/rtld.c
645
if (st.st_uid == geteuid()) {
sbin/reboot/reboot.c
385
if (!donextboot && geteuid() != 0) {
sbin/route/route.c
235
uid = geteuid();
sbin/routed/main.c
234
if (geteuid() != 0) {
sbin/routed/rtquery/rtquery.c
310
if (geteuid() != 0) {
sbin/shutdown/shutdown.c
110
if (geteuid())
sys/rpc/rpcb_clnt.c
119
(void) snprintf(uidbuf, sizeof uidbuf, "%d", geteuid());
sys/rpc/rpcb_clnt.c
159
(void) snprintf(uidbuf, sizeof uidbuf, "%d", geteuid());
sys/security/audit/bsm_token.c
1264
return (au_to_subject32(auinfo.ai_auid, geteuid(),
sys/security/audit/bsm_token.c
1273
return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(),
tests/sys/capsicum/fexecve.cc
130
if (geteuid() == 0) {
tests/sys/capsicum/mini-me.c
19
int rc = (geteuid() == 0);
tests/sys/capsicum/mini-me.c
20
fprintf(stderr,"[uid:%d] %s immediately returning (geteuid() == 0) = %d\n", geteuid(), argv[0], rc);
tests/sys/capsicum/procdesc.cc
554
if (verbose) fprintf(stderr, "uid=%d euid=%d\n", getuid(), geteuid());
tests/sys/capsicum/syscalls.h
98
#define geteuid_ geteuid
tests/sys/fifo/fifo_create.c
258
if (geteuid() != 0)
tests/sys/fifo/fifo_misc.c
280
u = geteuid();
tests/sys/fifo/fifo_open.c
457
if (geteuid() != 0)
tests/sys/file/flock_helper.c
894
if (geteuid() != 0)
tests/sys/file/path_test.c
352
if (geteuid() != 0) {
tests/sys/fs/fusefs/allow_other.cc
145
in.header.uid == (uint32_t)geteuid() &&
tests/sys/fs/fusefs/allow_other.cc
160
in.header.uid != (uint32_t)geteuid() &&
tests/sys/fs/fusefs/allow_other.cc
56
if (geteuid() != 0) {
tests/sys/fs/fusefs/default_permissions.cc
1218
expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0777, UINT64_MAX, 1, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1235
expect_lookup(RELSRC, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1290
expect_lookup(RELPATH, ino, S_IFREG | oldmode, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1375
uid_t uid = geteuid();
tests/sys/fs/fusefs/default_permissions.cc
1401
expect_lookup(RELPATH, ino, S_IFREG | oldmode, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1424
expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1460
expect_lookup(RELPATH, ino, S_IFREG | 0666, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1497
expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
1546
expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
332
uid = geteuid();
tests/sys/fs/fusefs/default_permissions.cc
362
uid_t uid = geteuid();
tests/sys/fs/fusefs/default_permissions.cc
394
expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0755, UINT64_MAX, 1, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
395
expect_lookup(RELPATH, ino, S_IFREG | mode, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
418
uid_t uid = geteuid();
tests/sys/fs/fusefs/default_permissions.cc
452
uid = geteuid();
tests/sys/fs/fusefs/default_permissions.cc
478
uid = geteuid();
tests/sys/fs/fusefs/default_permissions.cc
58
if (geteuid() == 0) {
tests/sys/fs/fusefs/default_permissions.cc
641
expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
657
expect_lookup(RELPATH, ino, S_IFREG | 0666, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
785
expect_lookup(RELPATH, ino, S_IFREG | 0666, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions.cc
832
expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions_privileged.cc
110
expect_lookup(RELPATH, ino, S_IFREG | oldmode, UINT64_MAX, geteuid());
tests/sys/fs/fusefs/default_permissions_privileged.cc
56
if (geteuid() != 0) {
tests/sys/fs/fusefs/forget.cc
48
if (geteuid() != 0)
tests/sys/fs/fusefs/last_local_modify.cc
386
if (geteuid() != 0)
tests/sys/fs/fusefs/mknod.cc
102
if (geteuid() != 0) {
tests/sys/fs/fusefs/mknod.cc
59
if (geteuid() != 0) {
tests/sys/fs/fusefs/mount.cc
123
if (flag == MNT_NOSUID && 0 != geteuid())
tests/sys/fs/fusefs/mount.cc
125
if (flag == MNT_SUIDDIR && 0 != geteuid())
tests/sys/fs/fusefs/nfs.cc
51
if (geteuid() != 0)
tests/sys/fs/fusefs/rename.cc
223
out.body.entry.attr.uid = geteuid();
tests/sys/fs/fusefs/utils.cc
94
if (geteuid() != 0 && !usermount_val)
tests/sys/kern/unix_stream.c
78
real_euid = geteuid();
tests/sys/netinet/fibs_multibind_test.c
168
if (geteuid() != 0)
tools/regression/ethernet/ethermulti/ethermulti.c
242
if (geteuid() != 0) {
tools/regression/ethernet/ethermulti/ethermulti.c
248
getuid(), geteuid());
tools/regression/ethernet/ethermulti/ethermulti.c
84
olduid = geteuid();
tools/regression/mlock/mlock.c
52
if (geteuid() != 0)
tools/regression/netinet/ipbroadcast/ipbroadcast.c
197
if (geteuid() != 0)
tools/regression/netinet/ipsockopt/ipsockopt.c
286
if (geteuid() != 0) {
tools/regression/netinet/ipsockopt/ipsockopt.c
289
"uid %d", geteuid());
tools/regression/netinet/ipsockopt/ipsockopt.c
755
if (geteuid() != 0 && !priv && socktype == SOCK_RAW)
tools/regression/netinet/ipsockopt/ipsockopt.c
80
olduid = geteuid();
tools/regression/netinet/ipsockopt/ipsockopt.c
916
if (geteuid() != 0) {
tools/regression/netinet/ipsockopt/ipsockopt.c
920
"Running tests with uid %d sock uid %d\n", geteuid(),
tools/regression/netinet/ipsockopt/ipsockopt.c
921
geteuid());
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/netinet/msocket/msocket.c
435
if (geteuid() != 0)
tools/regression/priv/main.c
541
if (getuid() != 0 && geteuid() != 0)
tools/regression/security/access/testaccess.c
171
if (geteuid() != 0) {
tools/regression/security/cap_test/cap_test_capmode.c
142
CHECK_SYSCALL_VOID_NOT_ECAPMODE(geteuid);
tools/regression/sockets/so_setfib/so_setfib.c
171
if (geteuid() != 0) {
tools/regression/sockets/unix_cmsg/unix_cmsg.c
308
uc_cfg.proc_cred.euid = geteuid();
tools/regression/sysvmsg/msgtest.c
261
uid_t uid = geteuid();
tools/regression/sysvsem/semtest.c
280
uid_t uid = geteuid();
tools/regression/sysvshm/shmtest.c
225
uid_t uid = geteuid();
tools/tools/tionxcl/tionxcl.c
57
if (geteuid() != 0)
usr.bin/at/perm.c
87
uid_t uid = geteuid();
usr.bin/at/privs.h
73
effective_uid = geteuid(); \
usr.bin/at/privs.h
82
effective_uid = geteuid(); \
usr.bin/find/function.c
456
geteuid() == 0)
usr.bin/finger/finger.c
152
if (getuid() == 0 || geteuid() == 0) {
usr.bin/id/id.c
184
id = pw ? pw->pw_uid : rflag ? getuid() : geteuid();
usr.bin/id/id.c
249
if ((eid = geteuid()) != rid) {
usr.bin/id/id.c
312
if (!print_dbinfo && (euid = geteuid()) != uid) {
usr.bin/login/login.c
199
euid = geteuid();
usr.bin/login/login_audit.c
139
if ((tok = au_to_subject32(-1, geteuid(), getegid(), -1, -1,
usr.bin/login/login_audit.c
146
if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid,
usr.bin/login/login_audit.c
192
if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid,
usr.bin/login/login_audit.c
95
if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid,
usr.bin/newgrp/newgrp.c
74
if ((euid = geteuid()) != 0)
usr.bin/su/su.c
205
if (geteuid() != 0)
usr.bin/tip/tip/tip.c
64
euid = geteuid();
usr.bin/wall/wall.c
102
if (geteuid() == 0)
usr.sbin/bhyve/slirp/slirp-helper.c
411
if (geteuid() != 0)
usr.sbin/chown/chown.c
256
euid == (uid_t)-1 && (euid = geteuid()) != 0)) {
usr.sbin/chown/chown.c
263
euid == (uid_t)-1 && (euid = geteuid()) != 0) {
usr.sbin/chroot/chroot.c
177
if (errno == EPERM && !nonprivileged && geteuid() != 0)
usr.sbin/clear_locks/clear_locks.c
51
if (geteuid() != 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/efibootmgr/efibootmgr.c
1106
if (errno == EACCES && geteuid() != 0)
usr.sbin/inetd/inetd.c
452
euid = geteuid();
usr.sbin/lpr/lpc/lpc.c
82
euid = geteuid();
usr.sbin/lpr/lpd/lpd.c
130
euid = geteuid(); /* these shouldn't be different */
usr.sbin/lpr/lpq/lpq.c
77
euid = geteuid();
usr.sbin/lpr/lpr/lpr.c
133
euid = geteuid();
usr.sbin/lpr/lprm/lprm.c
84
euid = geteuid();
usr.sbin/lpr/pac/pac.c
102
euid = geteuid(); /* these aren't used in pac(1) */
usr.sbin/newsyslog/newsyslog.c
339
if (needroot && getuid() && geteuid())
usr.sbin/nscd/nscd.c
716
if (geteuid() != 0)
usr.sbin/pmc/cmd_pmc_stat.c
173
if (system_mode && geteuid() != 0)
usr.sbin/pnfsdscopymr/pnfsdscopymr.c
83
if (geteuid() != 0)
usr.sbin/pnfsdsfile/pnfsdsfile.c
172
if (geteuid() != 0)
usr.sbin/pnfsdsfile/pnfsdsfile.c
211
if (geteuid() != 0)
usr.sbin/pnfsdsfile/pnfsdsfile.c
252
if (geteuid() != 0)
usr.sbin/pnfsdskill/pnfsdskill.c
63
if (geteuid() != 0)
usr.sbin/powerd/powerd.c
597
if (geteuid() != 0)
usr.sbin/ppp/id.c
65
euid = geteuid();
usr.sbin/pw/pw_user.c
256
if (!conf.altroot && geteuid() != 0)
usr.sbin/pw/pw_vpw.c
73
if (geteuid() == 0) {
usr.sbin/route6d/route6d.c
378
if (geteuid()) {
usr.sbin/rpc.lockd/lock_proc.c
279
old_euid = geteuid();
usr.sbin/rpc.lockd/lockd.c
182
if (geteuid()) { /* This command allowed only to root */
usr.sbin/rpcbind/rpcbind.c
192
if (geteuid()) { /* This command allowed only to root */
usr.sbin/ypldap/ypldap.c
557
if (geteuid())