From owner-freebsd-bugs Fri Jul 6 10:30:18 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A00D037B417 for ; Fri, 6 Jul 2001 10:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f66HU2S61384; Fri, 6 Jul 2001 10:30:02 -0700 (PDT) (envelope-from gnats) Received: from smtp.well.com (smtp.well.com [208.178.101.27]) by hub.freebsd.org (Postfix) with ESMTP id AC9C037B406 for ; Fri, 6 Jul 2001 10:28:00 -0700 (PDT) (envelope-from howardjp@well.com) Received: from well.com (howardjp@well.com [208.178.101.2]) by smtp.well.com (8.8.5/8.8.4) with ESMTP id KAA15490 for ; Fri, 6 Jul 2001 10:28:14 -0700 (PDT) Received: (from howardjp@localhost) by well.com (8.8.5/8.8.5) id KAA06528 for FreeBSD-gnats-submit@freebsd.org; Fri, 6 Jul 2001 10:27:42 -0700 (PDT) Message-Id: <200107061727.KAA06528@well.com> Date: Fri, 6 Jul 2001 10:27:42 -0700 (PDT) From: James Howard To: FreeBSD-gnats-submit@freebsd.org Subject: bin/28773: [PATCH] Bug in pw, no $ in username Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 28773 >Category: bin >Synopsis: [PATCH] Bug in pw, no $ in username >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 06 10:30:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: James P. Howard II >Release: FreeBSD 4.3-STABLE i386 >Organization: Wavix Incorporated >Environment: System: FreeBSD gonzo.wavix.lan 4.3-STABLE FreeBSD 4.3-STABLE #0: Tue Jul 3 17:54:34 GMT 2001 howardjp@gonzo.wavix.lan:/usr/src/sys/compile/GONZO i386 >Description: Part of the Samba documentation says pw(8) on FreeBSD will not create usernames with a $ in them. This can be problematic for Samba users because machine's need accounts with the usernname equal to machinename$. This REALLY simple patch removes the $ and a character which can invalidate a username. >How-To-Repeat: pw user add foobar$ >Fix: --- pw_user.c.orig Fri Jul 6 13:13:30 2001 +++ pw_user.c Fri Jul 6 13:15:28 2001 @@ -1211,7 +1211,7 @@ pw_checkname(u_char *name, int gecos) { int l = 0; - char const *notch = gecos ? ":!@" : " ,\t:+&#%$^()!@~*?<>=|\\/\""; + char const *notch = gecos ? ":!@" : " ,\t:+&#%^()!@~*?<>=|\\/\""; while (name[l]) { if (strchr(notch, name[l]) != NULL || name[l] < ' ' || name[l] == 127 || >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message