diff --git a/.gitignore b/.gitignore index 0cc1bd7..52cdb66 100644 --- a/.gitignore +++ b/.gitignore @@ -62,5 +62,8 @@ dkms.conf build/ dist/ + +# Legiond extra/service/legiond/legiond extra/service/legiond/legiond-ctl +.ccls-cache diff --git a/extra/service/legiond/legiond-ctl.c b/extra/service/legiond/legiond-ctl.c index 60048c2..8121e0f 100644 --- a/extra/service/legiond/legiond-ctl.c +++ b/extra/service/legiond/legiond-ctl.c @@ -2,6 +2,11 @@ int main(int argc, char *argv[]) { + if (getuid() != 0){ + printf("require root privileges\n"); + exit(3); + } + if (access(socket_path, F_OK) == -1) { printf("socket not found\n"); exit(1);