this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fake the GID too

+21 -2
+7
src/kernel/emulation/linux/unistd/getegid.c
··· 2 2 #include "../base.h" 3 3 #include "../errno.h" 4 4 #include <linux-syscalls/linux.h> 5 + #include <stddef.h> 6 + #include <stdlib.h> 5 7 6 8 long sys_getegid(void) 7 9 { 8 10 int ret; 11 + 12 + #ifndef VARIANT_DYLD // dyld cannot call getenv 13 + if (getenv("__FAKE_SETGID_ROOT") != NULL) 14 + return 0; 15 + #endif 9 16 10 17 #ifdef __NR_getegid32 11 18 ret = LINUX_SYSCALL0(__NR_getegid32);
+6
src/kernel/emulation/linux/unistd/getgid.c
··· 2 2 #include "../base.h" 3 3 #include "../errno.h" 4 4 #include <linux-syscalls/linux.h> 5 + #include <stddef.h> 6 + #include <stdlib.h> 5 7 6 8 long sys_getgid(void) 7 9 { 8 10 int ret; 11 + #ifndef VARIANT_DYLD // dyld cannot call getenv 12 + if (getenv("__FAKE_SETGID_ROOT") != NULL) 13 + return 0; 14 + #endif 9 15 10 16 #ifdef __NR_getgid32 11 17 ret = LINUX_SYSCALL0(__NR_getgid32);
+2 -2
src/kernel/emulation/linux/unistd/getgroups.c
··· 8 8 long sys_getgroups(unsigned int size, int* gidset) 9 9 { 10 10 int ret; 11 - 12 - if (getenv("__FAKE_SETUID_ROOT")) 11 + 12 + if (getenv("__FAKE_SETGID_ROOT")) 13 13 { 14 14 if (size >= 1) 15 15 {
+6
src/tools/sudo
··· 27 27 fi 28 28 29 29 export __FAKE_SETUID_ROOT=1 30 + export __FAKE_SETGID_ROOT=1 31 + 32 + if [ $1 == "-k" ]; then 33 + shift 34 + fi 35 + 30 36 exec "${@:1}"