Home
last modified time | relevance | path

Searched refs:getuid (Results 1 – 25 of 241) sorted by relevance

12345678910

/freebsd/contrib/sendmail/test/
H A Dt_setreuid.c40 (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 Dt_setuid.c38 (int) getuid(), (int) geteuid());
47 uid_t realuid = getuid();
57 if (getuid() == 0)
73 if (getuid() != 1)
97 if (getuid() != 1)
H A Dt_seteuid.c43 (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 Dtest_write_disk_perms.c50 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 Disolation.cpp100 % 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 Dpasswd_test.cpp76 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 Dplatform.c90 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 Duidswap.c165 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 Dsftp-server-main.c45 if ((user_pw = getpwuid(getuid())) == NULL) { in main()
47 (u_long)getuid()); in main()
H A Dlogintest.c100 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 Dsmrsh.c240 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 Dt_wait.c93 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 Dt_setuid.c65 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 Dlock.c111 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 Dlprm.c83 uid = getuid(); in main()
95 if (getuid() == 0) { in main()
98 if ((p = getpwuid(getuid())) == NULL) in main()
/freebsd/usr.bin/newgrp/
H A Dnewgrp.c65 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 Did.c177 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 Dstatfs.cc74 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 Daccess.c189 (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 Dctime.c249 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 Dcrontab.c122 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 Dpam_passwdqc.c299 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/contrib/sendmail/libsm/
H A Dt-shm.c88 i = sm_shmsetowner(shmid, getuid(), getgid(), 0644);
173 r = sm_shmsetowner(shmid, getuid(), getgid(), 0660);
/freebsd/contrib/netbsd-tests/lib/libc/ttyio/
H A Dt_ptm.c95 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()
/freebsd/tools/regression/netinet/ipsockopt/
H A Dipsockopt.c77 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()

12345678910