Home
last modified time | relevance | path

Searched refs:ruid (Results 1 – 25 of 47) sorted by relevance

12

/external/mtools/
Dprivileges.c75 static uid_t ruid, euid; variable
101 setresuid(ruid, uid, euid); in Setuid()
122 Setuid(ruid); in drop_privs()
134 setuid(ruid); /* this should be enough to get rid of the three in destroy_privs()
136 seteuid(ruid); /* for good measure... just in case we came in destroy_privs()
141 setresuid(ruid, ruid, ruid); in destroy_privs()
157 return ruid; in get_real_uid()
163 ruid = getuid(); in init_privs()
168 if(euid != ruid) { in init_privs()
177 if(euid != ruid) { in init_privs()
[all …]
/external/ltp/testcases/kernel/syscalls/setreuid/
Dsetreuid01.c19 static uid_t ruid, euid; variable
23 ruid = getuid(); in run()
24 UID16_CHECK(ruid, setreuid); in run()
31 TST_EXP_PASS(SETREUID(ruid, -1)); in run()
32 TST_EXP_PASS(SETREUID(-1, ruid)); in run()
35 TST_EXP_PASS(SETREUID(ruid, ruid)); in run()
/external/ltp/testcases/kernel/syscalls/setfsuid/
Dsetfsuid03.c33 uid_t ruid, euid, suid; in run() local
35 SAFE_GETRESUID(&ruid, &euid, &suid); in run()
37 UID16_CHECK(ruid, setfsuid); in run()
39 TST_EXP_VAL_SILENT(SETFSUID(ruid), nobody_uid); in run()
40 TST_EXP_VAL(SETFSUID(-1), ruid, "setfsuid(fsuid) by non-root user:"); in run()
/external/ltp/testcases/kernel/syscalls/utils/
Dcompat_16.h35 int setresuid(uid_t ruid, uid_t euid, uid_t suid);
36 int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
125 int SETREUID(void (cleanup)(void), UID_T ruid, UID_T euid) in SETREUID() argument
127 LTP_CREATE_SYSCALL(setreuid, cleanup, ruid, euid); in SETREUID()
134 int SETRESUID(void (cleanup)(void), UID_T ruid, UID_T euid, UID_T suid) in SETRESUID() argument
136 LTP_CREATE_SYSCALL(setresuid, cleanup, ruid, euid, suid); in SETRESUID()
139 int GETRESUID(void (cleanup)(void), UID_T *ruid, UID_T *euid, UID_T *suid) in GETRESUID() argument
141 LTP_CREATE_SYSCALL(getresuid, cleanup, ruid, euid, suid); in GETRESUID()
Dcompat_tst_16.h32 int setresuid(uid_t ruid, uid_t euid, uid_t suid);
122 int SETREUID(UID_T ruid, UID_T euid) in SETREUID() argument
124 TST_CREATE_SYSCALL(setreuid, ruid, euid); in SETREUID()
131 int SETRESUID(UID_T ruid, UID_T euid, UID_T suid) in SETRESUID() argument
133 TST_CREATE_SYSCALL(setresuid, ruid, euid, suid); in SETRESUID()
/external/minijail/test/
Dlibminijail_test.cpp54 uid_t ruid = getuid(); in check_ugid() local
55 if (ruid != expected_id) { in check_ugid()
56 LOG(ERROR) << "rUID " << ruid << " is not " << expected_id; in check_ugid()
61 LOG(ERROR) << "rGID " << ruid << " is not " << expected_id; in check_ugid()
98 uid_t ruid, euid, suid; in log_resugid() local
100 getresuid(&ruid, &euid, &suid); in log_resugid()
103 LOG(INFO) << "ruid " << ruid << " euid " << euid << " suid " << suid; in log_resugid()
/external/ltp/lib/
Dtst_uid.c75 uid_t ruid, euid, suid; in tst_check_resuid_() local
77 SAFE_GETRESUID(&ruid, &euid, &suid); in tst_check_resuid_()
79 if (ruid == exp_ruid && euid == exp_euid && suid == exp_suid) in tst_check_resuid_()
90 (int)ruid, (int)euid, (int)suid); in tst_check_resuid_()
Dtst_safe_macros.c169 uid_t ruid, uid_t euid) in safe_setreuid() argument
173 rval = setreuid(ruid, euid); in safe_setreuid()
177 "setreuid(%li, %li) failed", (long)ruid, (long)euid); in safe_setreuid()
181 (long)ruid, (long)euid, rval); in safe_setreuid()
208 uid_t ruid, uid_t euid, uid_t suid) in safe_setresuid() argument
212 ret = setresuid(ruid, euid, suid); in safe_setresuid()
216 "setreuid(%li, %li, %li) failed", (long)ruid, in safe_setresuid()
221 (long)ruid, (long)euid, (long)suid, ret); in safe_setresuid()
Dsafe_macros.c386 uid_t *ruid, uid_t *euid, uid_t *suid) in safe_getresuid() argument
390 rval = getresuid(ruid, euid, suid); in safe_getresuid()
394 "getresuid(%p, %p, %p) failed", ruid, euid, suid); in safe_getresuid()
397 "Invalid getresuid(%p, %p, %p) return value %d", ruid, in safe_getresuid()
/external/minijail/examples/
Ddrop_privs.cpp27 uid_t ruid, euid, suid; in log_resugid() local
29 getresuid(&ruid, &euid, &suid); in log_resugid()
32 LOG(INFO) << "ruid " << ruid << " euid " << euid << " suid " << suid; in log_resugid()
/external/musl/src/unistd/
Dsetreuid.c5 int setreuid(uid_t ruid, uid_t euid) in setreuid() argument
7 return __setxid(SYS_setreuid, ruid, euid, 0); in setreuid()
Dsetresuid.c6 int setresuid(uid_t ruid, uid_t euid, uid_t suid) in setresuid() argument
8 return __setxid(SYS_setresuid, ruid, euid, suid); in setresuid()
/external/musl/src/misc/
Dgetresuid.c5 int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid) in getresuid() argument
7 return syscall(SYS_getresuid, ruid, euid, suid); in getresuid()
/external/libfuse/lib/
Dmount_util.c62 uid_t ruid; in mtab_needs_update() local
68 ruid = getuid(); in mtab_needs_update()
69 if (ruid != 0) in mtab_needs_update()
74 if (ruid != 0) in mtab_needs_update()
75 setreuid(ruid, -1); in mtab_needs_update()
/external/ltp/include/
Dtst_uid.h32 #define tst_check_resuid(cstr, ruid, euid, suid) \ argument
33 tst_check_resuid_(__FILE__, __LINE__, (cstr), (ruid), (euid), (suid))
Dtst_safe_macros.h123 uid_t ruid, uid_t euid);
125 #define SAFE_SETREUID(ruid, euid) \ argument
126 safe_setreuid(__FILE__, __LINE__, (ruid), (euid))
134 uid_t ruid, uid_t euid, uid_t suid);
135 #define SAFE_SETRESUID(ruid, euid, suid) \ argument
136 safe_setresuid(__FILE__, __LINE__, (ruid), (euid), (suid))
138 #define SAFE_GETRESUID(ruid, euid, suid) \ argument
139 safe_getresuid(__FILE__, __LINE__, NULL, (ruid), (euid), (suid))
Dsafe_macros_fn.h100 uid_t *ruid, uid_t *euid, uid_t *suid);
/external/ltp/testcases/kernel/syscalls/sched_setscheduler/
Dsched_setscheduler03.c107 uid_t ruid, euid, suid; in setup() local
139 SAFE_GETRESUID(&ruid, &euid, &suid); in setup()
/external/compiler-rt/include/sanitizer/
Dlinux_syscall_hooks.h77 #define __sanitizer_syscall_pre_getresuid(ruid, euid, suid) \ argument
78 __sanitizer_syscall_pre_impl_getresuid((long)(ruid), (long)(euid), \
80 #define __sanitizer_syscall_post_getresuid(res, ruid, euid, suid) \ argument
81 __sanitizer_syscall_post_impl_getresuid(res, (long)(ruid), (long)(euid), \
113 #define __sanitizer_syscall_pre_setreuid(ruid, euid) \ argument
114 __sanitizer_syscall_pre_impl_setreuid((long)(ruid), (long)(euid))
115 #define __sanitizer_syscall_post_setreuid(res, ruid, euid) \ argument
116 __sanitizer_syscall_post_impl_setreuid(res, (long)(ruid), (long)(euid))
121 #define __sanitizer_syscall_pre_setresuid(ruid, euid, suid) \ argument
122 __sanitizer_syscall_pre_impl_setresuid((long)(ruid), (long)(euid), \
[all …]
/external/kernel-headers/original/uapi/linux/
Dcn_proc.h89 __u32 ruid; /* task uid */ member
/external/ltp/include/old/
Dsafe_macros.h85 #define SAFE_GETRESUID(cleanup_fn, ruid, euid, suid) \ argument
86 safe_getresuid(__FILE__, __LINE__, cleanup_fn, (ruid), (euid), (suid))
/external/google-breakpad/src/third_party/lss/
Dlinux_syscall_support.h3673 LSS_INLINE int LSS_NAME(getresuid32)(uid_t *ruid, in LSS_NAME()
3676 return LSS_NAME(getresuid)(ruid, euid, suid); in LSS_NAME()
3691 LSS_INLINE int LSS_NAME(setresuid32)(uid_t ruid, uid_t euid, uid_t suid) { in LSS_NAME()
3692 return LSS_NAME(setresuid)(ruid, euid, suid); in LSS_NAME()
3788 LSS_INLINE int LSS_NAME(getresuid32)(uid_t *ruid, in LSS_NAME()
3792 if ((rc = LSS_NAME(_getresuid32)(ruid, euid, suid)) < 0 && in LSS_NAME()
3794 if ((ruid == NULL) || (euid == NULL) || (suid == NULL)) { in LSS_NAME()
3798 *ruid = *euid = *suid = 0; in LSS_NAME()
3799 rc = LSS_NAME(getresuid)(ruid, euid, suid); in LSS_NAME()
3845 LSS_INLINE int LSS_NAME(setresuid32)(uid_t ruid, uid_t euid, uid_t suid) { in LSS_NAME()
[all …]
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_common_syscalls.inc296 PRE_SYSCALL(getresuid)(void *ruid, void *euid, void *suid) {}
298 POST_SYSCALL(getresuid)(long res, void *ruid, void *euid, void *suid) {
300 if (ruid) POST_WRITE(ruid, sizeof(unsigned));
345 PRE_SYSCALL(setreuid)(long ruid, long euid) {}
347 POST_SYSCALL(setreuid)(long res, long ruid, long euid) {}
353 PRE_SYSCALL(setresuid)(long ruid, long euid, long suid) {}
355 POST_SYSCALL(setresuid)(long res, long ruid, long euid, long suid) {}
1473 PRE_SYSCALL(setreuid16)(long ruid, long euid) {}
1475 POST_SYSCALL(setreuid16)(long res, long ruid, long euid) {}
1481 PRE_SYSCALL(setresuid16)(long ruid, long euid, long suid) {}
[all …]
/external/cronet/third_party/lss/
Dlinux_syscall_support.h4386 LSS_INLINE int LSS_NAME(getresuid32)(uid_t *ruid, in LSS_NAME()
4389 return LSS_NAME(getresuid)(ruid, euid, suid); in LSS_NAME()
4404 LSS_INLINE int LSS_NAME(setresuid32)(uid_t ruid, uid_t euid, uid_t suid) { in LSS_NAME()
4405 return LSS_NAME(setresuid)(ruid, euid, suid); in LSS_NAME()
4501 LSS_INLINE int LSS_NAME(getresuid32)(uid_t *ruid, in LSS_NAME()
4505 if ((rc = LSS_NAME(_getresuid32)(ruid, euid, suid)) < 0 && in LSS_NAME()
4507 if ((ruid == NULL) || (euid == NULL) || (suid == NULL)) { in LSS_NAME()
4511 *ruid = *euid = *suid = 0; in LSS_NAME()
4512 rc = LSS_NAME(getresuid)(ruid, euid, suid); in LSS_NAME()
4558 LSS_INLINE int LSS_NAME(setresuid32)(uid_t ruid, uid_t euid, uid_t suid) { in LSS_NAME()
[all …]
/external/ltp/testcases/kernel/connectors/pec/
Dpec_listener.c202 pe->event_data.id.e.euid, pe->event_data.id.r.ruid); in process_event()

12