mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-25 23:00:21 +01:00
2016-07-27 Fred Gleason <fredg@paravelsystems.com>
* Added a check for 'root' permissions at startup in 'utils/rdrevert/rdrevert.cpp'.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
@@ -43,6 +45,14 @@ MainObject::MainObject(QObject *parent)
|
||||
int set_schema=0;
|
||||
rev_use_deadzone=false;
|
||||
|
||||
//
|
||||
// Check for Root Permissions
|
||||
//
|
||||
if(geteuid()!=0) {
|
||||
fprintf(stderr,"rdrevert: this program requires root permissions\n");
|
||||
exit(256);
|
||||
}
|
||||
|
||||
//
|
||||
// Read Command Options
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user