[Nagiosplug-devel] setuid plugin handling
Gavin Carr
gavin at openfusion.com.au
Thu Dec 7 23:51:22 CET 2006
Hi Ton,
On Thu, Dec 07, 2006 at 11:41:36AM +0000, Ton Voon wrote:
> >Can we change this behaviour to make setuid plugins always install,
> >and then
> >make them setuid if we're installing as root? Making the binaries
> >setuid at
> >make install time is definitely optional - it can be done by the
> >packaging
> >system, or they could even be installed non-setuid and called by
> >sudo, for
> >instance.
>
> When I made this change, I was copying coreutils' behaviour with su
> (I get a lot of inspiration from their project!). They put a warning
> up if make install is run without root. A make install-root will
> install and setuid.
>
> If make install-root is run without root, then the chmod u+s will
> fail, but the executable will still be available and the makefile
> considers it a success. Then via post-processing or some permissions
> specified in a spec file, you can add the correct permissions on a
> package install.
>
> So I would recommend for packaging that you use fakeroot or run make
> install, followed by make install-root.
Okay thanks, that at least makes it straightforward to fix the packages.
> However, you are the second person to ask about this, so it is not
> obvious. If there is a clamour to change it, we can amend the behaviour.
It sounds like 'make install-root' is doing the right thing then - I'd
just like it included in 'make install' rather than separate. But I'm
not sure I constitute a 'clamour'. :-)
Cheers,
Gavin
More information about the Devel
mailing list