summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-06-23 22:44:06 +0000
committerwpaul <wpaul@FreeBSD.org>1996-06-23 22:44:06 +0000
commit46fc34c49c3db6959c0e05bce725a4db4da729a6 (patch)
treeb21e4fc1b8010240c65217ac3a4f5f53bdf9d3f9 /usr.sbin/rpc.yppasswdd
parent1db04ef8f1f2e146f782b9b95eb495923fc6b033 (diff)
downloadFreeBSD-src-46fc34c49c3db6959c0e05bce725a4db4da729a6.zip
FreeBSD-src-46fc34c49c3db6959c0e05bce725a4db4da729a6.tar.gz
Whoops: had a couple of hardcoded instances of '/var/yp/' that shouldn't
have been there. Fixed to use yp_dir, which can be set on the command line.
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_extern.h8
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c8
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_server.c8
3 files changed, 15 insertions, 9 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h b/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
index fa2deb6..b67d039 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
@@ -29,12 +29,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yppasswdd_extern.h,v 1.6 1996/06/03 03:22:36 wpaul Exp $
+ * $Id: yppasswdd_extern.h,v 1.7 1996/06/23 22:20:43 wpaul Exp $
*/
#include <sys/types.h>
#include <limits.h>
#include <db.h>
+#include <paths.h>
#include <rpc/rpc.h>
#include <pwd.h>
#include <err.h>
@@ -45,6 +46,11 @@
#ifndef YPLIBDIR
#define YPLIBDIR "/usr/libexec/"
#endif
+
+#ifndef _PATH_YP
+#define _PATH_YP "/var/yp/"
+#endif
+
#define MAP_UPDATE "yppwupdate"
#define MAP_UPDATE_PATH YPLIBDIR "yppwupdate"
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
index d882b73..50c0921 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.11 1996/06/03 03:21:24 wpaul Exp $
+ * $Id: yppasswdd_main.c,v 1.13 1996/06/23 22:24:42 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.11 1996/06/03 03:21:24 wpaul Exp $";
+static const char rcsid[] = "$Id: yppasswdd_main.c,v 1.13 1996/06/23 22:24:42 wpaul Exp $";
#endif /* not lint */
int _rpcpmstart = 0; /* Started by a port monitor ? */
static int _rpcfdtype;
@@ -85,7 +85,8 @@ static int _rpcfdtype;
extern int _rpcsvcstate; /* Set when a request is serviced */
char *progname = "rpc.yppasswdd";
-char *passfile_default = "/var/yp/master.passwd";
+char *yp_dir = _PATH_YP;
+char *passfile_default = _PATH_YP "master.passwd";
char *passfile;
char *yppasswd_domain = NULL;
int no_chsh = 0;
@@ -95,7 +96,6 @@ int multidomain = 0;
int verbose = 0;
int resvport = 1;
int inplace = 0;
-char *yp_dir = "/var/yp/";
int yp_sock;
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
index 07403f4..f7df723 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yppasswdd_server.c,v 1.16 1996/06/04 00:00:19 wpaul Exp $
+ * $Id: yppasswdd_server.c,v 1.17 1996/06/23 22:20:43 wpaul Exp $
*/
#include <stdio.h>
@@ -61,7 +61,7 @@ struct dom_binding {};
#include "yppasswd_comm.h"
#ifndef lint
-static const char rcsid[] = "$Id: yppasswdd_server.c,v 1.16 1996/06/04 00:00:19 wpaul Exp $";
+static const char rcsid[] = "$Id: yppasswdd_server.c,v 1.17 1996/06/23 22:20:43 wpaul Exp $";
#endif /* not lint */
char *tempname;
@@ -542,7 +542,7 @@ yppasswdproc_update_1_svc(yppasswd *argp, struct svc_req *rqstp)
if (strcmp(domain, yppasswd_domain)) {
snprintf(passfile_buf, sizeof(passfile_buf),
- "/var/yp/%s/master.passwd", domain);
+ "%s/%s/master.passwd", yp_dir, domain);
passfile = (char *)&passfile_buf;
}
@@ -695,7 +695,7 @@ allow additions to be made to the password database", progname);
if (strcmp(argp->domain, yppasswd_domain)) {
snprintf(passfile_buf, sizeof(passfile_buf),
- "/var/yp/%s/master.passwd", argp->domain);
+ "%s/%s/master.passwd", yp_dir, argp->domain);
passfile = (char *)&passfile_buf;
}
OpenPOWER on IntegriCloud