[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-statoverride vs. suidmanager



Wichert Akkerman wrote:
> Previously Joey Hess wrote:
> > Idea -- how about making "dpkg-statoverride --import-from-suidregister pkg
> > file file file ..." call effectively the code you have written?
> 
> Sure, I could do that.

So I package needs to call that in its preinst, if a recent enough
version of dpkg is present.

What if such a package is upgraded using an older version of dpkg
though? It used to contain a binary that is registered with
suidregister. The new version of the package will contain the binary,
but the binary will be suid. 

If it detects that statoverride doesn't work, and does the old 
suidregister ritual in its postinst, there was a window there the 
binary was temporarily suid, even if the user has overridden that
with suidmanager. 

Doing the suidregister stuff in the preinst is even worse, because then
dpkg will waltz in and install the newly suid binary, overriding the 
user's preferences.

So the only choice I can see is to require that all such packages that used 
to use suidregister have a versioned dependancy on dpkg.

-- 
see shy jo



Reply to: