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.
This commit is contained in:
Bill Paul 1996-06-23 22:44:06 +00:00
parent 97f6903efd
commit ba21c862b1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16649
3 changed files with 15 additions and 9 deletions

View File

@ -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"

View File

@ -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;

View File

@ -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;
}