summaryrefslogtreecommitdiff
path: root/cydo.cpp
blob: 0aad39364cd3e0900c6b4f3782996760821b764f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <unistd.h>

int main(int argc, char *argv[]) {
    setuid(0);
    setgid(0);

    if (argc < 2 || argv[1][0] != '/')
        argv[0] = "/usr/bin/dpkg";
    else {
        --argc;
        ++argv;
    }

    execv(argv[0], argv);
    return 1;
}