From a12dbdc6c93a7d63591610378e3e570b7c7d2143 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 2 Mar 2008 21:13:21 +0000 Subject: Don't check for root in prefix. --- src/rc/rc.c | 2 ++ src/rc/runscript.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/rc') diff --git a/src/rc/rc.c b/src/rc/rc.c index 102461d..dbe975d 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -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); diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 33f814d..b0982f6 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -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) -- cgit v1.2.3