Commit Graph

15 Commits

Author SHA1 Message Date
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
Warner Losh
24a45ad202 Don't use NULL when we really mean 0 for call to pw_edit. 2002-08-21 19:01:50 +00:00
Dag-Erling Smørgrav
f1d0592537 Use libutil and libypclnt for all passwd manipulation and NIS needs.
Sponsored by:	DARPA, NAI Labs
2002-05-08 00:54:29 +00:00
Dag-Erling Smørgrav
93deb2ae12 ANSIfy and constify.
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:49:11 +00:00
Sheldon Hearn
07ce2a90b3 Do not rely on malloc() to zero-fill allocated memory, since it is
not documented as doing so.  This fixes a potential segmentation
violation.

PR:	14465
Reported by:	Tony Finch <fanf@demon.net>
1999-10-25 09:46:57 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Pierre Beyssac
9d1163f7c3 Move call to umask(0) back into pw_util(), because the latter
function is also used by chpass(1) and passwd(1).
1999-06-29 01:04:10 +00:00
Pierre Beyssac
2ece3ed4c8 Force umask to 077 (instead of 000) during the edit phase, to get
secure permissions in case the user attempts to save something to
a file of his own.

Move umask stuff out of pw_init() into main() for better visibility
of overall umask tweaking logic.

PR:		misc/11797
1999-06-26 12:15:39 +00:00
Sheldon Hearn
7cf53d0aab Report the correct master.passwd path on failure when the -d option is
used.
1999-06-26 10:45:06 +00:00
Sheldon Hearn
af2d5f9b31 Add -d option to vipw(8) to allow selection of an alternative directory
for the password files.

PR:	2703
Submitted by:	jmg
1999-06-26 07:16:42 +00:00
Philippe Charnier
acb61b9eb4 Statisize usage(). 1997-10-27 07:53:22 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Guido van Rooij
79a1b8d9e2 Implement incremental passwd database updates. This is done by ading a '-u'
option to pwd_mkdb and adding this option to utilities invoking it.
Further, the filling of both the secure and insecure databases has been
merged into one loop giving also a performance improvemnet.
Note that I did *not* change the adduser command. I don't read perl
(it is a write only language anyway).
The change will drastically improve performance for passwd and
friends with large passwd files. Vipw's performance won't change.
In order to do that some kind of diff should be made between the
old and new master.passwd and depending the amount of changes, an
incremental or complete update of the databases should be agreed
upon.
1996-07-01 19:38:50 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Rodney W. Grimes
dea673e932 BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00