aboutsummaryrefslogtreecommitdiff
path: root/1/test/main.c
blob: 7329e161c7c554ae73114b786bb0bab0d80a45dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}