diff options
Diffstat (limited to 'cydo.cpp')
-rw-r--r-- | cydo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; } |