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

Re: dpkg-statoverride vs. suidmanager



Previously Wichert Akkerman wrote:
> This works for me:

Turns out that missed the case where a numerical uid or gid is used.
This one is better:
> 
check_num() {
        num=$1
        case "$num" in
        [0-9]*) num="#$num" ;;
        *) ;;
        esac
        echo $num
}

conf_overrides() {
        pkg=$1

        grep "^$pkg\>" /etc/suid.conf | ( \
                while read spkg file user group mode ; do \
                        if [ "$spkg" != "$pkg" ] ; then \
                                dpkg-statoverride --add `check_num $user` `checkk_num $group` $mode $file ; \
                        fi ; \
                        suidunregister $file ; \
                done \  
        )       
}       

conf_overrides smbfs


-- 
   ________________________________________________________________
 / 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: