[Nagiosplug-devel] Packaging issues

Ton Voon ton.voon at altinity.com
Wed Jun 7 15:48:33 CEST 2006

On 7 Jun 2006, at 14:02, John P. Rouillard wrote:

> In message <6F0CA028-7F8C-49A5-A540-013AE32C90B4 at altinity.com>,
> Ton Voon writes:
>> I've also just noticed that if make install is run for a non-root
>> user, the setuid plugins are still installed, but without setuid.
>> I've amended plugins-root/Makefile.am so that the plugins will only
>> install if make install is run as root. A warning is displayed
>> otherwise. I think this will still work if you are using fakeroot -
>> please let me know if it doesn't.
> Don't do this please. When building RPM's or other packages I can
> build/"install" under my own account (RPM builds should not be done as
> root) then use RPM mechanisms to make the programs suid root. I think
> I actually undid the test in an earlier version so that suid programs
> would always be installed.

I tend to get "inspiration" from the GNU coreutils project (http:// 
www.gnu.org/software/coreutils). From a "make install", their  
makefile will only install the su executable if the user is root.

Could you use fakeroot? Otherwise, you can still run "make install &&  
make install-root". It will install the setuid plugins, fail to  
chown, but still return a successful return code. You can then use  
whatever mechanisms to package up the files with correct permissions.

My angle is that from a default "make install", I wouldn't want  
plugins installed with incorrect permissions (I can hear the support  
calls now...).


T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon

More information about the Devel mailing list