diff options
Diffstat (limited to 'data/system-cmds/platformize.diff')
-rw-r--r-- | data/system-cmds/platformize.diff | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/data/system-cmds/platformize.diff b/data/system-cmds/platformize.diff index e649b2a2f..6430de167 100644 --- a/data/system-cmds/platformize.diff +++ b/data/system-cmds/platformize.diff @@ -11,7 +11,7 @@ diff -ur system_cmds-790.30.1/login.tproj/login.c system_cmds-790.30.1+iPhone/lo #include "login.h" #include "pathnames.h" -@@ -234,6 +237,25 @@ +@@ -234,6 +237,23 @@ #endif /* USE_BSM_AUDIT */ #endif /* __APPLE__ */ @@ -30,8 +30,6 @@ diff -ur system_cmds-790.30.1/login.tproj/login.c system_cmds-790.30.1+iPhone/lo + } + + ptr(getpid()); -+ -+ setuid(0); +} + int @@ -41,11 +39,11 @@ diff -ur system_cmds-790.30.1/login.tproj/login.c system_cmds-790.30.1+iPhone/lo openlog("login", LOG_ODELAY, LOG_AUTH); uid = getuid(); -+ euid = geteuid(); + if (euid != 0) { + patch_setuid(); + seteuid(0); ++ euid = geteuid(); + } egid = getegid(); |