Current-Users archive

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

Problem with /etc/security script?



Lately I've been noticing messages of the following form:

Checking mailbox ownership.
user paul.lock mailbox is owned by paul
user paul.lock mailbox is ----------, group wheel


It seems like /etc/security tried to skip over the .lock files, but the test only checks for the filename having a leading '.' rather than matching ${user}.lock

if checkyesno check_varmail; then
	ls -lA /var/mail | \
	awk '   NR == 1 { next; }
		$9 ~ /^\./ {next; }
		$3 != $9 {
			print "user " $9 " mailbox is owned by " $3
		}
		$1 != "-rw-------" {
			print "user " $9 " mailbox is " $1 ", group " $4
		}' > $OUTPUT
	if [ -s $OUTPUT ] ; then
		printf "\nChecking mailbox ownership.\n"
		cat $OUTPUT
	fi
fi


Shouldn't the dot-check line be

		$9 ~ /\./ {next; }

?



Home | Main Index | Thread Index | Old Index