Subject: bin/7041: /etc/security uses un-documented, non-standard, awk variable
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@proven.weird.com>
List: netbsd-bugs
Date: 02/24/1999 00:41:15
>Number: 7041
>Category: bin
>Synopsis: /etc/security uses un-documented, non-standard, awk variable
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 23 21:50:00 1999
>Last-Modified:
>Originator: Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release: NetBSD-current Tue Feb 23 08:05:25 EST 1999
>Environment:
System: NetBSD
>Description:
An awk script defined in /etc/security uses a non-standard
variable "$LINE" that's incompatible with nawk.
I note that mawk seems to support this variable, but it is not
documented for either mawk or gawk.
>How-To-Repeat:
Try running /etc/security after installing nawk as /usr/bin/awk.
>Fix:
apply the following patch:
Index: src/etc/security
===================================================================
RCS file: /cvs/NetBSD/src/etc/security,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 src/etc/security
*** src/etc/security 1998/11/16 19:24:16 1.1.1.2
--- src/etc/security 1999/02/24 05:26:57
***************
*** 53,59 ****
awk '
BEGIN {
while ( getline < "/etc/shells" > 0 ) {
! if ($LINE ~ /^\#/ || $LINE ~ /^$/ )
continue;
shells[$1]++;
}
--- 53,59 ----
awk '
BEGIN {
while ( getline < "/etc/shells" > 0 ) {
! if ($0 ~ /^\#/ || $0 ~ /^$/ )
continue;
shells[$1]++;
}
>Audit-Trail:
>Unformatted: