summary refs log tree commit diff
path: root/nis/rpcsvc/yp.x
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-12-11 01:40:39 +0000
committerUlrich Drepper <drepper@redhat.com>1996-12-11 01:40:39 +0000
commit6259ec0d78fd301572fcb616fdfa0500b828a824 (patch)
treeb1a008ed66281799defcaf56a92d3b592ca1f34a /nis/rpcsvc/yp.x
parentaee321f468f9214700b24e7aef39ef27bda4c42c (diff)
downloadglibc-6259ec0d78fd301572fcb616fdfa0500b828a824.tar.gz
glibc-6259ec0d78fd301572fcb616fdfa0500b828a824.tar.xz
glibc-6259ec0d78fd301572fcb616fdfa0500b828a824.zip
update from main arcive 961210 cvs/libc-961211
Wed Dec 11 01:04:30 1996  Ulrich Drepper  <drepper@cygnus.com>

	Add NIS NSS implementation.
	* shlib-versions: Add versions for NIS libraries.
	* sysdeps/unix/inet/Subdirs: Add nis.
	* nis/Banner: New file.
	* nis/Makefile: New file.
	* nis/nss-nis.h: New file.
	* nis/yp_xdr.h: New file.
	* nis/ypclnt.h: New file.
	* nis/ypupdate_xdr.c: New file.
	* nis/nss_compat/compat-grp.c: New file.
	* nis/nss_compat/compat-pwd.c: New file.
	* nis/nss_compat/compat-spwd.c: New file.
	* nis/nss_nis/nis-alias.c: New file.
	* nis/nss_nis/nis-ethers.c: New file.
	* nis/nss_nis/nis-grp.c: New file.
	* nis/nss_nis/nis-hosts.c: New file.
	* nis/nss_nis/nis-netgrp.c: New file.
	* nis/nss_nis/nis-network.c: New file.
	* nis/nss_nis/nis-proto.c: New file.
	* nis/nss_nis/nis-publickey.c: New file.
	* nis/nss_nis/nis-pwd.c: New file.
	* nis/nss_nis/nis-rpc.c: New file.
	* nis/nss_nis/nis-service.c: New file.
	* nis/nss_nis/nis-spwd.c: New file.
	* nis/rpcsvc/yp.h: New file.
	* nis/rpcsvc/yp.x: New file.
	* nis/rpcsvc/yp_prot.h: New file.
	* nis/rpcsvc/ypclnt.h: New file.
	* nis/rpcsvc/ypupd.h: New file.

	* libio/_G_config.h: Define _G_HAVE_SYS_WAIT and _G_HAVE_PRINTF_FP.

	* locale/C-numeric.c: Update copyright.

	* locale/Makefile: Add rules to build libBrokenLocale.
	* locale/broken_cur_max.c: New file.
	* locale/mb_cur_max.c: Update copyright.
	(__ctype_get_mb_cur_max): Make function weak.

	* new-malloc/malloc.c: Correct copyright.
	* new-malloc/thread-m.h: Correct key handling.

	* shadow/lckpwdf.c: Update copyright.
	(PWD_LOCKFILE): Change to /etc/.pwd.lock.

	* stdlib/strtod.c: Add another assertion.
	* stdlib/tst-strtod.c: Add another test case.

	* sysdeps/generic/paths.h: Add _PATH_PRESERVE.  Needed by nvi.
	* sysdeps/unix/sysv/linux/paths.h: Likewise.

	* sysdeps/gnu/utmpbits.h: Rename ut_addr field to ut_addr_v6.
	ut_addr names a single element in ut_addr_v6.

	* sysdeps/mach/hurd/xmknod.c: Remove alias from __mknod to mknod.
	Patch by Thomas Bushnell, n/BSG.

Tue Dec 10 11:35:28 1996  Richard Henderson  <rth@tamu.edu>

	* sysdeps/alpha/strncmp.S: Fix aligned short truncated compare
	corner condition.

	* sysdeps/alpha/memchr.S: Don't read ahead, even if the load
	did fit nicely into that delay slot (patch from David Mosberger-Tang).

Mon Dec  9 23:53:43 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Renamed from
	`ttyname_r'.
	(ttyname_r): New alias.

	* stdio-common/printf_fp.c (__guess_grouping): Fix off by one
Diffstat (limited to 'nis/rpcsvc/yp.x')
-rw-r--r--nis/rpcsvc/yp.x300
1 files changed, 300 insertions, 0 deletions
diff --git a/nis/rpcsvc/yp.x b/nis/rpcsvc/yp.x
new file mode 100644
index 0000000000..be855df749
--- /dev/null
+++ b/nis/rpcsvc/yp.x
@@ -0,0 +1,300 @@
+/* @(#)yp.x	2.1 88/08/01 4.0 RPCSRC */
+
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * Protocol description file for the Yellow Pages Service
+ */
+
+const YPMAXRECORD = 1024;
+const YPMAXDOMAIN = 64;
+const YPMAXMAP = 64;
+const YPMAXPEER = 64;
+
+
+enum ypstat {
+	YP_TRUE		=  1,
+	YP_NOMORE	=  2,
+	YP_FALSE	=  0,
+	YP_NOMAP	= -1,
+	YP_NODOM	= -2,
+	YP_NOKEY	= -3,
+	YP_BADOP	= -4,
+	YP_BADDB	= -5,
+	YP_YPERR	= -6,
+	YP_BADARGS	= -7,
+	YP_VERS		= -8
+};
+
+
+enum ypxfrstat {
+	YPXFR_SUCC	=  1,
+	YPXFR_AGE	=  2,
+	YPXFR_NOMAP	= -1,
+	YPXFR_NODOM	= -2,
+	YPXFR_RSRC	= -3,
+	YPXFR_RPC	= -4,
+	YPXFR_MADDR	= -5,
+	YPXFR_YPERR	= -6,
+	YPXFR_BADARGS	= -7,
+	YPXFR_DBM	= -8,
+	YPXFR_FILE	= -9,
+	YPXFR_SKEW	= -10,
+	YPXFR_CLEAR	= -11,
+	YPXFR_FORCE	= -12,
+	YPXFR_XFRERR	= -13,
+	YPXFR_REFUSED	= -14
+};
+
+
+typedef string domainname<YPMAXDOMAIN>;
+typedef string mapname<YPMAXMAP>;
+typedef string peername<YPMAXPEER>;
+typedef opaque keydat<YPMAXRECORD>;
+typedef opaque valdat<YPMAXRECORD>;
+
+
+struct ypmap_parms {
+	domainname domain;	
+	mapname map;
+	unsigned int ordernum;
+	peername peer;
+};
+
+struct ypreq_key {
+	domainname domain;
+	mapname map;
+	keydat key;
+};
+
+struct ypreq_nokey {
+	domainname domain;	
+	mapname map;
+};
+	
+struct ypreq_xfr {
+	ypmap_parms map_parms;
+	unsigned int transid;
+	unsigned int prog;
+	unsigned int port;
+};
+
+
+struct ypresp_val {
+	ypstat stat;
+	valdat val;
+};
+
+struct ypresp_key_val {
+	ypstat stat;
+#ifdef STUPID_SUN_BUG
+	keydat key;
+	valdat val;
+#else
+	valdat val;
+	keydat key;
+#endif
+};
+
+
+struct ypresp_master {
+	ypstat stat;	
+	peername peer;
+};
+
+struct ypresp_order {
+	ypstat stat;
+	unsigned int ordernum;
+};
+
+union ypresp_all switch (bool more) {
+case TRUE:
+	ypresp_key_val val;
+case FALSE:
+	void;
+};
+
+struct ypresp_xfr {
+	unsigned int transid;
+	ypxfrstat xfrstat;
+};
+
+struct ypmaplist {
+	mapname map;
+	ypmaplist *next;
+};
+
+struct ypresp_maplist {
+	ypstat stat;
+	ypmaplist *maps;
+};
+
+enum yppush_status {
+	YPPUSH_SUCC	=  1,	/* Success */
+	YPPUSH_AGE 	=  2,	/* Master's version not newer */
+	YPPUSH_NOMAP	= -1,	/* Can't find server for map */
+	YPPUSH_NODOM	= -2,	/* Domain not supported */
+	YPPUSH_RSRC	= -3,	/* Local resource alloc failure */
+	YPPUSH_RPC	= -4,	/* RPC failure talking to server */
+	YPPUSH_MADDR 	= -5,	/* Can't get master address */
+	YPPUSH_YPERR	= -6,	/* YP server/map db error */
+	YPPUSH_BADARGS	= -7,	/* Request arguments bad */
+	YPPUSH_DBM	= -8,	/* Local dbm operation failed */
+	YPPUSH_FILE	= -9,	/* Local file I/O operation failed */
+	YPPUSH_SKEW	= -10,	/* Map version skew during transfer */
+	YPPUSH_CLEAR	= -11,	/* Can't send "Clear" req to local ypserv */
+	YPPUSH_FORCE	= -12,	/* No local order number in map  use -f flag. */
+	YPPUSH_XFRERR 	= -13,	/* ypxfr error */
+	YPPUSH_REFUSED	= -14 	/* Transfer request refused by ypserv */
+};
+
+struct yppushresp_xfr {
+	unsigned transid;
+	yppush_status status;
+};
+
+/*
+ * Response structure and overall result status codes.  Success and failure
+ * represent two separate response message types.
+ */
+ 
+enum ypbind_resptype {
+	YPBIND_SUCC_VAL = 1, 
+	YPBIND_FAIL_VAL = 2
+};
+ 
+struct ypbind_binding {
+    opaque ypbind_binding_addr[4]; /* In network order */
+    opaque ypbind_binding_port[2]; /* In network order */
+};   
+
+union ypbind_resp switch (ypbind_resptype ypbind_status) {
+case YPBIND_FAIL_VAL:
+        unsigned ypbind_error;
+case YPBIND_SUCC_VAL:
+        ypbind_binding ypbind_bindinfo;
+};     
+
+/* Detailed failure reason codes for response field ypbind_error*/
+ 
+const YPBIND_ERR_ERR    = 1;	/* Internal error */
+const YPBIND_ERR_NOSERV = 2;	/* No bound server for passed domain */
+const YPBIND_ERR_RESC   = 3;	/* System resource allocation failure */
+ 
+ 
+/*
+ * Request data structure for ypbind "Set domain" procedure.
+ */
+struct ypbind_setdom {
+	domainname ypsetdom_domain;
+	ypbind_binding ypsetdom_binding;
+	unsigned ypsetdom_vers;
+};
+
+
+/*
+ * YP access protocol
+ */
+program YPPROG {
+	version YPVERS {
+		void 
+		YPPROC_NULL(void) = 0;
+
+		bool 
+		YPPROC_DOMAIN(domainname) = 1;	
+
+		bool
+		YPPROC_DOMAIN_NONACK(domainname) = 2;
+
+		ypresp_val
+		YPPROC_MATCH(ypreq_key) = 3;
+
+		ypresp_key_val 
+		YPPROC_FIRST(ypreq_key) = 4;
+
+		ypresp_key_val 
+		YPPROC_NEXT(ypreq_key) = 5;
+
+		ypresp_xfr
+		YPPROC_XFR(ypreq_xfr) = 6;
+
+		void
+		YPPROC_CLEAR(void) = 7;
+
+		ypresp_all
+		YPPROC_ALL(ypreq_nokey) = 8;
+
+		ypresp_master
+		YPPROC_MASTER(ypreq_nokey) = 9;
+
+		ypresp_order
+		YPPROC_ORDER(ypreq_nokey) = 10;
+
+		ypresp_maplist 
+		YPPROC_MAPLIST(domainname) = 11;
+	} = 2;
+} = 100004;
+
+
+/*
+ * YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR
+ */
+program YPPUSH_XFRRESPPROG {
+	version YPPUSH_XFRRESPVERS {
+		void
+		YPPUSHPROC_NULL(void) = 0;
+
+#ifdef STUPID_SUN_BUG
+		yppushresp_xfr	
+		YPPUSHPROC_XFRRESP(void) = 1;
+#else
+		void
+		YPPUSHPROC_XFRRESP(yppushresp_xfr) = 1;
+#endif
+	} = 1;
+} = 0x40000000;	/* transient: could be anything up to 0x5fffffff */
+
+/*
+ * YP binding protocol
+ */
+program YPBINDPROG {
+	version YPBINDVERS {
+		void
+		YPBINDPROC_NULL(void) = 0;
+	
+		ypbind_resp
+		YPBINDPROC_DOMAIN(domainname) = 1;
+
+		void
+		YPBINDPROC_SETDOM(ypbind_setdom) = 2;
+	} = 2;
+} = 100007;
+
+