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:
parent
97f6903efd
commit
ba21c862b1
@ -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"
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user