Home
last modified time | relevance | path

Searched refs:geteuid (Results 1 - 25 of 167) sorted by relevance

1234567

/third_party/rust/crates/rustix/tests/process/
H A Did.rs23 assert_eq!(process::geteuid(), process::geteuid()); in test_geteuid()
25 assert_eq!(process::geteuid().as_raw(), libc::geteuid()); in test_geteuid()
26 assert_eq!(process::geteuid().is_root(), libc::geteuid() == 0); in test_geteuid()
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
H A Dsetreuid.c28 uid_t ceuid = geteuid(); in setreuid_0100()
38 uid_t euid = geteuid(); in setreuid_0100()
58 uid_t ceuid = geteuid(); in setreuid_0200()
68 uid_t euid = geteuid(); in setreuid_0200()
H A Dgeteuid.c28 uid_t euid = geteuid(); in geteuid_0100()
/third_party/ltp/testcases/kernel/syscalls/setfsgid/
H A Dsetfsgid02.c47 tst_res(TFAIL, "EUID %d: setfsgid() returned %ld", geteuid(), TST_RET); in run()
50 geteuid(), TST_RET); in run()
/third_party/musl/libc-test/src/functional/
H A Dstat.c46 TEST(st.st_uid==geteuid(), "%d vs %d\n", (int)st.st_uid, (int)geteuid()); in main()
47 TEST(st.st_gid==getegid(), "%d vs %d\n", (int)st.st_uid, (int)geteuid()); in main()
H A Dipc_sem.c59 EQ(semid_ds.sem_perm.cuid, geteuid(), "got %d, want %d"); in inc()
60 EQ(semid_ds.sem_perm.uid, geteuid(), "got %d, want %d"); in inc()
H A Dipc_shm.c53 EQ(shmid_ds.shm_perm.cuid, geteuid(), "got %d, want %d"); in set()
54 EQ(shmid_ds.shm_perm.uid, geteuid(), "got %d, want %d"); in set()
H A Dipc_msg.c56 EQ(qid_ds.msg_perm.cuid, geteuid(), "got %d, want %d"); in snd()
57 EQ(qid_ds.msg_perm.uid, geteuid(), "got %d, want %d"); in snd()
/third_party/ntfs-3g/libfuse-lite/
H A Dfusermount.c104 if (!geteuid()) { in drop_privs()
108 if (setresuid(-1, new_uid, geteuid()) < 0) { in drop_privs()
112 if (geteuid() != new_uid){ in drop_privs()
123 if (geteuid()) { in restore_privs()
135 if (geteuid() != suid) { in restore_privs()
637 if (geteuid() == 0) { in mount_fuse()
685 if (geteuid() == 0) in fusermount()
H A Dmount_util.c74 setuid(geteuid()); in fuse_mnt_add_mount()
127 setuid(geteuid()); in fuse_mnt_umount()
318 if (setuid(geteuid())) in fuse_mnt_add_mount()
368 if (setuid(geteuid())) in fuse_mnt_umount()
/third_party/ltp/testcases/kernel/containers/userns/
H A Duserns02.c26 uid = geteuid(); in child_fn1()
50 parentuid = geteuid(); in run()
H A Duserns07.c46 parentuid = geteuid(); in child_fn1()
74 parentuid = geteuid(); in run()
H A Duserns06.c52 uid = geteuid(); in child_fn2()
76 parentuid = geteuid(); in run()
H A Duserns03.c60 uid = geteuid(); in child_fn2()
130 parentuid = geteuid(); in run()
/third_party/ltp/testcases/kernel/syscalls/getresuid/
H A Dgetresuid01.c140 pe_uid = geteuid(); in setup()
143 ps_uid = geteuid(); in setup()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/
H A D6-1.c66 pw->pw_name, geteuid(), getuid()); in set_nonroot()
81 if (geteuid() == 0) { in main()
/third_party/ltp/testcases/kernel/syscalls/lchown/
H A Dlchown03.c118 UID16_CHECK(geteuid(), "lchown", cleanup) in lchown_verify()
121 TEST(LCHOWN(cleanup, test->pathname, geteuid(), getegid())); in lchown_verify()
/third_party/python/Lib/test/
H A Dtest_spwd.py12 @unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0,
63 @unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0,
/third_party/musl/src/unistd/
H A Dgeteuid.c4 uid_t geteuid(void) in geteuid() function
/third_party/libfuse/lib/
H A Dmount_util.c114 if(setuid(geteuid()) == -1) { in add_mount()
173 if(setuid(geteuid()) == -1) { in exec_umount()
245 if(setuid(geteuid()) == -1) { in remove_mount()
/third_party/toybox/toys/posix/
H A Dcpio.c150 if (!err && !geteuid() && !(toys.optflags & FLAG_no_preserve_owner)) in cpio_main()
176 if (!geteuid() && !(toys.optflags & FLAG_no_preserve_owner)) { in cpio_main()
191 if (!S_ISREG(mode) && !S_ISLNK(mode) && !geteuid() in cpio_main()
/third_party/ltp/testcases/kernel/syscalls/statx/
H A Dstatx01.c111 if (geteuid() == buff.stx_uid) in test_normal_file()
115 buff.stx_uid, geteuid()); in test_normal_file()
/third_party/rust/crates/rustix/src/process/
H A Did.rs200 /// `geteuid()`—Returns the process' effective user ID.
206 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/geteuid.html
207 /// [Linux]: https://man7.org/linux/man-pages/man2/geteuid.2.html
210 pub fn geteuid() -> Uid { in geteuid() functions
211 backend::process::syscalls::geteuid() in geteuid()
/third_party/ltp/testcases/kernel/syscalls/chown/
H A Dchown01.c30 UID16_CHECK((uid = geteuid()), "chown"); in setup()
/third_party/ltp/testcases/kernel/syscalls/setfsuid/
H A Dsetfsuid02.c23 current_uid = geteuid(); in run()

Completed in 8 milliseconds

1234567