# HG changeset patch # User Michiel Broek # Date 1397565938 -7200 # Node ID 1d18ebb9e279e99198e45ae87a483ac3cc0a7cae # Parent 2c0dacb26b141f2f608034d2cac43ea6e0e9d8b9 Fixed permission errors on .gvfs virtual filesystems. Bumped to version 0.21 diff -r 2c0dacb26b14 -r 1d18ebb9e279 cron.daily/security --- a/cron.daily/security Mon Jan 20 12:48:38 2014 +0100 +++ b/cron.daily/security Tue Apr 15 14:45:38 2014 +0200 @@ -22,7 +22,7 @@ # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. ############################################################################# -VERSION=0.20 +VERSION=0.21 export PATH=/bin:/usr/bin:/sbin:/usr/sbin umask 077 LANG=C; export LANG @@ -34,7 +34,7 @@ MAILTO=root fi -DAILYDIR=`mktemp -d /tmp/_daily.XXXXXX` || exit 1 +DAILYDIR=$(mktemp -d /tmp/_daily.XXXXXX) || exit 1 SECOUT="$DAILYDIR/secout" TMP1="$DAILYDIR/tmp1" diff -r 2c0dacb26b14 -r 1d18ebb9e279 security.d/chk_homespace --- a/security.d/chk_homespace Mon Jan 20 12:48:38 2014 +0100 +++ b/security.d/chk_homespace Tue Apr 15 14:45:38 2014 +0200 @@ -1,7 +1,7 @@ #!/bin/bash # ############################################################################# -# Copyright (C) 2005-2013 +# Copyright (C) 2005-2014 # # Michiel Broek # @@ -30,7 +30,7 @@ MP=/etc/passwd LANG=C; export LANG -SECUREDIR=`mktemp -d /tmp/_securedir.XXXXXX` || exit 1 +SECUREDIR=$(mktemp -d /tmp/_securedir.XXXXXX) || exit 1 trap "/bin/rm -rf $SECUREDIR ; exit 0" EXIT INT QUIT PIPE @@ -50,8 +50,8 @@ while read name uid homedir; do if [ -d ${homedir}/ ] && [ "`expr $uid \>= 1000`" == "1" ]; then - USAGE=`du -s --block-size=1048576 -h $homedir | cut -f 1` - SPACE=`df -khTP $homedir | tail -n 1 | awk '{ print $3 }'` + USAGE=$(du -s --block-size=1048576 -h $homedir 2>/dev/null | cut -f 1) + SPACE=$(df -khTP $homedir | tail -n 1 | awk '{ print $3 }') printf -- "%-16s %6s %6s $homedir\n" $name $USAGE $SPACE fi done < $MPBYPATH > $OUTPUT diff -r 2c0dacb26b14 -r 1d18ebb9e279 security.d/chk_setid --- a/security.d/chk_setid Mon Jan 20 12:48:38 2014 +0100 +++ b/security.d/chk_setid Tue Apr 15 14:45:38 2014 +0200 @@ -1,7 +1,7 @@ #!/bin/bash # ############################################################################# -# Copyright (C) 2005-2013 +# Copyright (C) 2005-2014 # # Michiel Broek # @@ -28,7 +28,7 @@ TZ=UTC; export TZ LANG=C; export LANG -SECUREDIR=`mktemp -d /tmp/_securedir.XXXXXX` || exit 1 +SECUREDIR=$(mktemp -d /tmp/_securedir.XXXXXX) || exit 1 trap "/bin/rm -rf $SECUREDIR ; exit 0" EXIT INT QUIT PIPE @@ -50,14 +50,14 @@ if [ ! -f $CURR ]; then # No database, install new database - find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 | \ + find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 2>/dev/null | \ xargs -0 /bin/ls -ld --full-time | sort -k9 > $CURR exit fi # Database is present, create temp database # -find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 | \ +find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 2>/dev/null | \ xargs -0 /bin/ls -ld --full-time | sort -k9 > $TMP1 changed=0