Home
last modified time | relevance | path

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

/kernel/liteos_a/testsuites/unittest/security/reugid/smoke/
Dreugid_test_001.cpp41 int ruid = 0; in Child1() local
54 ret = getresgid(reinterpret_cast<gid_t *>(&ruid), reinterpret_cast<gid_t *>(&euid), in Child1()
57 ICUNIT_ASSERT_EQUAL(ruid, 300, ruid); // 300: expected ruid in Child1()
61 ruid = getuid(); in Child1()
62 ICUNIT_ASSERT_EQUAL(ruid, 300, ruid); in Child1()
66 ret = getresuid(reinterpret_cast<gid_t *>(&ruid), reinterpret_cast<gid_t *>(&euid), in Child1()
69 ICUNIT_ASSERT_EQUAL(ruid, 300, ruid); // 300: expected ruid in Child1()
102 int ruid = 0; in Child() local
248 ruid = getuid(); in Child()
249 ICUNIT_ASSERT_EQUAL(ruid, 3000, ruid); // 3000: expected value of ruid in Child()
[all …]
/kernel/linux/linux-5.10/kernel/
Duid16.c48 SYSCALL_DEFINE2(setreuid16, old_uid_t, ruid, old_uid_t, euid) in SYSCALL_DEFINE2() argument
50 return __sys_setreuid(low2highuid(ruid), low2highuid(euid)); in SYSCALL_DEFINE2()
58 SYSCALL_DEFINE3(setresuid16, old_uid_t, ruid, old_uid_t, euid, old_uid_t, suid) in SYSCALL_DEFINE3() argument
60 return __sys_setresuid(low2highuid(ruid), low2highuid(euid), in SYSCALL_DEFINE3()
68 old_uid_t ruid, euid, suid; in SYSCALL_DEFINE3() local
70 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in SYSCALL_DEFINE3()
74 if (!(retval = put_user(ruid, ruidp)) && in SYSCALL_DEFINE3()
Duid16.h7 long __sys_setreuid(uid_t ruid, uid_t euid);
9 long __sys_setresuid(uid_t ruid, uid_t euid, uid_t suid);
Dsys.c503 long __sys_setreuid(uid_t ruid, uid_t euid) in __sys_setreuid() argument
511 kruid = make_kuid(ns, ruid); in __sys_setreuid()
514 if ((ruid != (uid_t) -1) && !uid_valid(kruid)) in __sys_setreuid()
525 if (ruid != (uid_t) -1) { in __sys_setreuid()
547 if (ruid != (uid_t) -1 || in __sys_setreuid()
563 SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) in SYSCALL_DEFINE2() argument
565 return __sys_setreuid(ruid, euid); in SYSCALL_DEFINE2()
631 long __sys_setresuid(uid_t ruid, uid_t euid, uid_t suid) in __sys_setresuid() argument
639 kruid = make_kuid(ns, ruid); in __sys_setresuid()
643 if ((ruid != (uid_t) -1) && !uid_valid(kruid)) in __sys_setresuid()
[all …]
/kernel/liteos_a/syscall/
Dprocess_syscall.c439 int SysGetRealEffSaveUserID(int *ruid, int *euid, int *suid) in SysGetRealEffSaveUserID() argument
457 ret = LOS_ArchCopyToUser(ruid, &realUserID, sizeof(int)); in SysGetRealEffSaveUserID()
510 static int SetRealEffSaveUserIDCheck(int ruid, int euid, int suid) in SetRealEffSaveUserIDCheck() argument
512 if ((ruid < 0) && (ruid != -1)) { in SetRealEffSaveUserIDCheck()
528 int SysSetRealEffSaveUserID(int ruid, int euid, int suid) in SysSetRealEffSaveUserID() argument
533 if ((ruid == -1) && (euid == -1) && (suid == -1)) { in SysSetRealEffSaveUserID()
537 ret = SetRealEffSaveUserIDCheck(ruid, euid, suid); in SysSetRealEffSaveUserID()
542 if (ruid >= 0) { in SysSetRealEffSaveUserID()
543 if (((euid != -1) && (euid != ruid)) || ((suid != -1) && (suid != ruid))) { in SysSetRealEffSaveUserID()
546 return SysSetUserID(ruid); in SysSetRealEffSaveUserID()
[all …]
Dlos_syscall.h95 extern int SysGetRealEffSaveUserID(int *ruid, int *euid, int *suid);
97 extern int SysSetRealEffUserID(int ruid, int euid);
100 extern int SysSetRealEffSaveUserID(int ruid, int euid, int suid);
/kernel/linux/linux-5.10/arch/s390/kernel/
Dcompat_linux.h96 long compat_sys_s390_setreuid16(u16 ruid, u16 euid);
98 long compat_sys_s390_setresuid16(u16 ruid, u16 euid, u16 suid);
99 long compat_sys_s390_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid);
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
Dcn_proc.h59 __u32 ruid; member
/kernel/linux/linux-5.10/include/uapi/linux/
Dcn_proc.h89 __u32 ruid; /* task uid */ member
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/
Dcn_proc.h50 __u32 ruid; member
/kernel/linux/linux-5.10/fs/proc/
Dinternal.h134 kuid_t *ruid, kgid_t *rgid);
Dbase.c1972 kuid_t *ruid, kgid_t *rgid) in task_dump_owner() argument
1982 *ruid = GLOBAL_ROOT_UID; in task_dump_owner()
2025 *ruid = uid; in task_dump_owner()
/kernel/linux/linux-5.10/include/linux/
Dsyscalls.h735 asmlinkage long sys_setreuid(uid_t ruid, uid_t euid);
737 asmlinkage long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid);
738 asmlinkage long sys_getresuid(uid_t __user *ruid, uid_t __user *euid, uid_t __user *suid);
1194 asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid);
1196 asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid);
1197 asmlinkage long sys_getresuid16(old_uid_t __user *ruid,
/kernel/linux/linux-5.10/drivers/connector/
Dcn_proc.c142 ev->event_data.id.r.ruid = from_kuid_munged(&init_user_ns, cred->uid); in proc_id_connector()