#!/bin/sh set -e case "$PIUPARTS_DISTRIBUTION" in lenny) case ${PIUPARTS_OBJECTS%%=*} in linpopup) # package removed after lenny for file in /var/lib/linpopup/messages.dat do test ! -f "$file" || chmod -c o-w "$file" done ;; esac ;; esac case "$PIUPARTS_DISTRIBUTION" in lenny|squeeze*) case ${PIUPARTS_OBJECTS%%=*} in citadel-server|citadel-dbg|citadel-mta|citadel-suite|bcron-run|capisuite|debbugs|raccess4vbox3|smartlist|sxid) #WORKSAROUND #684964: citadel-server: world writable config file: /etc/citadel/netconfigs/7 for file in /etc/citadel/netconfigs/7 /etc/citadel/refcount_adjustments.dat /etc/citadel/citadel.control do test ! -f "$file" || chmod -c o-w "$file" done ;; esac ;; esac case "$PIUPARTS_DISTRIBUTION" in wheezy*) case ${PIUPARTS_OBJECTS%%=*} in citadel-server|citadel-dbg|citadel-mta|citadel-suite|bcron|bcron-run|capisuite|debbugs|exmh|nmh|raccess4vbox3|smartlist|xlbiff) #WORKSAROUND #684964: citadel-server: world writable config file: /etc/citadel/netconfigs/7 for file in /etc/citadel/netconfigs/7 /etc/citadel/refcount_adjustments.dat /var/lib/citadel/data/refcount_adjustments.dat do test ! -f "$file" || chmod -c o-w "$file" done ;; ilisp) #WORKSAROUND #682826: ilisp: creates world writable directory /usr/lib/ilisp # package was not in wheezy for dir in /usr/lib/ilisp do test ! -d "$dir" || chmod -c o-w "$dir" done ;; esac ;; esac case ${PIUPARTS_OBJECTS%%=*} in gpe-tetris|gpe) #WORKSAROUND #684178: gpe-tetris: creates world writable directory /var/games/gpe # package removed after wheezy for file in /var/games/gpe/gpe-tetris.dat do test ! -f "$file" || chmod -c o-w "$file" done for dir in /var/games/gpe do test ! -d "$dir" || chmod -c o-w "$dir" done ;; esac # find world writables without sticky bit BADPERMS=$(find / -mount ! -type l ! -type c ! -type p ! -type s -perm -o+w ! -perm -1000) if [ -n "$BADPERMS" ]; then echo "ERROR: BAD PERMISSIONS" ls -lad $BADPERMS exit 1 fi