Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jul 2001 10:27:42 -0700 (PDT)
From:      James Howard <howardjp@well.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/28773: [PATCH] Bug in pw, no $ in username
Message-ID:  <200107061727.KAA06528@well.com>

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

>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




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