When running setuid, lldpctl now refuses to set location data. This should
make it save to run the program setuid root by normal users including a
web-server f.e.
default:
usage();
}
- }
-
+ }
+
log_init(debug, __progname);
+
+ if ( ( action != 0 ) && ( getuid() != geteuid() ) ) {
+ fatalx("mere mortals may not do that, 'root' privileges are required.");
+ }
if ((s = ctl_connect(LLDPD_CTL_SOCKET)) == -1)
fatalx("unable to connect to socket " LLDPD_CTL_SOCKET);