[Nagiosplug-devel] introducing a check_if_root for setuid plugins

Matthias Eble matthias.eble at mailing.kaufland-informationssysteme.com
Sun May 27 11:35:08 CEST 2007


Hi Sean,
> so i was thinking it might be helpful for each of these plugins to call a
> check_if_root() function before actually trying to perform their duties,
> and if it seems that they're not root, have them spit out either a warning or 
> an error message to be a little more informative.  what do you think?

I like the idea because the "you need to be root" hint will only be 
shown, if the user is definitely not root. Not like in eg check dhcp 
where the message is put out out if the the socket cannot be bound - 
which can of course have multiple reasons.

Matthias




More information about the Devel mailing list