diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2015-10-12 05:07:55 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2015-10-12 05:07:55 -0700 |
commit | ab1ec63ebd2a216213d9fb98c6ceac2dd4564810 (patch) | |
tree | 89f0bd6e943d5216da4918684e7c64115c27787a | |
parent | 23d491b47683752e2a3369fb9e51c50563982c04 (diff) |
The mobile extended_states could be marked setuid.
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 20d686a..eacb25d 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4132,10 +4132,8 @@ class CydiaLogCleaner : NSString *nextended(Cache("extended_states")); struct stat info; - if (stat([nextended UTF8String], &info) != -1 && (info.st_mode & S_IFMT) == S_IFREG) { - system([[NSString stringWithFormat:@"/usr/libexec/cydia/cydo /bin/mv -f %@ %@", ShellEscape(nextended), ShellEscape(oextended)] UTF8String]); - system([[NSString stringWithFormat:@"/usr/libexec/cydia/cydo /bin/chown 0:0 %@", ShellEscape(oextended)] UTF8String]); - } + if (stat([nextended UTF8String], &info) != -1 && (info.st_mode & S_IFMT) == S_IFREG) + system([[NSString stringWithFormat:@"/usr/libexec/cydia/cydo /bin/cp --remove-destination %@ %@", ShellEscape(nextended), ShellEscape(oextended)] UTF8String]); unlink([nextended UTF8String]); symlink([oextended UTF8String], [nextended UTF8String]); |