From: Jay Freeman (saurik) Date: Mon, 27 Oct 2014 00:19:59 +0000 (-0700) Subject: Entirely isolate setreuid logic to MobileCydia.mm. X-Git-Tag: v1.1.14~33 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/4cc6631991a9a0fbcabe025ca18dab0ead890fff?hp=ad502f71d5cd68490d27171c98c0377a2a4ab6fc Entirely isolate setreuid logic to MobileCydia.mm. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 86a36ff5..a2d65ccd 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 38eebf21..3290b2fc 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) {