Subject: bin/3741: bug in /etc/security dealing with filenames containing spaces
To: None <gnats-bugs@gnats.netbsd.org>
From: Scott Bartram <scottb@iis.net>
List: netbsd-bugs
Date: 06/12/1997 10:00:08
>Number:         3741
>Category:       bin
>Synopsis:       /etc/security doesn't handle filenames containing spaces
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 12 07:05:01 1997
>Last-Modified:
>Originator:     Scott Bartram
>Organization:
Orion Software Inc.
>Release:        1.2.1
>Environment:
System: NetBSD rigel.orionsoft.com 1.2.1 NetBSD 1.2.1 (GENERIC) #5: Fri Mar 21 11:12:23 MET 1997 pk@flambard:/usr/src1/sys/arch/sparc/compile/GENERIC sparc


>Description:
	/etc/security does not handle filenames that contain spaces. The
	find / sed interaction needs to escape spaces.
>How-To-Repeat:
	create a filename containing spaces and run /etc/security.
>Fix:
*** security.orig	Thu Jun 12 09:29:46 1997
--- security	Thu Jun 12 09:59:08 1997
***************
*** 352,358 ****
  		-o -fstype procfs \) -a -prune -o \
      \( -perm -u+s -o -perm -g+s -o ! -type d -a ! -type f -a ! -type l -a \
         ! -type s \) -print | \
! sort | sed -e 's/^/ls -ldgT /' | sh > $LIST) 2> $OUTPUT
  
  # Display any errors that occurred during system file walk.
  if [ -s $OUTPUT ] ; then
--- 352,359 ----
  		-o -fstype procfs \) -a -prune -o \
      \( -perm -u+s -o -perm -g+s -o ! -type d -a ! -type f -a ! -type l -a \
         ! -type s \) -print | \
! sort | sed -e 's/\([[:space:]]\)/\\\1/g' -e 's/^/ls -ldgT /' | \
! sh > $LIST) 2> $OUTPUT
  
  # Display any errors that occurred during system file walk.
  if [ -s $OUTPUT ] ; then
>Audit-Trail:
>Unformatted: