summaryrefslogtreecommitdiff
path: root/Sources.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-26 06:06:18 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-26 06:06:18 -0700
commitb44af625f87066e90b1815ddcc84ee43c5bbce71 (patch)
tree80d6ad925295b9cedd3e08fdb88d25a19b490d01 /Sources.mm
parentf394599b3fff045298be827f5fa0361a2498d29f (diff)
Attempt to isolate Cydia's priviledged code paths.
Diffstat (limited to 'Sources.mm')
-rw-r--r--Sources.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Sources.mm b/Sources.mm
index 3290b2f..38eebf2 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -29,6 +29,8 @@ extern _H<NSMutableDictionary> Sources_;
extern bool Changed_;
void CydiaWriteSources() {
+ seteuid(0);
+
FILE *file(fopen("/etc/apt/sources.list.d/cydia.list", "w"));
_assert(file != NULL);
@@ -49,6 +51,8 @@ void CydiaWriteSources() {
}
fclose(file);
+
+ seteuid(501);
}
void CydiaAddSource(NSDictionary *source) {