From owner-freebsd-bugs Wed Apr 5 4:20: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 9CAA637BBF8 for ; Wed, 5 Apr 2000 04:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id EAA32310; Wed, 5 Apr 2000 04:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BEA4F37BFA8 for ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/17810: pw coredumps when adding/deleting usernames longer than 30 characters Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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