Home
last modified time | relevance | path

Searched refs:geteuid (Results 1 – 25 of 224) sorted by relevance

123456789

/freebsd/contrib/sendmail/test/
H A Dt_seteuid.c43 (int) getuid(), (int) geteuid());
56 if (geteuid() != 0)
72 if (geteuid() != 1)
87 if (geteuid() != 0)
106 if (geteuid() != 2)
121 if (geteuid() != 0)
H A Dt_setreuid.c40 (int) getuid(), (int) geteuid());
53 if (geteuid() != 0)
78 if (geteuid() != 1)
99 if (geteuid() != 0)
118 if (geteuid() != 2)
145 if (geteuid() != 0)
H A Dt_setuid.c38 (int) getuid(), (int) geteuid());
51 if (geteuid() != 0)
67 if (geteuid() != 1)
92 if (geteuid() != 1)
/freebsd/contrib/openpam/lib/libpam/
H A Dopenpam_borrow_cred.c74 if (geteuid() != 0 && geteuid() != pwd->pw_uid) { in openpam_borrow_cred()
76 (int)geteuid()); in openpam_borrow_cred()
82 scred->euid = geteuid(); in openpam_borrow_cred()
95 if (geteuid() == pwd->pw_uid) in openpam_borrow_cred()
H A Dopenpam_check_owner_perms.c63 arbitrator = geteuid(); in openpam_check_desc_owner_perms()
108 arbitrator = geteuid(); in openpam_check_path_owner_perms()
/freebsd/crypto/openssh/
H A Daudit.c126 (int)geteuid()); in audit_connection_from()
136 debug("audit event euid %d user %s event %d (%s)", geteuid(), in audit_event()
152 debug("audit session open euid %d user %s tty name %s", geteuid(), in audit_session_open()
168 debug("audit session close euid %d user %s tty name %s", geteuid(), in audit_session_close()
180 debug("audit run command euid %d user %s command '%.200s'", geteuid(), in audit_run_command()
H A Dplatform.c45 return (getuid() == 0 || geteuid() == 0); in platform_privileged_uidswap()
67 if (!options.use_pam && (getuid() == 0 || geteuid() == 0)) in platform_setusercontext()
72 if (getuid() == 0 || geteuid() == 0) in platform_setusercontext()
81 if (getuid() == 0 || geteuid() == 0) { in platform_setusercontext()
89 if (getuid() == 0 || geteuid() == 0) { in platform_setusercontext()
H A Duidswap.c65 saved_euid = geteuid(); in temporarily_use_uid()
77 if (geteuid() != 0) { in temporarily_use_uid()
127 if (setuid(geteuid()) == -1) in temporarily_use_uid()
128 debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno)); in temporarily_use_uid()
233 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) { in permanently_set_uid()
235 __func__, (u_int)getuid(), (u_int)geteuid(), in permanently_set_uid()
/freebsd/contrib/atf/atf-c/detail/
H A Duser.c42 return geteuid(); in atf_user_euid()
68 return geteuid() == 0; in atf_user_is_root()
74 return geteuid() != 0; in atf_user_is_unprivileged()
H A Duser_test.c50 ATF_REQUIRE_EQ(atf_user_euid(), geteuid()); in ATF_TC_BODY()
114 if (geteuid() == 0) in ATF_TC_BODY()
128 if (geteuid() != 0) in ATF_TC_BODY()
/freebsd/tools/regression/netinet/ipsockopt/
H A Dipsockopt.c80 olduid = geteuid(); in get_socket_priv()
286 if (geteuid() != 0) { in test_ip_hdrincl()
289 "uid %d", geteuid()); in test_ip_hdrincl()
755 if (geteuid() != 0 && !priv && socktype == SOCK_RAW) in testsuite()
916 if (geteuid() != 0) { in main()
920 "Running tests with uid %d sock uid %d\n", geteuid(), in main()
921 geteuid()); in main()
926 getuid(), geteuid()); in main()
932 getuid(), geteuid()); in main()
936 getuid(), geteuid()); in main()
/freebsd/usr.bin/login/
H A Dlogin_audit.c95 if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid, in au_login_success()
139 if ((tok = au_to_subject32(-1, geteuid(), getegid(), -1, -1, in au_login_fail()
146 if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, in au_login_fail()
192 if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid, in audit_logout()
/freebsd/lib/libc/rpc/
H A Dkey_call.c333 if (kcp->uid != geteuid()) { in getkeyserv_handle()
334 kcp->uid = geteuid(); in getkeyserv_handle()
392 kcp->uid = geteuid(); in getkeyserv_handle()
422 res = (*__key_encryptsession_pk_LOCAL)(geteuid(), arg); in key_call()
427 res = (*__key_decryptsession_pk_LOCAL)(geteuid(), arg); in key_call()
432 res = (*__key_gendes_LOCAL)(geteuid(), 0); in key_call()
/freebsd/contrib/capsicum-test/
H A Dmini-me.c19 int rc = (geteuid() == 0); in main()
20 …fprintf(stderr,"[uid:%d] %s immediately returning (geteuid() == 0) = %d\n", geteuid(), argv[0], rc… in main()
/freebsd/tests/sys/fs/fusefs/
H A Ddefault_permissions.cc58 if (geteuid() == 0) { in SetUp()
332 uid = geteuid(); in TEST_F()
362 uid_t uid = geteuid(); in TEST_F()
394 expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0755, UINT64_MAX, 1, geteuid()); in TEST_F()
395 expect_lookup(RELPATH, ino, S_IFREG | mode, UINT64_MAX, geteuid()); in TEST_F()
418 uid_t uid = geteuid(); in TEST_F()
452 uid = geteuid(); in TEST_F()
478 uid = geteuid(); in TEST_F()
641 expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid()); in TEST_F()
657 expect_lookup(RELPATH, ino, S_IFREG | 0666, UINT64_MAX, geteuid()); in TEST_F()
[all …]
H A Dallow_other.cc56 if (geteuid() != 0) { in SetUp()
145 in.header.uid == (uint32_t)geteuid() && in TEST_F()
160 in.header.uid != (uint32_t)geteuid() && in TEST_F()
H A Ddefault_permissions_privileged.cc56 if (geteuid() != 0) { in SetUp()
110 expect_lookup(RELPATH, ino, S_IFREG | oldmode, UINT64_MAX, geteuid()); in TEST_F()
/freebsd/tools/regression/ethernet/ethermulti/
H A Dethermulti.c84 olduid = geteuid(); in get_socket_priv()
242 if (geteuid() != 0) { in main()
248 getuid(), geteuid()); in main()
/freebsd/usr.bin/at/
H A Dprivs.h73 effective_uid = geteuid(); \
82 effective_uid = geteuid(); \
/freebsd/contrib/sendmail/src/
H A Drecipient.c1333 if (geteuid() != 0)
1335 euid = geteuid();
1383 if (geteuid() == 0 &&
1469 (long) getuid(), (long) geteuid());
1478 (long) getuid(), (long) geteuid());
1501 if ((geteuid() != 0 || RunAsUid != 0) &&
1506 (long) geteuid(), (long) RunAsUid);
1525 saveduid = geteuid();
1565 (long) uid, (long) getuid(), (long) geteuid());
1574 (long) uid, (long) getuid(), (long) geteuid());
[all …]
/freebsd/contrib/ncurses/ncurses/tinfo/
H A Daccess.c189 (getuid() != geteuid() \
216 setfsuid(geteuid()); \
241 if ((getuid() == ROOT_UID) || (geteuid() == ROOT_UID)) { in _nc_env_access()
/freebsd/sys/rpc/
H A Drpcb_clnt.c119 (void) snprintf(uidbuf, sizeof uidbuf, "%d", geteuid()); in rpcb_set()
159 (void) snprintf(uidbuf, sizeof uidbuf, "%d", geteuid()); in rpcb_unset()
/freebsd/crypto/heimdal/appl/afsutil/
H A Dpagsh.c171 struct passwd *pw = k_getpwuid(geteuid()); in main()
173 errx(1, "no such user: %d", (int)geteuid()); in main()
/freebsd/libexec/ftpd/
H A Dpopen.c135 if (getuid() != geteuid() && setuid(geteuid()) < 0) in ftpd_popen()
/freebsd/contrib/llvm-project/lldb/source/Host/posix/
H A DHostInfoPosix.cpp130 uint32_t HostInfoPosix::GetEffectiveUserID() { return geteuid(); } in GetEffectiveUserID()
137 if (std::optional<PasswdEntry> password = GetPassword(::geteuid())) in GetDefaultShell()

123456789