Subject: bin/24562: sushi(8): edit usermgmt.conf does not work
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <peter@pointless.nl>
List: netbsd-bugs
Date: 02/26/2004 01:07:24
>Number:         24562
>Category:       bin
>Synopsis:       sushi(8): edit usermgmt.conf does not work
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 26 00:09:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Peter Postma
>Release:        NetBSD 1.6ZK
>Organization:
>Environment:
System: NetBSD mercury.pointless.nl 1.6ZK NetBSD 1.6ZK (mercury) #25: Mon Feb 23 15:42:28 CET 2004 root@mercury.pointless.nl:/usr/obj/sys/arch/sparc64/compile/mercury sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Editing usermgmt.conf does not work when the setting "inactive" in 
/etc/usermgmt.conf is set to "Null (unset)" (that's the default).
sushi bails out with: sushi: fgetln: No such file or directory.

>How-To-Repeat:
Start sushi. System Maintenance -> Edit usermgmt.conf.

>Fix:
Just exclude the setting Null and the default 0 will be used (which
has the same effect).

Index: script1
===================================================================
RCS file: /cvsroot/src/share/sushi/system/usermgmtconf/script1,v
retrieving revision 1.3
diff -u -r1.3 script1
--- script1     8 Feb 2002 09:10:05 -0000       1.3
+++ script1     25 Feb 2004 23:54:51 -0000
@@ -3,7 +3,8 @@

 if [ "$1" = "inactive" ]; then
        if [ -f "/etc/usermgmt.conf" ]; then
-               DATA=`grep $1 /etc/usermgmt.conf | sed -e "s@$1 *@@"`
+               DATA=`grep $1 /etc/usermgmt.conf | sed -e "s@$1 *@@" | \
+                   grep -v Null`
        else
                echo "0"
                exit 0

>Release-Note:
>Audit-Trail:
>Unformatted: