dpkg-statoverride question
Hello,
In my amavis-postfix postinst file, I have:
case "$1" in
configure)
adduser --system --home /var/lib/amavis --no-create-home amavis
for i in /var/lib/amavis /var/lib/amavis/virusmails /var/run/amavis
do
if ! dpkg-statoverride --list $i >/dev/null
then
dpkg-statoverride --update --add amavis root 755 $i
fi
[...]
done
[...]
esac
I was under the impression that this would allow overriding
the ownership of the file outside the package.
However, every time I reinstall the package, it goes back to
the defaults.
Just to make sure, I typed in "dpkg-statoverride --list /var/lib/amavis"
before and after, and it is correct before, but wrong afterwords.
For the record, I have Russell's SE-Linux version of dpkg but recompiled
for woody. It is based on version 1.9.21.
Any ideas?
(PS: that adduser code is also a bit dodgy, currently it removes
the user and re-adds it on upgrades; suggestions for a better place
to put this, and the corresponding remove user call appreciated ;-).
--
Brian May <bam@snoopy.apana.org.au>
Reply to: