mirror of
https://github.com/linux-msm/qbootctl
synced 2024-11-23 14:43:29 +08:00
add root check
This commit is contained in:
parent
4c49647382
commit
6fc95a16ee
@ -148,6 +148,11 @@ int main(int argc, char **argv)
|
||||
impl = &bootctl_test;
|
||||
}
|
||||
|
||||
if(geteuid() != 0) {
|
||||
fprintf(stderr, "This program must be run as root!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (argc) {
|
||||
case 1:
|
||||
dump_info();
|
||||
|
Loading…
Reference in New Issue
Block a user