summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_extern.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-10-24 18:58:26 +0000
committerwpaul <wpaul@FreeBSD.org>1996-10-24 18:58:26 +0000
commit23c458cf11df43eaa7b95dba34d24f4c492c1556 (patch)
treec9e13718f5c1a63d264eb0f15a2cc75b914c103b /usr.sbin/ypserv/yp_extern.h
parent60458c7a5c579d18cfcea70a2ad227276cc23f75 (diff)
downloadFreeBSD-src-23c458cf11df43eaa7b95dba34d24f4c492c1556.zip
FreeBSD-src-23c458cf11df43eaa7b95dba34d24f4c492c1556.tar.gz
Add support for handling the YP_SECURE and YP_INTERDOMAIN keys from
any maps that may have them. If the YP_SECURE key is present, ypserv will only allow access to the map from clients on reserved ports. If the YP_INTERDOMAIN key is present, the server will do DNS lookups for hostnames that it can't find in hosts.byname or hosts.byaddr. This is the same as the -d flag (which is retained for backwards compatibility) but it can be set on a per-map/per-domain basis. Also modified /var/yp/Makefile to add YP_INTERDOMAIN to the hosts.* maps and YP_SECURE to master.passwd.* maps by default.
Diffstat (limited to 'usr.sbin/ypserv/yp_extern.h')
-rw-r--r--usr.sbin/ypserv/yp_extern.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/ypserv/yp_extern.h b/usr.sbin/ypserv/yp_extern.h
index aa7529c..5c07172 100644
--- a/usr.sbin/ypserv/yp_extern.h
+++ b/usr.sbin/ypserv/yp_extern.h
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yp_extern.h,v 1.2 1996/04/21 21:34:02 wpaul Exp wpaul $
+ * $Id: yp_extern.h,v 1.4 1996/04/28 04:38:50 wpaul Exp $
*/
#include <stdio.h>
#include <string.h>
@@ -40,6 +40,7 @@
#include <db.h>
#include <rpc/rpc.h>
+
#ifndef _PATH_YP
#define _PATH_YP "/var/yp/"
#endif
@@ -52,6 +53,9 @@
#define MAX_CHILDREN 20
#endif
+#define YP_SECURE 0x1
+#define YP_INTERDOMAIN 0x2
+
/*
* External functions and variables.
*/
@@ -69,10 +73,15 @@ extern int yp_first_record __P((const DB *, DBT *, DBT *, int));
extern int yp_next_record __P((const DB *, DBT *, DBT *, int, int));
extern char *yp_dnsname __P(( char * ));
extern char *yp_dnsaddr __P(( const char * ));
+#ifdef DB_CACHE
+extern int yp_access __P((const char *, const char *, const struct svc_req * ));
+#else
extern int yp_access __P((const char *, const struct svc_req * ));
+#endif
extern int yp_validdomain __P((const char * ));
extern DB *yp_open_db __P(( const char *, const char *));
extern DB *yp_open_db_cache __P(( const char *, const char *, const char *, int ));
extern void yp_flush_all __P(( void ));
extern void yp_init_dbs __P(( void ));
+extern int yp_testflag __P(( char *, char *, int ));
extern void load_securenets __P(( void ));
OpenPOWER on IntegriCloud