summaryrefslogtreecommitdiff
path: root/cydo.cpp
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2015-07-02 03:02:31 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2015-07-02 03:02:31 -0700
commit0c0a966bea2bf3b32d0a5abb2658dd22215e9c7f (patch)
tree2fb82e58427fb63e46425919e3b7b4b2eec82a6c /cydo.cpp
parent232b396b15248b956dd18092649f378b0db8bd4d (diff)
Trust in the mobile permissions on Cydia's caches.
Diffstat (limited to 'cydo.cpp')
-rw-r--r--cydo.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cydo.cpp b/cydo.cpp
index 4583616..0aad393 100644
--- a/cydo.cpp
+++ b/cydo.cpp
@@ -3,7 +3,14 @@
int main(int argc, char *argv[]) {
setuid(0);
setgid(0);
- argv[0] = "/usr/bin/dpkg";
+
+ if (argc < 2 || argv[1][0] != '/')
+ argv[0] = "/usr/bin/dpkg";
+ else {
+ --argc;
+ ++argv;
+ }
+
execv(argv[0], argv);
return 1;
}