aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2000-10-10 16:29:44 +0000
committerNalin Dahyabhai <nalin@redhat.com>2000-10-10 16:29:44 +0000
commitc9ad8becf6158a64f49e92d8b52f7cdcff2edb1f (patch)
tree90ccd9c12e302d96193b0a2e090da53959b9111f
parent5d49535ed95db82dd418f984dad94f9befa330a3 (diff)
downloadinitscripts-c9ad8becf6158a64f49e92d8b52f7cdcff2edb1f.tar
initscripts-c9ad8becf6158a64f49e92d8b52f7cdcff2edb1f.tar.gz
initscripts-c9ad8becf6158a64f49e92d8b52f7cdcff2edb1f.tar.bz2
initscripts-c9ad8becf6158a64f49e92d8b52f7cdcff2edb1f.tar.xz
initscripts-c9ad8becf6158a64f49e92d8b52f7cdcff2edb1f.zip
make usernetctl just fall-through if getuid() == 0
-rw-r--r--initscripts.spec1
-rw-r--r--src/usernetctl.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 0de5cf78..fab5103e 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -232,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT
* Tue Oct 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- handle "gw x.x.x.x" as the last pair of flags in ifup-routes (#18804)
- fix top-level makefile install target
+- make usernetctl just fall-through if getuid() == 0
* Sun Sep 3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- /etc/init.d is already provided by chkconfig
diff --git a/src/usernetctl.c b/src/usernetctl.c
index 5a228bdc..fd28b411 100644
--- a/src/usernetctl.c
+++ b/src/usernetctl.c
@@ -155,7 +155,7 @@ int main(int argc, char ** argv) {
ifaceConfig = temp;
}
-
+ if(getuid() != 0)
switch (userCtl(ifaceConfig)) {
char *dash;