Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2000 04:18:01 -0700 (PDT)
From:      pius@zyan.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/17810: pw coredumps when adding/deleting usernames longer than 30 characters
Message-ID:  <200004051118.EAA32176@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr  5 04:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004051118.EAA32176>