Subject: bin/21519: /bin/ls change broke /etc/security
To: None <gnats-bugs@gnats.netbsd.org>
From: None <gcw@primenet.com.au>
List: netbsd-bugs
Date: 05/10/2003 17:08:37
>Number:         21519
>Category:       bin
>Synopsis:       addition of -g to ls broke /etc/security
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 10 07:09:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Geoff C. Wing
>Release:        NetBSD 1.6S 20030509
>Organization:
>Environment:
System: NetBSD sparkles.primenet.com.au 1.6S NetBSD 1.6S (SPARKLES) #0: Fri May 9 18:01:36 EST 2003 gcw@sparkles.primenet.com.au:/usr/netbsd/src/sys/arch/i386/compile/SPARKLES i386
Architecture: i386
Machine: i386
>Description:
	/etc/security is sprinkled with ``ls -ldgT'' type commands.  The
	flag -g for ls has been changed recently but /etc/security wasn't.
>How-To-Repeat:
	Use /etc/security
>Fix:
	
--- /usr/src/etc/security	2003-02-23 23:07:53.000000000 +1100
+++ /etc/security	2003-05-10 16:53:02.000000000 +1000
@@ -329,7 +329,7 @@
 			unset PATH
 			/bin/csh -f -s << end-of-csh > /dev/null 2>&1
 				source $i
-				/bin/ls -ldgT \$path > $TMP1
+				/bin/ls -ldT \$path > $TMP1
 end-of-csh
 			export PATH=$SAVE_PATH
 			awk '{
@@ -373,7 +373,7 @@
 				. $i
 				list=\`echo \$PATH | /usr/bin/sed -e \
 				    's/^:/.:/;s/:$/:./;s/::/:.:/g;s/:/ /g'\`
-				/bin/ls -ldgT \$list > $TMP1
+				/bin/ls -ldT \$list > $TMP1
 end-of-sh
 			export PATH=$SAVE_PATH
 			awk '{
@@ -444,7 +444,7 @@
 	sort -k2 |
 	while read uid homedir; do
 		if [ -f ${homedir}/.rhosts ] ; then
-			rhost=`ls -ldgT ${homedir}/.rhosts`
+			rhost=`ls -ldT ${homedir}/.rhosts`
 			printf -- "$uid: $rhost\n"
 		fi
 	done > $OUTPUT
@@ -471,7 +471,7 @@
 if checkyesno check_homes; then
 	while read uid homedir; do
 		if [ -d ${homedir}/ ] ; then
-			file=`ls -ldgT ${homedir}`
+			file=`ls -ldT ${homedir}`
 			printf -- "$uid $file\n"
 		fi
 	done < $MPBYPATH |
@@ -493,7 +493,7 @@
 		for f in $list ; do
 			file=${homedir}/${f}
 			if [ -f $file ] ; then
-				printf -- "$uid $f `ls -ldgT $file`\n"
+				printf -- "$uid $f `ls -ldT $file`\n"
 			fi
 		done
 	done < $MPBYPATH |
@@ -521,7 +521,7 @@
 		for f in $list ; do
 			file=${homedir}/${f}
 			if [ -f $file ] ; then
-				printf -- "$uid $f `ls -ldgT $file`\n"
+				printf -- "$uid $f `ls -ldT $file`\n"
 			fi
 		done
 	done < $MPBYPATH |
@@ -591,7 +591,7 @@
 	    \( \( -perm -u+s -a ! -type d \) -o \
 	       \( -perm -g+s -a ! -type d \) -o \
 	       -type b -o -type c \) -print0 | \
-	xargs -0 ls -ldgTq | sort +9 > $LIST) 2> $OUTPUT
+	xargs -0 ls -ldTq | sort +9 > $LIST) 2> $OUTPUT
 
 	# Display any errors that occurred during system file walk.
 	if [ -s $OUTPUT ] ; then
@@ -813,7 +813,7 @@
 		pkg_info | sort
 		echo ""
 		find . \( -name +REQUIRED_BY -o -name +CONTENTS \) -print0 |
-			xargs -0 ls -ldgTq | sort -t. +1 | sed -e 's, \./, ,'
+			xargs -0 ls -ldTq | sort -t. +1 | sed -e 's, \./, ,'
 	 ) > $pkgs
 	echo "$pkgs" > $PKGS
 	CHANGELIST="$PKGS $CHANGELIST"
>Release-Note:
>Audit-Trail:
>Unformatted: