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

Bug#568313: Suggestion: forbid the use of dpkg-statoverride in postinst scripts, except for --list



On Wed, 03 Feb 2010, Brandon wrote:
> First, I suggest that Debian Policy require, or at least recommend,
> that packages not use dpkg-statoverride to set permissions for files
> with static uids and gids. In other words, if it is possible for the
> maintainer to set the permissions in the package binary itself, then
> he should.

What is the rationale for this? What set of packages currently
existing would be instantly buggy if this were the case?

> As for setting permissions for files with dynamic ids, debian policy
> says that dpkg-statoverride is necessary. This is not true, or at
> least misleading. Certainly the post install script should check to
> make sure that there isn't any override in place before setting file
> permissions, but I think it would be better to set permissions with
> chown and chmod than dpkg-statoverride.

This is a bad idea. There's no advantage to using chown and chmod over
dpkg-statoverride. In fact, you have to do more work, because you have
to check all of the things that dpkg-statoverride gets you for free,
like making sure that dpkg-statoverride hasn't previously been set.

It also means that there will be a relatively long time when the
package has been unpacked with the wrong permissions set until the
postinst is called to fix them up.


Don Armstrong

-- 
Who is thinking this?
I am.
 -- Greg Egan _Diaspora_ p38

http://www.donarmstrong.com              http://rzlab.ucr.edu



Reply to: