Re: Packages' use of dpkg-statoverride
On Wed, Jan 10, 2001 at 07:06:03PM -0800, Joey Hess wrote:
> Matt Zimmerman wrote:
> > What if the user has already configured a statoverride for the program,
> > before even installing the package (or using an earlier version, etc.)?
> > Should the config script even ask the question, or skip it?
>
> I'd say skip it. dpkg-statoverride --list should prove useful here.
>
> (OTOH, you man not want to skip it if the package is being dpkg-recofigure'd
> (.config's $1 will == "reconfigure").)
So packages which ask the user (via debconf) whether to make a binary suid,
and effect the user's wishes using statoverride, need to:
In .config:
- Check whether dpkg-statoverride exists
- If so, check whether we are being reconfigured OR no
statoverride already exists
- If so, ask the user
- If not, do nothing
- If not, do nothing
In .postinst:
- Check whether dpkg-statoverride exists
- If so, check whether the user wants the binary suid AND there
is no statoverride in place
- If so, add the statoverride
- If not, do nothing
- If not, do nothing
Does this look about right? It would also be nice if dpkg-statoverride --list
returned an exit value to indicate whether any matching overrides exist.
--
- mdz
Reply to: