On 2 Jun 2000 [EMAIL PROTECTED] wrote:

> Frank Meurer <[EMAIL PROTECTED]> writes:
> 

[...]

> 
> Thanks for your patch, will be included ASAP :-)
> 

Er... there was a little bug in the patch: If I use the ID's for
comparing I should at least change "root" to "0"...

--- security_check.sh.orig      Thu Jan  6 18:14:37 2000
+++ security_check.sh   Sat Jun  3 14:01:13 2000
@@ -106,13 +106,13 @@
 fi
 
 ### Check home directories.  Directories should not be owned by someone else or 
writeable.
-awk -F: '/^[^+-]/ { print $1 " " $6 }' /etc/passwd | \
+awk -F: '/^[^+-]/ { print $3 " " $6 }' /etc/passwd | \
 while read uid homedir; do
         if [[ -d ${homedir} ]] ; then
-                file=`ls -ldg ${homedir}`
+                file=`ls -ldgn ${homedir}`
                 printf "$uid $file\n"
         fi
-done | awk '$1 != $4 && $4 != "root" \
+done | awk '$1 != $4 && $4 != "0" \
         { print "user=" $1 " : home directory is owned by " $4 "." }
      $2 ~ /^-....w/ \
         { print "user=" $1 " : home directory is group writeable." }



-------------------------------------------------------------------------
"'Well,' the man said, 'the job description is General
Operative(Dilapidations).'"
Tom Holt, Faust Among Equals, p.266

Sending unsolicited commercial email to this address may be a violation
of the Washington State Consumer Protection Act, chapter 19.86 RCW.
Das Verschicken unverlangter kommerzieller email an diese Adresse ist
verboten (LG Traunstein, 2 HK O 3755/97 vom 14.10.1997, CR 1998, 171f).

(Frank Meurer, <[EMAIL PROTECTED]>, PGP ID: 0x5E756DA8)


Reply via email to