summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb/pwd_mkdb.8
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1998-12-13 01:53:50 +0000
committerdillon <dillon@FreeBSD.org>1998-12-13 01:53:50 +0000
commit4db40135ef077cff04415e111e2356591a49e08d (patch)
tree67c8973c05862bdcb47322c7b5bfa9289c36e77a /usr.sbin/pwd_mkdb/pwd_mkdb.8
parent3fa521a2d22918cde2e1652bcc39d746469720ab (diff)
downloadFreeBSD-src-4db40135ef077cff04415e111e2356591a49e08d.zip
FreeBSD-src-4db40135ef077cff04415e111e2356591a49e08d.tar.gz
PR: bin/3478
Have pwd_mkdb lock the source file while rebuilding the database. When called by programs such as vipw, the source file is a temporary file and this does not conflict with the lock on /etc/master.passwd already held by vipw. When run manually, however, master.passwd is typically specified as the argument and the locking prevents other programs from messing with master.passwd during the database rebuild. Also pwd_mkdb uses a blocking exclusive lock as it may be called from a script. The -N option was added to cause pwd_mkdb to get the lock non-blocking and exit with an error if the attempt fails, again useful for scripts.
Diffstat (limited to 'usr.sbin/pwd_mkdb/pwd_mkdb.8')
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.87
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.8 b/usr.sbin/pwd_mkdb/pwd_mkdb.8
index 54abc76..7beecd7 100644
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.8
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.8
@@ -40,6 +40,7 @@
.Sh SYNOPSIS
.Nm pwd_mkdb
.Op Fl C
+.Op Fl N
.Op Fl p
.Op Fl d Ar directory
.Op Fl s Ar cachesize
@@ -67,6 +68,12 @@ The options are as follows:
.It Fl C
Check if the password file is in the correct format. Do not
change, add, or remove any files.
+.It Fl N
+Tell
+.Nm Pwd_mkdb
+to exit with an error if it cannot obtain a lock on the file. By default,
+we block waiting for a lock on the source file. The lock is held through
+the rebuilding of the database.
.It Fl p
Create a Version 7 style password file and install it into
.Pa /etc/passwd .
OpenPOWER on IntegriCloud