/freebsd/contrib/sendmail/test/ |
H A D | t_setreuid.c | 40 (int) getuid(), (int) geteuid()); 49 uid_t realuid = getuid(); 59 if (getuid() == 0) 72 if (getuid() != 0) 104 if (getuid() != realuid) 124 if (getuid() != 0) 150 if (getuid() != realuid)
|
H A D | t_setuid.c | 38 (int) getuid(), (int) geteuid()); 47 uid_t realuid = getuid(); 57 if (getuid() == 0) 73 if (getuid() != 1) 97 if (getuid() != 1)
|
H A D | t_seteuid.c | 43 (int) getuid(), (int) geteuid()); 52 uid_t realuid = getuid(); 62 if (getuid() == 0) 92 if (getuid() != realuid) 126 if (getuid() != realuid)
|
/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_write_disk_perms.c | 50 uid_t uid = getuid(); in searchgid() 145 assertEqualInt(0, chown(".", getuid(), getgid())); in DEFINE_TEST() 208 if (getuid() == 0) { in DEFINE_TEST() 209 original_uid = getuid() + 1; in DEFINE_TEST() 210 try_to_change_uid = getuid(); in DEFINE_TEST() 213 original_uid = getuid(); in DEFINE_TEST() 214 try_to_change_uid = getuid() + 1; in DEFINE_TEST() 256 archive_entry_set_uid(ae, getuid()); in DEFINE_TEST() 269 archive_entry_set_uid(ae, getuid() + 1); in DEFINE_TEST() 281 if (getuid() ! in DEFINE_TEST() [all...] |
/freebsd/contrib/kyua/utils/process/ |
H A D | isolation.cpp | 100 % file % uid % gid % ::getuid() % ::getgid(), errno); in do_chown() 157 % user.gid % ::getuid() % ::getgid(), errno); in isolate_child() 158 if (::getuid() == 0) { in isolate_child() 163 % user.gid % ::getuid() % ::getgid(), errno); in isolate_child() 166 if (user.uid != ::getuid()) { in isolate_child() 169 % user.uid % ::getuid() % ::getgid(), errno); in isolate_child() 195 const bool change_user = user.uid != ::getuid(); in isolate_path() 202 do_chown(file, ::getuid(), user.gid); in isolate_path()
|
/freebsd/contrib/kyua/utils/ |
H A D | passwd_test.cpp | 76 ATF_REQUIRE_EQ(::getuid(), user.uid); in ATF_TEST_CASE_BODY() 84 const passwd_ns::user new_user("someone-else", ::getuid() + 1, 0); in ATF_TEST_CASE_BODY() 88 ATF_REQUIRE(::getuid() != user.uid); in ATF_TEST_CASE_BODY() 96 const struct ::passwd* pw = ::getpwuid(::getuid()); in ATF_TEST_CASE_BODY() 100 ATF_REQUIRE_EQ(::getuid(), user.uid); in ATF_TEST_CASE_BODY() 136 const passwd_ns::user user = passwd_ns::find_user_by_uid(::getuid()); in ATF_TEST_CASE_BODY() 137 ATF_REQUIRE_EQ(::getuid(), user.uid); in ATF_TEST_CASE_BODY() 140 const struct ::passwd* pw = ::getpwuid(::getuid()); in ATF_TEST_CASE_BODY()
|
/freebsd/crypto/openssh/ |
H A D | platform.c | 90 return (getuid() == 0 || geteuid() == 0); in platform_privileged_uidswap() 112 if (!options.use_pam && (getuid() == 0 || geteuid() == 0)) in platform_setusercontext() 117 if (getuid() == 0 || geteuid() == 0) in platform_setusercontext() 126 if (getuid() == 0 || geteuid() == 0) { in platform_setusercontext() 134 if (getuid() == 0 || geteuid() == 0) { in platform_setusercontext()
|
H A D | uidswap.c | 165 if (setuid(getuid()) == -1) in restore_uid() 184 uid_t old_uid = getuid(); in permanently_set_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()
|
H A D | sftp-server-main.c | 45 if ((user_pw = getpwuid(getuid())) == NULL) { in main() 47 (u_long)getuid()); in main()
|
H A D | logintest.c | 100 pw = getpwuid(getuid()); in testAPI() 145 t1 = login_get_lastlog_time(getuid()); in testAPI() 185 t2 = login_get_lastlog_time(getuid()); in testAPI()
|
/freebsd/contrib/sendmail/smrsh/ |
H A D | smrsh.c | 240 syslog(LOG_CRIT, "uid %d: missing command to exec", (int) getuid()); 302 (int) getuid(), cmd); 321 (int) getuid(), cmd); 339 (int) getuid(), cmd); 353 (int) getuid(), cmd); 397 (int) getuid(), *r, par); 407 (int) getuid());
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_wait.c | 93 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 129 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 175 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 216 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 231 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 246 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 291 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 302 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY() 313 ATF_REQUIRE(si.si_uid == getuid()); in ATF_TC_BODY()
|
H A D | t_setuid.c | 65 uid_t uid = getuid(); in ATF_TC_BODY() 69 ATF_REQUIRE(getuid() == uid); in ATF_TC_BODY() 99 uid = getuid(); in ATF_TC_BODY()
|
/freebsd/usr.bin/lock/ |
H A D | lock.c | 111 if (!(pw = getpwuid(getuid()))) in main() 112 errx(1, "unknown uid %d", getuid()); in main() 128 if (setuid(getuid()) != 0) in main() 240 if (getuid() == 0) in main() 248 if (getuid() == 0) in main()
|
/freebsd/usr.sbin/lpr/lprm/ |
H A D | lprm.c | 83 uid = getuid(); in main() 95 if (getuid() == 0) { in main() 98 if ((p = getpwuid(getuid())) == NULL) in main()
|
/freebsd/usr.bin/newgrp/ |
H A D | newgrp.c | 65 if (seteuid(getuid()) < 0) \ 76 if (seteuid(getuid()) < 0) in main() 79 if ((pwd = getpwuid(getuid())) == NULL) in main() 109 if (setuid(getuid()) < 0) in main() 178 if (!dbmember && *grp->gr_passwd != '\0' && getuid() != 0) { in addgroup()
|
/freebsd/usr.bin/id/ |
H A D | id.c | 177 id = pw ? pw->pw_uid : rflag ? getuid() : geteuid(); in main() 209 id = getuid(); in main() 231 pw = getpwuid(rid = getuid()); in pretty() 272 uid = getuid(); in id_print() 291 printf("uid=%u", getuid()); in id_print() 456 if ((pw = getpwuid(getuid())) == NULL) in pline()
|
/freebsd/tests/sys/fs/fusefs/ |
H A D | statfs.cc | 74 EXPECT_EQ(getuid(), statbuf.f_owner); in TEST_F() 126 EXPECT_EQ(getuid(), statbuf.f_owner); in TEST_F() 167 EXPECT_EQ(getuid(), statbuf.f_owner); in TEST_F()
|
/freebsd/contrib/ncurses/ncurses/tinfo/ |
H A D | access.c | 189 (getuid() != geteuid() \ 211 setfsuid(getuid()); \ 241 if ((getuid() == ROOT_UID) || (geteuid() == ROOT_UID)) { in _nc_env_access()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | ctime.c | 249 if (chown(pfile, getuid(), getgid()) == -1) { in do_chown() 251 "%d\n", pfile, (int)getuid(), (int)getgid(), errno); in do_chown() 271 "%d\n", pfile, (int)getuid(), (int)getgid(), errno); in do_xattr()
|
/freebsd/usr.sbin/cron/crontab/ |
H A D | crontab.c | 122 if (!(pw = getpwuid(getuid()))) in parse_args() 137 if (getuid() != ROOT_UID) in parse_args() 337 if (fchown(t, getuid(), getgid()) < 0) { 339 if (chown(Filename, getuid(), getgid()) < 0) { 394 if (setuid(getuid()) < 0)
|
/freebsd/contrib/pam_modules/pam_passwdqc/ |
H A D | pam_passwdqc.c | 299 if (getuid() != 0) { in parse() 343 if (ask_oldauthtok && getuid() != 0) { in pam_sm_chauthtok() 382 if ((params.flags & F_CHECK_OLDAUTHTOK) && getuid() != 0) { in pam_sm_chauthtok() 411 if (getuid() != 0) in pam_sm_chauthtok() 479 say(pamh, PAM_ERROR_MSG, getuid() != 0 ? in pam_sm_chauthtok()
|
/freebsd/tools/regression/netinet/ipsockopt/ |
H A D | ipsockopt.c | 77 if (getuid() != 0) in get_socket_priv() 753 if (getuid() != 0 && socktype == SOCK_RAW) in testsuite() 926 getuid(), geteuid()); in main() 932 getuid(), geteuid()); in main() 936 getuid(), geteuid()); in main()
|
/freebsd/contrib/sendmail/libsm/ |
H A D | t-shm.c | 88 i = sm_shmsetowner(shmid, getuid(), getgid(), 0644); 173 r = sm_shmsetowner(shmid, getuid(), getgid(), 0660);
|
/freebsd/contrib/netbsd-tests/lib/libc/ttyio/ |
H A D | t_ptm.c | 95 ATF_REQUIRE_EQ_MSG(sts.st_uid, getuid(), "bad slave uid"); in ATF_TC_BODY() 160 ATF_REQUIRE_EQ_MSG(sts.st_uid, getuid(), "bad slave uid"); in ATF_TC_BODY()
|