Don't check for root in prefix.
This commit is contained in:
@@ -760,10 +760,12 @@ int main (int argc, char **argv)
|
||||
|
||||
newlevel = argv[optind++];
|
||||
|
||||
#ifndef PREFIX
|
||||
/* OK, so we really are the main RC process
|
||||
* Only root should be able to run us */
|
||||
if (geteuid () != 0)
|
||||
eerrorx ("%s: root access required", applet);
|
||||
#endif
|
||||
|
||||
/* Enable logging */
|
||||
setenv ("EINFO_LOG", "rc", 1);
|
||||
|
||||
@@ -1271,8 +1271,10 @@ int runscript (int argc, char **argv)
|
||||
if (retval & RC_SERVICE_STARTED)
|
||||
retval = 0;
|
||||
} else {
|
||||
#ifndef PREFIX
|
||||
if (geteuid () != 0)
|
||||
eerrorx ("%s: root access required", applet);
|
||||
#endif
|
||||
|
||||
if (strcmp (optarg, "conditionalrestart") == 0 ||
|
||||
strcmp (optarg, "condrestart") == 0)
|
||||
|
||||
Reference in New Issue
Block a user