From 4cc6631991a9a0fbcabe025ca18dab0ead890fff Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 26 Oct 2014 17:19:59 -0700 Subject: Entirely isolate setreuid logic to MobileCydia.mm. --- MobileCydia.mm | 4 ++-- Sources.mm | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 86a36ff..a2d65cc 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9059,7 +9059,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi } } - CydiaWriteSources(); + _root(true) CydiaWriteSources(); } // Navigation controller for the queuing badge. @@ -10402,7 +10402,7 @@ int main(int argc, char *argv[]) { } broken = nil; /* }}} */ - CydiaWriteSources(); + _root(true) CydiaWriteSources(); _trace(); _root(true) MetaFile_.Open("/var/lib/cydia/metadata.cb0"); diff --git a/Sources.mm b/Sources.mm index 38eebf2..3290b2f 100644 --- a/Sources.mm +++ b/Sources.mm @@ -29,8 +29,6 @@ extern _H Sources_; extern bool Changed_; void CydiaWriteSources() { - seteuid(0); - FILE *file(fopen("/etc/apt/sources.list.d/cydia.list", "w")); _assert(file != NULL); @@ -51,8 +49,6 @@ void CydiaWriteSources() { } fclose(file); - - seteuid(501); } void CydiaAddSource(NSDictionary *source) { -- cgit v1.2.3