summaryrefslogtreecommitdiff
path: root/usr.sbin/ypbind/ypbind.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1998-02-07 02:34:20 +0000
committerJason Downs <downsj@cvs.openbsd.org>1998-02-07 02:34:20 +0000
commitf562e19e566ffbdbc4f1801a463c85aee85a6569 (patch)
treeebf96999e71f661bf991381c3b3b53e1465d8d2d /usr.sbin/ypbind/ypbind.c
parentdef72e4b7a0b5143637399d8ebfc4be95fc2a036 (diff)
Add missing code to make /etc/yp/<domain> files actually work (in all cases).
Diffstat (limited to 'usr.sbin/ypbind/ypbind.c')
-rw-r--r--usr.sbin/ypbind/ypbind.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index 1d1d8bdb723..ede6bb3663a 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypbind.c,v 1.29 1997/06/18 23:50:12 deraadt Exp $ */
+/* $OpenBSD: ypbind.c,v 1.30 1998/02/07 02:34:19 downsj Exp $ */
/*
* Copyright (c) 1996 Theo de Raadt <deraadt@theos.com>
@@ -34,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypbind.c,v 1.29 1997/06/18 23:50:12 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypbind.c,v 1.30 1998/02/07 02:34:19 downsj Exp $";
#endif
#include <sys/param.h>
@@ -518,6 +518,9 @@ main(argc, argv)
strncpy(ypbindlist->dom_domain, domain, sizeof ypbindlist->dom_domain-1);
ypbindlist->dom_domain[sizeof (ypbindlist->dom_domain)-1] = '\0';
ypbindlist->dom_vers = YPVERS;
+ sprintf(ypbindlist->dom_servlist, "%s/%s",
+ SERVERSDIR, ypbindlist->dom_domain);
+ ypbindlist->dom_servlistfp = fopen(ypbindlist->dom_servlist, "r");
ypbindlist->dom_alive = 0;
ypbindlist->dom_lockfd = -1;
ypbindlist->dom_xid = unique_xid(ypbindlist);