forked from soccera/rdo
Error if euid != 0
This can happen if the rdo binary isn't set up as SUID.
This commit is contained in:
parent
a76a602886
commit
8c0e7560ba
1 changed files with 3 additions and 0 deletions
3
rdo.c
3
rdo.c
|
@ -58,6 +58,9 @@ int main(int argc, char** argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (geteuid() != 0)
|
||||
errx(1, "The rdo binary needs to be installed as SUID.");
|
||||
|
||||
int ruid = getuid();
|
||||
if (ruid == 0)
|
||||
return runprog(argc, argv);
|
||||
|
|
Loading…
Add table
Reference in a new issue