]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Allow root to change configuration of lldpd when lldpctl has suid set
authorVincent Bernat <bernat@luffy.cx>
Sat, 5 Mar 2011 06:32:24 +0000 (07:32 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sat, 5 Mar 2011 06:32:24 +0000 (07:32 +0100)
The previous check made lldpctl fails even when the user was root.

CHANGELOG
src/lldpctl.c

index a142b13afb19eea94afa08d84f05dc39bc14f0b2..57e7a9671754ede581eff619e6f9d23007aa8a41 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+lldpd (0.5.3)
+  * Fixes:
+    + Allow root to change configuration of lldpd when lldpctl has suid set.
+
 lldpd (0.5.2)
   * Features:
     + More flexible smart mode and new default. Manual page has been updated.
index c2bb2b564135c9ccdb0be149e101df82bad4ecb8..49b490ce114af0e2ea599b75c5ca3ff222fde721 100644 (file)
@@ -671,7 +671,7 @@ main(int argc, char *argv[])
 
        log_init(debug, __progname);
 
-       if ( ( action != 0 ) && ( getuid() != geteuid() ) ) {
+       if ((action != 0) && (getuid() != 0)) {
                fatalx("mere mortals may not do that, 'root' privileges are required.");
        }