Change name of ypservers file to /var/yp/binding/domain.ypservers.
This is a compromise between the Solaris 2.5 naming of this file (/var/yp/binding/domain/ypservers and /var/yp/binding/domain/vers) and traditional NetBSD naming (/var/yp/binding/domain.vers). Changing to the Solaris naming makes the C library incompatible with ypbind. While it's easy to change the C library, I don't feel right about introducing a gratuitous incompatibility. The current name (/var/yp/domain/ypservers) conflicts with the name of the YP map listing slave servers for a domain. Per discussion w/ Chris Demetriou and Luke Mewburn.
This commit is contained in:
parent
cc06b3f10f
commit
54ab7c44c8
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ypbind.8,v 1.4 1996/10/01 01:37:58 thorpej Exp $
|
||||
.\" $NetBSD: ypbind.8,v 1.5 1996/10/02 05:55:05 thorpej Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -67,7 +67,7 @@ is started without the
|
||||
option,
|
||||
.Nm
|
||||
steps through the list of YP servers specified in
|
||||
.Pa /var/yp/domainname/ypservers
|
||||
.Pa /var/yp/binding/domainname.ypservers
|
||||
and contacts each in turn attempting to bind to that server.
|
||||
It is strongly recommended that these hosts are in the local
|
||||
hosts file, and that hosts are looked up in local files before
|
||||
@ -78,7 +78,7 @@ If
|
||||
is started with the
|
||||
.Fl broadcast
|
||||
option, or if
|
||||
.Pa /var/yp/domainname/ypservers
|
||||
.Pa /var/yp/binding/domainname.ypservers
|
||||
does not exist,
|
||||
.Nm
|
||||
broadcasts to find a process willing to serve maps for the
|
||||
@ -115,9 +115,9 @@ and
|
||||
.Fl broadcast
|
||||
options are inherently insecure and should be avoided.
|
||||
.Sh FILES
|
||||
.Pa /var/yp/bindings/domainname.version
|
||||
.Pa /var/yp/binding/domainname.version
|
||||
- binding file for domainname
|
||||
.Pa /var/yp/domainname/ypservers
|
||||
.Pa /var/yp/binding/domainname.ypservers
|
||||
- explicit servers to bind to.
|
||||
.Sh SEE ALSO
|
||||
.Xr domainname 1 ,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ypbind.c,v 1.28 1996/10/01 01:38:00 thorpej Exp $ */
|
||||
/* $NetBSD: ypbind.c,v 1.29 1996/10/02 05:55:06 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#ifndef LINT
|
||||
static char rcsid[] = "$NetBSD: ypbind.c,v 1.28 1996/10/01 01:38:00 thorpej Exp $";
|
||||
static char rcsid[] = "$NetBSD: ypbind.c,v 1.29 1996/10/02 05:55:06 thorpej Exp $";
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -74,7 +74,7 @@ static char rcsid[] = "$NetBSD: ypbind.c,v 1.28 1996/10/01 01:38:00 thorpej Exp
|
||||
|
||||
#define BUFSIZE 1400
|
||||
|
||||
#define YPSERVERSFILE "ypservers"
|
||||
#define YPSERVERSSUFF ".ypservers"
|
||||
#define BINDINGDIR __CONCAT(_PATH_VAR_YP, "binding")
|
||||
|
||||
struct _dom_binding {
|
||||
@ -455,8 +455,8 @@ main(argc, argv)
|
||||
* Note that we can still override direct mode by passing
|
||||
* the -broadcast flag.
|
||||
*/
|
||||
snprintf(pathname, sizeof(pathname), "%s%s/%s", _PATH_VAR_YP,
|
||||
domainname, YPSERVERSFILE);
|
||||
snprintf(pathname, sizeof(pathname), "%s/%s%s", BINDINGDIR,
|
||||
domainname, YPSERVERSSUFF);
|
||||
if (stat(pathname, &st) < 0) {
|
||||
#ifdef DEBUG
|
||||
if (debug)
|
||||
@ -862,7 +862,7 @@ direct(buf, outlen)
|
||||
rewind(df);
|
||||
else {
|
||||
snprintf(ypservers_path, sizeof(ypservers_path),
|
||||
"%s%s/%s", _PATH_VAR_YP, domainname, YPSERVERSFILE);
|
||||
"%s/%s%s", BINDINGDIR, domainname, YPSERVERSSUFF);
|
||||
df = fopen(ypservers_path, "r");
|
||||
if (df == NULL)
|
||||
err(1, ypservers_path);
|
||||
|
Loading…
Reference in New Issue
Block a user