diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/skhd.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,7 @@ #include <getopt.h> #include <signal.h> #include <string.h> +#include <unistd.h> #include <Carbon/Carbon.h> @@ -201,6 +202,10 @@ int main(int argc, char **argv) return EXIT_SUCCESS; } + if(getuid() == 0 || geteuid() == 0) { + error("skhd: running as root is not allowed! abort..\n"); + } + if(secure_keyboard_entry_enabled()) { error("skhd: secure keyboard entry is enabled! abort..\n"); } |