Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/etc/security,v rcsdiff: /ftp/cvs/cvsroot/src/etc/security,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.113 retrieving revision 1.114 diff -u -p -r1.113 -r1.114 --- src/etc/security 2013/09/08 08:19:40 1.113 +++ src/etc/security 2013/11/06 19:30:20 1.114 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: security,v 1.113 2013/09/08 08:19:40 prlw1 Exp $ +# $NetBSD: security,v 1.114 2013/11/06 19:30:20 spz Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -337,9 +337,16 @@ if checkyesno check_group; then fi awk -F: '{ print $1 }' $GRP | sort | uniq -d > $OUTPUT - if [ -s $OUTPUT ] ; then + dupgroups="" + for group in $(cat $OUTPUT) ; do + gcount=$(awk -F: "/$group/ { print \$1,\$3 }" $GRP | sort -u | wc -l) + if [ $gcount -gt 1 ]; then + dupgroups="$dupgroups $group" + fi + done + if [ ! -z $dupgroups ] ; then printf "\n$GRP has duplicate group names.\n" - column $OUTPUT + printf "$dupgroups\n" fi fi