NetBSD Problem Report #11072
Received: (qmail 21135 invoked from network); 23 Sep 2000 18:45:36 -0000
Message-Id: <200009231843.e8NIhEq02536@miyu.feyrer.net>
Date: Sat, 23 Sep 2000 20:43:14 +0200 (MEST)
From: /usr/pkg/bin/tcsh <feyrer@feyrer.de>
Reply-To: hubert.feyrer@rz.uni-regensburg.de
To: gnats-bugs@gnats.netbsd.org
Subject: usermod(8) mixes things up badly
X-Send-Pr-Version: 3.95
>Number: 11072
>Category: bin
>Synopsis: usermod(8) mixes things up badly
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: agc
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 23 18:46:00 +0000 2000
>Closed-Date: Tue Sep 26 11:38:32 +0000 2000
>Last-Modified: Tue Sep 26 11:38:32 +0000 2000
>Originator: hubertf
>Release: 1.5_ALPHA
>Organization:
>Environment:
System: NetBSD miyu 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (MIYU) #12: Thu Sep 21 13:13:38 MEST 2000 feyrer@miyu:/ccd0/cvs/src-1.5/sys/arch/i386/compile/MIYU i386
>Description:
usermod(8) sets some fields in /etc/(master.)passwd to values
it should not.
>How-To-Repeat:
1.
miyu# grep ^feyrer /etc/passwd
feyrer:*:102:100:Hubert Feyrer,,,:/home/feyrer:/usr/pkg/bin/tcsh
miyu# usermod -g wheel feyrer
miyu# grep ^feyrer /etc/passwd
feyrer:*:102:0:/usr/pkg/bin/tcsh:/home/feyrer:/bin/csh
2.
miyu# grep ^feyrer /etc/passwd
feyrer:*:102:100:Hubert Feyrer:/home/feyrer:/usr/pkg/bin/tcsh
miyu# grep ^ingres /etc/group
ingres:*:74:ingres
miyu# usermod -G ingres feyrer
miyu# grep ^ingres /etc/group
ingres:*:74:ingres
miyu# grep ^feyrer /etc/passwd
feyrer:*:102:100:/usr/pkg/bin/tcsh:/home/feyrer:/bin/csh
Note that Real name and Login shell are wrong now. (That's also
why my realname is not on this and my last PR, 11071).
See also PR 11071.
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
From: Alistair Crooks <AlistairCrooks@excite.com>
To: feyrer@feyrer.de
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/11072: usermod(8) mixes things up badly
Date: Mon, 25 Sep 2000 06:54:31 -0700 (PDT)
--19724563.969890071889.JavaMail.imail.prickles
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
OK, spot the pasto:
In line 865 of src/usr.sbin/user/user.c, change the up->u_comment reference
to be up->u_shell (I've attached the full unified diff to this message).
This fixes the reported problem for me - now onto 11071.
Regards,
Alistair
--
Alistair Crooks (agc@pkgsrc.org)
_______________________________________________________
Say Bye to Slow Internet!
http://www.home.com/xinbox/signup.html
--19724563.969890071889.JavaMail.imail.prickles
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=a
--- user.c 2000/09/25 13:38:08 1.1
+++ user.c 2000/09/25 13:52:26
@@ -862,7 +862,7 @@
memsave(&up->u_comment, pwp->pw_gecos, strlen(pwp->pw_gecos));
}
if (strcmp(up->u_shell, DEF_SHELL) == 0 && strcmp(pwp->pw_shell, DEF_SHELL) != 0) {
- memsave(&up->u_comment, pwp->pw_shell, strlen(pwp->pw_shell));
+ memsave(&up->u_shell, pwp->pw_shell, strlen(pwp->pw_shell));
}
}
loginc = strlen(login);
--19724563.969890071889.JavaMail.imail.prickles--
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
To: agc@pkgsrc.org
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/11072: usermod(8) mixes things up badly
Date: Mon, 25 Sep 2000 16:41:18 +0200 (MET DST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--19724563.969890071889.JavaMail.imail.prickles
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.GSO.4.21.0009251639592.20679@rfhpc8320.fh-regensburg.de>
On Mon, 25 Sep 2000, Alistair Crooks wrote:
> In line 865 of src/usr.sbin/user/user.c, change the up->u_comment reference
> to be up->u_shell (I've attached the full unified diff to this message).
>
> This fixes the reported problem for me - now onto 11071.
Yes, confirmed working. Please commit. :-)
- Hubert
--
Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
--19724563.969890071889.JavaMail.imail.prickles
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.GSO.4.21.0009251639593.20679@rfhpc8320.fh-regensburg.de>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME=a
--- user.c 2000/09/25 13:38:08 1.1
+++ user.c 2000/09/25 13:52:26
@@ -862,7 +862,7 @@
memsave(&up->u_comment, pwp->pw_gecos, strlen(pwp->pw_gecos));
}
if (strcmp(up->u_shell, DEF_SHELL) == 0 && strcmp(pwp->pw_shell, DEF_SHELL) != 0) {
- memsave(&up->u_comment, pwp->pw_shell, strlen(pwp->pw_shell));
+ memsave(&up->u_shell, pwp->pw_shell, strlen(pwp->pw_shell));
}
}
loginc = strlen(login);
--19724563.969890071889.JavaMail.imail.prickles--
State-Changed-From-To: open->closed
State-Changed-By: agc
State-Changed-When: Tue Sep 26 04:36:47 PDT 2000
State-Changed-Why:
agc fixed the bug as described in the PR text
Responsible-Changed-From-To: bin-bug-people->agc
Responsible-Changed-By: agc
Responsible-Changed-When: Tue Sep 26 04:36:47 PDT 2000
Responsible-Changed-Why:
agc took responsibility for this one - he who introduces
the bug gets to fix it.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.