diff options
Diffstat (limited to '1/test/main.c')
-rw-r--r-- | 1/test/main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/1/test/main.c b/1/test/main.c new file mode 100644 index 0000000..7329e16 --- /dev/null +++ b/1/test/main.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <unistd.h> + +int main(int argc, char** argv) { + if (geteuid() != 0) { + fprintf(stderr, "run me as root!\n"); + return 1; + } + + argc--; // argv[0] is the program name + if (argc == 0) { + fprintf(stderr, "usage: %s /dev/lork\n", argv[0]); + return 1; + } + + return 0; +} + |