From nobody@FreeBSD.org  Wed Apr  5 04:18:02 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id BEA4F37BFA8
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Apr 2000 04:18:02 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id EAA32176;
	Wed, 5 Apr 2000 04:18:01 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200004051118.EAA32176@freefall.freebsd.org>
Date: Wed, 5 Apr 2000 04:18:01 -0700 (PDT)
From: pius@zyan.com
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: pw coredumps when adding/deleting usernames longer than 30 characters
X-Send-Pr-Version: www-1.0

>Number:         17810
>Category:       bin
>Synopsis:       pw coredumps when adding/deleting usernames longer than 30 characters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr  5 04:20:01 PDT 2000
>Closed-Date:    Wed Jul 19 20:44:39 PDT 2000
>Last-Modified:  Wed Jul 19 20:45:14 PDT 2000
>Originator:     Pius Fischer
>Release:        3.4-STABLE
>Organization:
Zyan Communications
>Environment:
FreeBSD joust.zyan.com 3.4-STABLE FreeBSD 3.4-STABLE #0: Tue Apr  4 14:32:26 PDT 2000     pius@joust.zyan.com:/usr/src/sys/compile/JOUST  i386

>Description:
/usr/sbin/pw coredumps when adding/deleting usernames longer than
30 characters
>How-To-Repeat:
On a system that supports usernames longer than 30 characters (for
example, UT_NAMESIZE is set to 32 and MAXLOGNAME is set to 33), run
the following: "pw useradd testuser.customerservice12345678"
>Fix:
The length of the pfx buffer in the pw_update function in pwupd.c
should be dependent on MAXLOGNAME instead of being hardcoded to 32:

=cut=
--- pwupd.c.orig	Thu Oct 14 11:32:47 1999
+++ pwupd.c	Wed Apr  5 03:49:41 2000
@@ -150,7 +150,7 @@
 #else
 	{				/* No -C */
 #endif
-		char            pfx[32];
+		char            pfx[MAXLOGNAME + 1];
 		char            pwbuf[PWBUFSZ];
 		int             l = sprintf(pfx, "%s:", user);
 
=cut=


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nra 
State-Changed-When: Wed Jul 19 20:44:39 PDT 2000 
State-Changed-Why:  
davidn fixed this in revision 1.14 of pw/pwupd.c. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=17810 
>Unformatted:
