Re: dpkg-statoverride vs. suidmanager
Previously Joey Hess wrote:
> I don't see how this can possibly work. It skips all "local" lines,
> which are the only ones that need a statoverride. And how can this 'if'
> possibly fire, you've just grepped for things starting with $pkg\>, and
> now you require for the first word not to be $pkg.
Argh, duh! Hmm. It looks like you need to see if any of the files
listed in /etc/suid.conf matches with one in dpkg -L package,
and take diversions into account as well. Or the maintainer will
have to supply the list of files manually, in which case it becomes
easier:
check_num() {
num=$1
case "$num" in
[0-9]*) num="#$num" ;;
*) ;;
esac
echo $num
}
conf_overrides() {
grep "^local\>" /etc/suid.conf | ( \
for f in "$@" ; do \
while read spkg file user group mode ; do \
if [ "$file" = "$f" ] ; then \
dpkg-statoverride --add `check_num $user` `check_num $group` $mode $file ; \
fi ; \
done ; \
suidunregister $file ; \
done \
)
}
conf_overrides /usr/X11R6/bin/xscreensaver
Wichert.
--
________________________________________________________________
/ Generally uninteresting signature - ignore at your convenience \
| wichert@cistron.nl http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
Reply to: