Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 1999 08:22:22 +0000
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        Cch <cch@market.net.tw>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: About pw command in FreeBSD 3.0-CURRENT
Message-ID:  <19990111082222.A38198@scientia.demon.co.uk>
In-Reply-To: <369993BF.E1602BD2@market.net.tw>
References:  <369993BF.E1602BD2@market.net.tw>

next in thread | previous in thread | raw e-mail | index | archive | help
Cch wrote:

>     When I use the command:
> pw useradd master2 -u 2001 -c "test" -d "/home/user/master2" -g 0 -s
> "/bin/sh"
> in FreeBSD 3.0-CURRENT, it halts and has no response. But this command
> works in FreeBSD 2.2.7-RELEASE.

I beleive this was fixed within the last few days. If you don't want to
resup your sources, try this patch, which is the one which was commited:

===================================================================
RCS file: /home/ncvs/src/usr.sbin/pw/pw.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -p -u -r1.10 -r1.11
--- src/usr.sbin/pw/pw.c	1998/08/04 22:31:26	1.10
+++ /home/ncvs/src/usr.sbin/pw/pw.c	1999/01/08 10:52:38	1.11
@@ -26,7 +26,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-	"$Id: pw.c,v 1.10 1998/08/04 22:31:26 nate Exp $";
+	"$Id: pw.c,v 1.11 1999/01/08 10:52:38 davidn Exp $";
 #endif /* not lint */
 
 #include "pw.h"
@@ -50,7 +50,6 @@ static struct cargs arglist;
 
 static int      getindex(const char *words[], const char *word);
 static void     cmdhelp(int mode, int which);
-static void     filelock(const char *filename);
 
 
 int
@@ -150,12 +149,6 @@ main(int argc, char *argv[])
 	 */
 	cnf = read_userconfig(getarg(&arglist, 'C') ? getarg(&arglist, 'C')->val : NULL);
 
-	/*
-	 * Try to lock the master passowrd and group files right away (we
-	 * don't care if it works, since this is just advisory locking.
-	 */
-	filelock(_PATH_GROUP);
-	filelock(_PATH_MASTERPASSWD);
 	ch = funcs[which] (cnf, mode, &arglist);
 
 	/*
@@ -186,11 +179,6 @@ main(int argc, char *argv[])
 	return ch;
 }
 
-static void
-filelock(const char *filename)
-{
-	open(filename, O_RDONLY | O_EXLOCK, 0);
-}
 
 static int
 getindex(const char *words[], const char *word)

-- 
Ben Smithurst
ben@scientia.demon.co.uk

send a blank message to ben+pgp@scientia.demon.co.uk for PGP key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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