Source-Changes-HG archive

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

[src/trunk]: src/etc In check_varmail (mailbox ownership/permissions check):



details:   https://anonhg.NetBSD.org/src/rev/16d83130665a
branches:  trunk
changeset: 555459:16d83130665a
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Tue Nov 18 03:30:40 2003 +0000

description:
In check_varmail (mailbox ownership/permissions check):
  Make ls -A explicit, to help n debugging when not run as root
    (-A is implied when ls is run as root)
  Ignore dotfiles, as they are not mailboxes (e.g. .jhawk.pop)

diffstat:

 etc/security |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 5c23c79cf44a -r 16d83130665a etc/security
--- a/etc/security      Tue Nov 18 03:25:48 2003 +0000
+++ b/etc/security      Tue Nov 18 03:30:40 2003 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: security,v 1.85 2003/11/18 03:23:53 jhawk Exp $
+#      $NetBSD: security,v 1.86 2003/11/18 03:30:40 jhawk Exp $
 #      from: @(#)security      8.1 (Berkeley) 6/9/93
 #
 
@@ -548,8 +548,9 @@
 # Mailboxes should be owned by user and unreadable.
 #
 if checkyesno check_varmail; then
-       ls -l /var/mail | \
+       ls -lA /var/mail | \
        awk '   NR == 1 { next; }
+               $9 ~ /^\./ {next; }
                $3 != $9 {
                        print "user " $9 " mailbox is owned by " $3
                }



Home | Main Index | Thread Index | Old Index