summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-06-05 06:13:09 +0000
committerwpaul <wpaul@FreeBSD.org>1996-06-05 06:13:09 +0000
commit7afc9125751fe95b84e1ec3acae1592259cf0126 (patch)
tree627428a37ccfcc7fae695e0dfa4875af3910fcd1 /usr.sbin/rpc.yppasswdd/yppasswdd_main.c
parent8bff27f555bec4f822274eae5ea7f7480cc44243 (diff)
downloadFreeBSD-src-7afc9125751fe95b84e1ec3acae1592259cf0126.zip
FreeBSD-src-7afc9125751fe95b84e1ec3acae1592259cf0126.tar.gz
Added support for in-place updates:
If rpc.yppasswdd is invoked with the -i flag, password changes will be made to the master.passwd template file and the hash map files in-place, which means it won't have to run a complete map update. Instead, it calls /var/yp/Makefile with the 'pushpw' target, which just pushes the maps to the slaves and runs yp_mkdb -c to tell the local ypserv to flush its database cache. The server will check the passwd.byname and passwd.byuid maps to see if they were built in 'insecure' or 'secure' mode (i.e. with real encrypted passwords in them or without) and update them accordingly. This combined with rpc.ypxfrd greatly reduces the amount of time it takes to complete an NIS password change, especially with very large passwd databases.
Diffstat (limited to 'usr.sbin/rpc.yppasswdd/yppasswdd_main.c')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
index 66da559..d882b73 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yppasswdd_main.c,v 1.10 1996/02/24 21:41:15 wpaul Exp $
+ * $Id: yppasswdd_main.c,v 1.11 1996/06/03 03:21:24 wpaul Exp $
*/
#include "yppasswd.h"
@@ -72,7 +72,7 @@ struct dom_binding {};
#define _RPCSVC_CLOSEDOWN 120
#ifndef lint
-static const char rcsid[] = "$Id: yppasswdd_main.c,v 1.10 1996/02/24 21:41:15 wpaul Exp $";
+static const char rcsid[] = "$Id: yppasswdd_main.c,v 1.11 1996/06/03 03:21:24 wpaul Exp $";
#endif /* not lint */
int _rpcpmstart = 0; /* Started by a port monitor ? */
static int _rpcfdtype;
@@ -94,6 +94,7 @@ int allow_additions = 0;
int multidomain = 0;
int verbose = 0;
int resvport = 1;
+int inplace = 0;
char *yp_dir = "/var/yp/";
int yp_sock;
@@ -188,7 +189,7 @@ closedown(int sig)
static void usage()
{
fprintf(stderr, "Usage: %s [-t master.passwd file] [-d domain] \
-[-p path] [-s] [-f] [-m] [-a] [-v] [-u] [-h]\n",
+[-p path] [-s] [-f] [-m] [-i] [-a] [-v] [-u] [-h]\n",
progname);
exit(1);
}
@@ -211,7 +212,7 @@ main(argc, argv)
debug = 1;
- while ((ch = getopt(argc, argv, "t:d:p:sfamvh")) != EOF) {
+ while ((ch = getopt(argc, argv, "t:d:p:sfamivh")) != EOF) {
switch(ch) {
case 't':
passfile_default = optarg;
@@ -234,6 +235,9 @@ main(argc, argv)
case 'm':
multidomain++;
break;
+ case 'i':
+ inplace++;
+ break;
case 'v':
verbose++;
break;
OpenPOWER on IntegriCloud