bin/38676 change request for pw command
Masachika ISHIZUKA
ishizuka at ish.org
Tue May 13 23:30:17 PDT 2003
The following reply was made to PR bin/38676; it has been noted by GNATS.
From: Masachika ISHIZUKA <ishizuka at ish.org>
To: freebsd-gnats-submit at 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 at frenchfries.net>
> To: FreeBSD-gnats-submit at FreeBSD.ORG
> Cc: Takumi ISHII <takishii at xephion.ne.jp>,
> "Geoffrey C. Speicher" <geoff at sea-incorporated.com>,
> "Matthew D. Fuller" <fullermd at 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 at 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 at ish.org
More information about the freebsd-bugs
mailing list