From sakamoto@secup.is.tsukuba.ac.jp  Tue Jun 17 23:31:51 2003
Return-Path: <sakamoto@secup.is.tsukuba.ac.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4422A37B408
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jun 2003 23:31:51 -0700 (PDT)
Received: from hroptr.secup.is.tsukuba.ac.jp (hroptr.secup.is.tsukuba.ac.jp [130.158.85.213])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 86D1C43FCB
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jun 2003 23:31:48 -0700 (PDT)
	(envelope-from sakamoto@secup.is.tsukuba.ac.jp)
Received: from hroptr.secup.is.tsukuba.ac.jp (localhost.secup.is.tsukuba.ac.jp. [127.0.0.1])
	by hroptr.secup.is.tsukuba.ac.jp (8.12.6p2/8.12.6) with ESMTP id h5G2qZ7x033095
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Jun 2003 11:52:35 +0900 (JST)
	(envelope-from sakamoto@hroptr.secup.is.tsukuba.ac.jp)
Received: (from sakamoto@localhost)
	by hroptr.secup.is.tsukuba.ac.jp (8.12.6p2/8.12.6/Submit) id h5G2qXZh033094;
	Mon, 16 Jun 2003 11:52:33 +0900 (JST)
	(envelope-from sakamoto)
Message-Id: <200306160252.h5G2qXZh033094@hroptr.secup.is.tsukuba.ac.jp>
Date: Mon, 16 Jun 2003 11:52:33 +0900 (JST)
From: Hideki SAKAMOTO <sakamoto@hlla.is.tsukuba.ac.jp>
Reply-To: Hideki SAKAMOTO <sakamoto@hlla.is.tsukuba.ac.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pw disallow a password including space.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53434
>Category:       bin
>Synopsis:       pw disallow a password including space.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    le
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 17 23:40:11 PDT 2003
>Closed-Date:    Fri May 04 17:38:10 GMT 2007
>Last-Modified:  Fri May  4 17:40:03 GMT 2007
>Originator:     Hideki SAKAMOTO
>Release:        FreeBSD 4.7-RELEASE-p10 i386
>Organization:
HLLA Lab, Univ. of Tsukuba, Japan
>Environment:
System: FreeBSD xxx.xxx 4.7-RELEASE-p10 FreeBSD 4.7-RELEASE-p10 #5: Mon Mar 31 18:49:11 JST 2003 xxx.xxx:/usr/obj/usr/src/sys/XXXXX i386


>Description:
	pw command cutoff a password at first space character(space or tab),
	though passwd command allow a password including these space chars.
>How-To-Repeat:
	# echo "space space space" | /usr/sbin/pw useradd testuser -m -h 0 
	# su - testuser
	$ passwd testuser
	Changing local password for testuser.
	Old password: <input "space space space">
	passwd: Permission denied
	passwd: /etc/master.passwd: unchanged
	$ passwd testuser
	Changing local password for testuser.
	Old password: <input "space">
	New password: <input "space space space">
	Retype new password: <input "space space space">
	passwd: updating the database...
	passwd: done
	$

>Fix:
	apply this patch to /usr/src/usr.sbin/pw/pw_user.c


*** pw_user.c.old	Mon Jun 16 11:22:01 2003
--- pw_user.c	Mon Jun 16 11:22:15 2003
***************
*** 639,645 ****
  				return EX_IOERR;
  			}
  			line[b] = '\0';
! 			if ((p = strpbrk(line, " \t\r\n")) != NULL)
  				*p = '\0';
  			if (!*line)
  				errx(EX_DATAERR, "empty password read on file descriptor %d", fd);
--- 639,645 ----
  				return EX_IOERR;
  			}
  			line[b] = '\0';
! 			if ((p = strpbrk(line, "\r\n")) != NULL)
  				*p = '\0';
  			if (!*line)
  				errx(EX_DATAERR, "empty password read on file descriptor %d", fd);
>Release-Note:
>Audit-Trail:

From: Ryan Younce <ryounce@pobox.com>
To: bug-followup@freebsd.org,
 sakamoto@hlla.is.tsukuba.ac.jp
Cc:  
Subject: Re: bin/53434: pw disallow a password including space.
Date: Sun, 31 Jul 2005 20:44:57 -0400

 Out of curiosity, why is this PR still open?  I have verified that this is 
 still a problem on 5.4-RELEASE, and I see no indication that pw is supposed 
 to operate with this "feature."
 
 Am I wrong in assuming that passwords should be able to contains spaces?
 
 Ryan
State-Changed-From-To: open->patched 
State-Changed-By: le 
State-Changed-When: Fri Mar 30 12:57:43 UTC 2007 
State-Changed-Why:  
Thank you, your patch was committed to -CURRENT. 


Responsible-Changed-From-To: freebsd-bugs->le 
Responsible-Changed-By: le 
Responsible-Changed-When: Fri Mar 30 12:57:43 UTC 2007 
Responsible-Changed-Why:  
Thank you, your patch was committed to -CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53434 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/53434: commit references a PR
Date: Fri, 30 Mar 2007 12:57:32 +0000 (UTC)

 le          2007-03-30 12:57:25 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.sbin/pw          pw_user.c 
   Log:
   Accept passwords which contain whitespace.
   
   PR:     bin/53434
   
   Revision  Changes    Path
   1.61      +1 -1      src/usr.sbin/pw/pw_user.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: le 
State-Changed-When: Fri May 4 17:37:55 UTC 2007 
State-Changed-Why:  
MFC happened. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53434 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/53434: commit references a PR
Date: Fri,  4 May 2007 17:36:45 +0000 (UTC)

 le          2007-05-04 17:36:38 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     usr.sbin/pw          pw_user.c 
   Log:
   MFC 1.61:
   
      Accept passwords which contain whitespace.
   
      PR:     bin/53434
   
   Revision  Changes    Path
   1.57.8.3  +1 -1      src/usr.sbin/pw/pw_user.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
