Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2003 23:30:16 -0700 (PDT)
From:      Masachika ISHIZUKA <ishizuka@ish.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/38676 change request for pw command
Message-ID:  <200305140630.h4E6UGPY090935@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/38676; it has been noted by GNATS.

From: Masachika ISHIZUKA <ishizuka@ish.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/38676 change request for pw command
Date: Wed, 14 May 2003 15:29:30 +0900 (JST)

 > The following reply was made to PR bin/38676; it has been noted by GNATS.
 > 
 > From: Paul Herman <pherman@frenchfries.net>
 > To: FreeBSD-gnats-submit@FreeBSD.ORG
 > Cc: Takumi ISHII <takishii@xephion.ne.jp>,
 > 	"Geoffrey C. Speicher" <geoff@sea-incorporated.com>,
 > 	"Matthew D. Fuller" <fullermd@over-yonder.net>
 > Subject: Re: bin/38676 change request for pw command
 > Date: Mon, 24 Jun 2002 22:52:50 -0700 (PDT)
 > 
 >  Here is an better version of the patch in bin/23501.  In addition
 >  to the advisory lock, link counts are checked to avoid any
 >  unlink/rename issues.  This has been tested by myself and seems to
 >  also fix the problem.
 
   Hi, this is ishizuka@ish.org.
 
   I tested this patch for 5.1-BETA-20030514-JPSNAP and I think
 this patch is good for 5.1-BETA.
   The test procedure is as follows.
 
 (1) create 5000 new accounts in /etc/master.passwd.
 
   % su
   # sh
   $ uid=10000
   $ while [ $uid -lt 15000 ]; do
   >   echo "test$uid:*:$uid:$uid::0:0:User &:/nonexistent:/sbin/nologin" >> /tmp/users.txt
   >   uid=$(($uid+1))
   > done
   $ vipw
   :$
   :r /tmp/users.txt
   :wq
   $ wc -l /etc/master.passwd /etc/passwd
 
 (2) create 100 accounts more with pw command as follows.
 
   $ uid=20000
   $ while [ $uid -lt 20100 ]; do
   >   pw useradd test$uid -u $uid -d /nonexistent -s /sbin/nologin -h - &
   >   uid=$(($uid+1))
   > done
 
 (3) Wait until (2) is done.
 
 (4) Count lines for /etc/master.passwd and /etc/passwd
 
   $ wc -l /etc/master.passwd /etc/passwd
 
 
   Before applying this patch, /etc/master.passwd and /etc/passwd are
 broken, After this patch is applied, they are not broken.
 
 -- 
 ishizuka@ish.org



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