Commit Graph

13 Commits

Author SHA1 Message Date
David Nugent
08fe832b6e Remove bogus file locking in main(). 1999-01-08 10:52:38 +00:00
Nate Williams
5e91a8ac91 - On second thought, attempt to get the read-only lock, but don't
consider it a exit failure if it doesn't work.  This means that root
  processes can safely get the lock, but normal processes can still use
  the 'pw' utility to get information (which may change out from under
  them.)
1998-08-04 22:31:26 +00:00
Nate Williams
2a6797aae2 - Removed read-only lock from 'pw'. This removes portions of the FIX
from PR/6787, but allow non-root users to use pw to get password
  information.  However, this should be safe since the fixes for
  disallowing multiple instances from modifying the DB are still intact.

Bug noted by:	 dima@best.net (Dima Ruban)
1998-08-04 22:20:11 +00:00
Nate Williams
73375325b1 Fix race condition in pw caused by multiple instances of pwd_mkdb being
run at the same time.

Notes:
    The fileupdate function is still somewhat broken.  Instead of
    returning a failure code if it can't modify the original file it
    renames the .new file and continues as though nothing is wrong.
    This will cause the lock on the original file to be lost and could
    lead to a similar race condition.  I left that portion of the code
    alone since I feel that the maintainer of the code would have a
    better concept of how he wants to handle errors in that function
    than I do.

PR:		bin/6787
Submitted by:	Craig Spannring <cts@internetcds.com>
1998-07-16 17:18:25 +00:00
Philippe Charnier
1dcc6ec750 Use err(3) instead of local redefinition. Add rcsid string. 1997-10-10 06:23:42 +00:00
David Nugent
fa7e83d492 getuid() -> geteuid(). 1997-07-17 08:37:47 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
David Nugent
e57b5686c6 Fix useage of MAXLOGNAME to include terminating NUL, by using
max(MAXLOGNAME-1,UT_NAMESIZE).
Tidy up "pretty" printing format for longer usernames.
1997-02-07 10:58:13 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
David Nugent
f1d684fad9 Adds optional NIS passwd file updating and optionally rebuilding
NIS maps.

Suggested by:	Peter Wemm
1997-01-05 07:15:37 +00:00
Joerg Wunsch
ad7cf975be Copyright update by the author, to be more in line with our sample
copyright.

Submitted by:	David Nugent
1996-12-10 23:59:04 +00:00
Joerg Wunsch
48aee7f33a Upgrade from the author, reflecting all my wishes resulting out of the
sysinstall use of this tool (plus some bug fixes).

2.2 candidate...

Submitted by:	David Nugent <davidn@nserver.usn.blaze.net.au>
1996-12-09 23:55:27 +00:00
Joerg Wunsch
d6f907dc7a pw(8) -- a backend utility to manage the user and group databases.
sysinstall's new User&group menu will use it, hence it's a 2.2
candidate despite of providing new functionality.

Submitted by:	David L. Nugent, <davidn@blaze.net.au>
1996-12-09 14:05:35 +00:00