summary refs log tree commit diff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-10-31 12:13:49 +0000
committerUlrich Drepper <drepper@redhat.com>1998-10-31 12:13:49 +0000
commita1129917d77757941eded59e574f5fc9199284cb (patch)
treef934658661b419f0fe5a2508a15b982a78e4003c /nis
parent655b26bb758d9acb15e4870c1c541bb25c36cdd1 (diff)
downloadglibc-a1129917d77757941eded59e574f5fc9199284cb.tar.gz
glibc-a1129917d77757941eded59e574f5fc9199284cb.tar.xz
glibc-a1129917d77757941eded59e574f5fc9199284cb.zip
Update.
1998-10-30  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de> 
 
	* sunrpc/Versions: Add xdr_uint32_t and xdr_int32_t. 
	* sunrpc/pmap_rmt.c: Initialize clnt_stat variable. 
	* sunrpc/rpc/auth_des.h: Use uint32_t for time values. 
	* sunrpc/rpc/xdr.h: Add INT32 support. 
	* sunrpc/xdr.c: Implement xdr_int32_t and xdr_uint32_t .
 
	* nis/nis_call.c: Changes for new 64bit clean NIS+ interface. 
	* nis/nis_callback.c: Likewise. 
	* nis/nis_creategroup.c: Likewise. 
	* nis/nis_defaults.c: Likewise. 
	* nis/nis_intern.h: Likewise. 
	* nis/nis_lookup.c: Likewise. 
	* nis/nis_ping.c: Likewise. 
	* nis/nis_print.c: Likewise. 
	* nis/nis_table.c: Likewise. 
	* nis/nis_util.c: Likewise. 
	* nis/nis_xdr.c: Likewise. 
	* nis/rpcsvc/nis.h: Likewise. 
	* nis/rpcsvc/nis.x: Likewise. 
	* nis/rpcsvc/nis_callback.h: Likewise. 
	* nis/rpcsvc/nis_object.x: Likewise. 
	* nis/rpcsvc/nislib.h: Likewise. 
 
	* nis/rpcsvc/yp.h: Remove casts to (u_long). 
	* nis/rpcsvc/yp_prot.h: Likewise. 
	* nis/rpcsvc/ypupd.h: Likewise. 
	* nis/ypclnt.c: Change %ld to %d in sprintf. 
 
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_call.c10
-rw-r--r--nis/nis_callback.c6
-rw-r--r--nis/nis_creategroup.c2
-rw-r--r--nis/nis_defaults.c26
-rw-r--r--nis/nis_intern.h6
-rw-r--r--nis/nis_lookup.c2
-rw-r--r--nis/nis_ping.c5
-rw-r--r--nis/nis_print.c18
-rw-r--r--nis/nis_table.c11
-rw-r--r--nis/nis_util.c4
-rw-r--r--nis/nis_xdr.c117
-rw-r--r--nis/rpcsvc/nis.h101
-rw-r--r--nis/rpcsvc/nis.x34
-rw-r--r--nis/rpcsvc/nis_callback.h10
-rw-r--r--nis/rpcsvc/nis_object.x25
-rw-r--r--nis/rpcsvc/nislib.h52
-rw-r--r--nis/rpcsvc/yp.h46
-rw-r--r--nis/rpcsvc/yp_prot.h56
-rw-r--r--nis/rpcsvc/ypupd.h12
-rw-r--r--nis/ypclnt.c4
20 files changed, 242 insertions, 305 deletions
diff --git a/nis/nis_call.c b/nis/nis_call.c
index ce7607f4e1..73bd2d7de2 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -180,8 +180,8 @@ __nisbind_connect (dir_binding *dbp)
 }
 
 nis_error
-__nisbind_create (dir_binding *dbp, const nis_server *serv_val, u_int serv_len,
-		  u_long flags)
+__nisbind_create (dir_binding *dbp, const nis_server *serv_val,
+		  unsigned int serv_len, unsigned int flags)
 {
   dbp->clnt = NULL;
 
@@ -220,7 +220,7 @@ __nisbind_create (dir_binding *dbp, const nis_server *serv_val, u_int serv_len,
    So we could use the same binding twice */
 nis_error
 __do_niscall3 (dir_binding *dbp, u_long prog, xdrproc_t xargs, caddr_t req,
-	       xdrproc_t xres, caddr_t resp, u_long flags, nis_cb *cb)
+	       xdrproc_t xres, caddr_t resp, unsigned int flags, nis_cb *cb)
 {
   enum clnt_stat result;
   nis_error retcode;
@@ -325,7 +325,7 @@ __do_niscall3 (dir_binding *dbp, u_long prog, xdrproc_t xargs, caddr_t req,
 nis_error
 __do_niscall2 (const nis_server *server, u_int server_len, u_long prog,
 	       xdrproc_t xargs, caddr_t req, xdrproc_t xres, caddr_t resp,
-	       u_long flags, nis_cb *cb)
+	       unsigned int flags, nis_cb *cb)
 {
   dir_binding dbp;
   nis_error status;
@@ -550,7 +550,7 @@ __nisfind_server (const_nis_name name, directory_obj **dir)
 
 nis_error
 __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
-	      caddr_t req, xdrproc_t xres, caddr_t resp, u_long flags,
+	      caddr_t req, xdrproc_t xres, caddr_t resp, unsigned int flags,
 	      nis_cb *cb)
 {
   nis_error retcode;
diff --git a/nis/nis_callback.c b/nis/nis_callback.c
index 5c8828d1fc..6525484b45 100644
--- a/nis/nis_callback.c
+++ b/nis/nis_callback.c
@@ -55,7 +55,7 @@ __nis_getpkey(const char *sname)
   char pkey[HEXKEYBYTES + 1];
   char *cp, *domain;
   nis_result *res;
-  u_int len = 0;
+  unsigned int len = 0;
 
   domain = strchr (sname, '.');
   if (domain == NULL)
@@ -115,7 +115,7 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
 
     case CBPROC_RECEIVE:
       {
-	u_long i;
+	unsigned int i;
 
 	xdr_argument = (xdrproc_t) xdr_cback_data;
 	xdr_result = (xdrproc_t) xdr_bool;
@@ -261,7 +261,7 @@ __nis_do_callback (struct dir_binding *bptr, netobj *cookie,
 struct nis_cb *
 __nis_create_callback (int (*callback) (const_nis_name, const nis_object *,
 					const void *),
-		       const void *userdata, u_long flags)
+		       const void *userdata, unsigned int flags)
 {
   struct nis_cb *cb;
   int sock = RPC_ANYSOCK;
diff --git a/nis/nis_creategroup.c b/nis/nis_creategroup.c
index cd882ca01d..eeac957646 100644
--- a/nis/nis_creategroup.c
+++ b/nis/nis_creategroup.c
@@ -21,7 +21,7 @@
 #include <rpcsvc/nis.h>
 
 nis_error
-nis_creategroup (const_nis_name group, u_long flags)
+nis_creategroup (const_nis_name group, unsigned int flags)
 {
   if (group != NULL && group[0] != '\0')
     {
diff --git a/nis/nis_defaults.c b/nis/nis_defaults.c
index 729bc4c86a..8ddf67e778 100644
--- a/nis/nis_defaults.c
+++ b/nis/nis_defaults.c
@@ -69,12 +69,12 @@ searchowner (char *str)
   return strndup (cptr, i);
 }
 
-static u_long
+static uint32_t
 searchttl (char *str)
 {
   char buf[strlen (str) + 1];
   char *cptr, *dptr;
-  u_long time;
+  uint32_t time;
   int i;
 
   dptr = strstr (str, "ttl=");
@@ -129,12 +129,12 @@ searchttl (char *str)
   return time;
 }
 
-static u_long
-searchaccess (char *str, u_long access)
+static unsigned int
+searchaccess (char *str, unsigned int access)
 {
   char buf[strlen (str) + 1];
   char *cptr;
-  u_long result = access;
+  unsigned int result = access;
   int i;
   int n, o, g, w;
 
@@ -222,7 +222,7 @@ searchaccess (char *str, u_long access)
 		    result = result & ~(NIS_DESTROY_ACC);
 		  break;
 		default:
-		  return ULONG_MAX;
+		  return (~0U);
 		}
 	      cptr++;
 	    }
@@ -275,7 +275,7 @@ searchaccess (char *str, u_long access)
 		    result = result | (NIS_DESTROY_ACC);
 		  break;
 		default:
-		  return ULONG_MAX;
+		  return (~0U);
 		}
 	      cptr++;
 	    }
@@ -342,14 +342,14 @@ searchaccess (char *str, u_long access)
 		    result = result | (NIS_DESTROY_ACC);
 		  break;
 		default:
-		  return result = ULONG_MAX;
+		  return result = (~0U);
 		}
 	      cptr++;
 	    }
 	  n = o = g = w = 0;
 	  break;
 	default:
-	  return result = ULONG_MAX;
+	  return result = (~0U);
 	}
       if (*cptr != '\0')
 	cptr++;
@@ -436,7 +436,7 @@ __nis_default_group (char *defaults)
   return strdup (default_group);
 }
 
-u_long
+uint32_t
 __nis_default_ttl (char *defaults)
 {
   char *cptr, *dptr;
@@ -461,10 +461,10 @@ __nis_default_ttl (char *defaults)
 
 /* Default access rights are ----rmcdr---r---, but we could change
    this with the NIS_DEFAULTS variable. */
-u_long
-__nis_default_access (char *param, u_long defaults)
+unsigned int
+__nis_default_access (char *param, unsigned int defaults)
 {
-  u_long result;
+  unsigned int result;
   char *cptr;
 
   if (defaults == 0)
diff --git a/nis/nis_intern.h b/nis/nis_intern.h
index 9f515bb460..4ca47473ce 100644
--- a/nis/nis_intern.h
+++ b/nis/nis_intern.h
@@ -41,18 +41,18 @@ extern long __nis_findfastest __P ((dir_binding *bind));
 extern nis_error __do_niscall2 __P ((const nis_server *serv, u_int serv_len,
 				     u_long prog, xdrproc_t xargs, caddr_t req,
 				     xdrproc_t xres, caddr_t resp,
-				     u_long flags, nis_cb *cb));
+				     unsigned int flags, nis_cb *cb));
 extern nis_error __do_niscall __P ((const_nis_name name, u_long prog,
 				    xdrproc_t xargs, caddr_t req,
 				    xdrproc_t xres, caddr_t resp,
-				    u_long flags, nis_cb *cb));
+				    unsigned int flags, nis_cb *cb));
 
 /* NIS+ callback */
 extern nis_error __nis_do_callback __P ((struct dir_binding *bptr,
 					 netobj *cookie, struct nis_cb *cb));
 extern struct nis_cb *__nis_create_callback
       __P ((int (*callback)(const_nis_name, const nis_object *, const void *),
-	    const void *userdata, u_long flags));
+	    const void *userdata, unsigned int flags));
 extern nis_error __nis_destroy_callback __P ((struct nis_cb *cb));
 
 __END_DECLS
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c
index df16cceeac..e194b977e4 100644
--- a/nis/nis_lookup.c
+++ b/nis/nis_lookup.c
@@ -23,7 +23,7 @@
 #include "nis_intern.h"
 
 nis_result *
-nis_lookup (const_nis_name name, const u_long flags)
+nis_lookup (const_nis_name name, const unsigned int flags)
 {
   nis_result *res = calloc (1, sizeof (nis_result));
   struct ns_request req;
diff --git a/nis/nis_ping.c b/nis/nis_ping.c
index 3fc87551f5..bc6db38e93 100644
--- a/nis/nis_ping.c
+++ b/nis/nis_ping.c
@@ -23,12 +23,13 @@
 #include "nis_intern.h"
 
 void
-nis_ping (const_nis_name dirname, u_long utime, const nis_object *dirobj)
+nis_ping (const_nis_name dirname, unsigned int utime,
+	  const nis_object *dirobj)
 {
   nis_result *res = NULL;
   nis_object *obj;
   ping_args args;
-  u_int i;
+  unsigned int i;
 
   if (dirname == NULL && dirobj == NULL)
     abort ();
diff --git a/nis/nis_print.c b/nis/nis_print.c
index b578cbfb65..2433d4fd88 100644
--- a/nis/nis_print.c
+++ b/nis/nis_print.c
@@ -49,9 +49,9 @@ nis_nstype2str (const nstype type)
 }
 
 static void
-print_ttl (const u_long ttl)
+print_ttl (const uint32_t ttl)
 {
-  unsigned long int time, s, m, h;
+  uint32_t time, s, m, h;
 
   time = ttl;
 
@@ -60,11 +60,11 @@ print_ttl (const u_long ttl)
   m = time / 60;
   time %= 60;
   s = time;
-  printf ("%lu:%lu:%lu\n", h, m, s);
+  printf ("%u:%u:%u\n", h, m, s);
 }
 
 static void
-print_flags (const u_long flags)
+print_flags (const unsigned int flags)
 {
   fputs ("(", stdout);
 
@@ -132,10 +132,10 @@ nis_print_objtype (enum zotypes type)
 }
 
 void
-nis_print_rights (const u_long access)
+nis_print_rights (const unsigned int access)
 {
   char result[17];
-  u_long acc;
+  unsigned int acc;
   int i;
 
   acc = access;			/* Parameter is const ! */
@@ -247,7 +247,7 @@ nis_print_group (const group_obj *obj)
 
   fputs (_("Group Flags :"), stdout);
   if (obj->gr_flags)
-    printf ("0x%08lX", obj->gr_flags);
+    printf ("0x%08X", obj->gr_flags);
   fputs (_("\nGroup Members :\n"), stdout);
 
   for (i = 0; i < obj->gr_members.gr_members_len; i++)
@@ -316,8 +316,8 @@ nis_print_object (const nis_object * obj)
   nis_print_rights (obj->zo_access);
   printf (_("\nTime to Live  : "));
   print_ttl (obj->zo_ttl);
-  printf (_("Creation Time : %s"), ctime (&obj->zo_oid.ctime));
-  printf (_("Mod. Time     : %s"), ctime (&obj->zo_oid.mtime));
+  printf (_("Creation Time : %s"), ctime ((time_t *)&obj->zo_oid.ctime));
+  printf (_("Mod. Time     : %s"), ctime ((time_t *)&obj->zo_oid.mtime));
   fputs (_("Object Type   : "), stdout);
   nis_print_objtype (obj->zo_data.zo_type);
   switch (obj->zo_data.zo_type)
diff --git a/nis/nis_table.c b/nis/nis_table.c
index e0885ca024..d5b8f35a55 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -25,7 +25,7 @@
 
 
 static struct ib_request *
-__create_ib_request (const_nis_name name, u_long flags)
+__create_ib_request (const_nis_name name, unsigned int flags)
 {
   struct ib_request *ibreq = calloc (1, sizeof (ib_request));
   char buf[strlen (name) + 1];
@@ -145,7 +145,7 @@ __get_tablepath (char *name, dir_binding *bptr)
 }
 
 nis_result *
-nis_list (const_nis_name name, u_long flags,
+nis_list (const_nis_name name, unsigned int flags,
 	  int (*callback) (const_nis_name name,
 			   const nis_object *object,
 			   const void *userdata),
@@ -432,7 +432,7 @@ nis_list (const_nis_name name, u_long flags,
 }
 
 nis_result *
-nis_add_entry (const_nis_name name, const nis_object *obj2, u_long flags)
+nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
 {
   nis_object obj;
   nis_result *res;
@@ -492,7 +492,8 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, u_long flags)
 }
 
 nis_result *
-nis_modify_entry (const_nis_name name, const nis_object *obj2, u_long flags)
+nis_modify_entry (const_nis_name name, const nis_object *obj2,
+		  unsigned int flags)
 {
   nis_object obj;
   nis_result *res;
@@ -546,7 +547,7 @@ nis_modify_entry (const_nis_name name, const nis_object *obj2, u_long flags)
 
 nis_result *
 nis_remove_entry (const_nis_name name, const nis_object *obj,
-		  u_long flags)
+		  unsigned int flags)
 {
   nis_result *res;
   ib_request *ibreq;
diff --git a/nis/nis_util.c b/nis/nis_util.c
index 2b351e7339..86197fcedc 100644
--- a/nis/nis_util.c
+++ b/nis/nis_util.c
@@ -55,12 +55,12 @@ __nis_finddirectory (directory_obj *dir, const_nis_name name)
  *
  * OZ's original sdbm hash
  */
-unsigned long
+uint32_t
 __nis_hash (const void *keyarg, register size_t len)
 {
   register const u_char *key;
   register size_t loop;
-  register u_int32_t h;
+  register uint32_t h;
 
 #define HASHC   h = *key++ + 65599 * h
 
diff --git a/nis/nis_xdr.c b/nis/nis_xdr.c
index efeb7d09dd..898518213a 100644
--- a/nis/nis_xdr.c
+++ b/nis/nis_xdr.c
@@ -63,7 +63,7 @@ xdr_nstype (XDR *xdrs, nstype *objp)
 static bool_t
 xdr_oar_mask (XDR *xdrs, oar_mask *objp)
 {
-  if (!xdr_u_long (xdrs, &objp->oa_rights))
+  if (!xdr_u_int (xdrs, &objp->oa_rights))
     return FALSE;
   if (!xdr_zotypes (xdrs, &objp->oa_otype))
     return FALSE;
@@ -90,7 +90,7 @@ _xdr_nis_server (XDR *xdrs, nis_server *objp)
   if (!xdr_array (xdrs, (char **) &objp->ep.ep_val, (u_int *) &objp->ep.ep_len,
 		  ~0, sizeof (endpoint), (xdrproc_t) xdr_endpoint))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->key_type))
+  if (!xdr_u_int (xdrs, &objp->key_type))
     return FALSE;
   if (!xdr_netobj (xdrs, &objp->pkey))
     return FALSE;
@@ -109,7 +109,7 @@ _xdr_directory_obj (XDR *xdrs, directory_obj *objp)
 		  sizeof (nis_server), (xdrproc_t) _xdr_nis_server))
     return FALSE;
 
-  if (!xdr_u_long (xdrs, &objp->do_ttl))
+  if (!xdr_uint32_t (xdrs, &objp->do_ttl))
     return FALSE;
   if (!xdr_array (xdrs, (char **) &objp->do_armask.do_armask_val,
 		  (u_int *) & objp->do_armask.do_armask_len, ~0,
@@ -121,7 +121,7 @@ _xdr_directory_obj (XDR *xdrs, directory_obj *objp)
 static bool_t
 xdr_entry_col (XDR *xdrs, entry_col *objp)
 {
-  if (!xdr_u_long (xdrs, &objp->ec_flags))
+  if (!xdr_u_int (xdrs, &objp->ec_flags))
     return FALSE;
   if (!xdr_bytes (xdrs, (char **) &objp->ec_value.ec_value_val,
 		  (u_int *) &objp->ec_value.ec_value_len, ~0))
@@ -144,7 +144,7 @@ xdr_entry_obj (XDR *xdrs, entry_obj *objp)
 static bool_t
 xdr_group_obj (XDR *xdrs, group_obj *objp)
 {
-  if (!xdr_u_long (xdrs, &objp->gr_flags))
+  if (!xdr_u_int (xdrs, &objp->gr_flags))
     return FALSE;
   if (!xdr_array (xdrs, (char **) &objp->gr_members.gr_members_val,
 		  (u_int *) &objp->gr_members.gr_members_len, ~0,
@@ -172,9 +172,9 @@ xdr_table_col (XDR *xdrs, table_col *objp)
 {
   if (!xdr_string (xdrs, &objp->tc_name, 64))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->tc_flags))
+  if (!xdr_u_int (xdrs, &objp->tc_flags))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->tc_rights))
+  if (!xdr_u_int (xdrs, &objp->tc_rights))
     return FALSE;
   return TRUE;
 }
@@ -242,9 +242,9 @@ xdr_objdata (XDR *xdrs, objdata *objp)
 static bool_t
 xdr_nis_oid (XDR *xdrs, nis_oid *objp)
 {
-  if (!xdr_u_long (xdrs, &objp->ctime))
+  if (!xdr_uint32_t (xdrs, &objp->ctime))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->mtime))
+  if (!xdr_uint32_t (xdrs, &objp->mtime))
     return FALSE;
   return TRUE;
 }
@@ -262,9 +262,9 @@ _xdr_nis_object (XDR *xdrs, nis_object *objp)
     return FALSE;
   if (!_xdr_nis_name (xdrs, &objp->zo_domain))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->zo_access))
+  if (!xdr_u_int (xdrs, &objp->zo_access))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->zo_ttl))
+  if (!xdr_uint32_t (xdrs, &objp->zo_ttl))
     return FALSE;
   if (!xdr_objdata (xdrs, &objp->zo_data))
     return FALSE;
@@ -282,71 +282,6 @@ _xdr_nis_error (XDR *xdrs, nis_error *objp)
 bool_t
 _xdr_nis_result (XDR *xdrs, nis_result *objp)
 {
-  register long *buf;
-
-  if (xdrs->x_op == XDR_ENCODE)
-    {
-      if (!_xdr_nis_error (xdrs, &objp->status))
-	return FALSE;
-      if (!xdr_array (xdrs, (char **) &objp->objects.objects_val,
-		      (u_int *) &objp->objects.objects_len, ~0,
-		      sizeof (nis_object), (xdrproc_t) _xdr_nis_object))
-	return FALSE;
-      if (!xdr_netobj (xdrs, &objp->cookie))
-	return FALSE;
-      buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
-      if (buf == NULL)
-	{
-	  if (!xdr_u_long (xdrs, &objp->zticks))
-	    return FALSE;
-	  if (!xdr_u_long (xdrs, &objp->dticks))
-	    return FALSE;
-	  if (!xdr_u_long (xdrs, &objp->aticks))
-	    return FALSE;
-	  if (!xdr_u_long (xdrs, &objp->cticks))
-	    return FALSE;
-	}
-      else
-	{
-	  IXDR_PUT_U_LONG (buf, objp->zticks);
-	  IXDR_PUT_U_LONG (buf, objp->dticks);
-	  IXDR_PUT_U_LONG (buf, objp->aticks);
-	  IXDR_PUT_U_LONG (buf, objp->cticks);
-	}
-      return TRUE;
-    }
-  else if (xdrs->x_op == XDR_DECODE)
-    {
-      if (!_xdr_nis_error (xdrs, &objp->status))
-	return FALSE;
-      if (!xdr_array (xdrs, (char **) &objp->objects.objects_val,
-		      (u_int *) &objp->objects.objects_len, ~0,
-		      sizeof (nis_object), (xdrproc_t) _xdr_nis_object))
-	return FALSE;
-      if (!xdr_netobj (xdrs, &objp->cookie))
-	return FALSE;
-      buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
-      if (buf == NULL)
-	{
-	  if (!xdr_u_long (xdrs, &objp->zticks))
-	    return FALSE;
-	  if (!xdr_u_long (xdrs, &objp->dticks))
-	    return FALSE;
-	  if (!xdr_u_long (xdrs, &objp->aticks))
-	    return FALSE;
-	  if (!xdr_u_long (xdrs, &objp->cticks))
-	    return FALSE;
-	}
-      else
-	{
-	  objp->zticks = IXDR_GET_U_LONG (buf);
-	  objp->dticks = IXDR_GET_U_LONG (buf);
-	  objp->aticks = IXDR_GET_U_LONG (buf);
-	  objp->cticks = IXDR_GET_U_LONG (buf);
-	}
-      return TRUE;
-    }
-
   if (!_xdr_nis_error (xdrs, &objp->status))
     return FALSE;
   if (!xdr_array (xdrs, (char **) &objp->objects.objects_val,
@@ -355,13 +290,13 @@ _xdr_nis_result (XDR *xdrs, nis_result *objp)
     return FALSE;
   if (!xdr_netobj (xdrs, &objp->cookie))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->zticks))
+  if (!xdr_uint32_t (xdrs, &objp->zticks))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->dticks))
+  if (!xdr_uint32_t (xdrs, &objp->dticks))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->aticks))
+  if (!xdr_uint32_t (xdrs, &objp->aticks))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->cticks))
+  if (!xdr_uint32_t (xdrs, &objp->cticks))
     return FALSE;
   return TRUE;
 }
@@ -387,7 +322,7 @@ _xdr_ib_request (XDR *xdrs, ib_request *objp)
 		  (u_int *) &objp->ibr_srch.ibr_srch_len, ~0,
 		  sizeof (nis_attr), (xdrproc_t) xdr_nis_attr))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->ibr_flags))
+  if (!xdr_u_int (xdrs, &objp->ibr_flags))
     return FALSE;
   if (!xdr_array (xdrs, (char **) &objp->ibr_obj.ibr_obj_val,
 		  (u_int *) &objp->ibr_obj.ibr_obj_len, 1,
@@ -397,7 +332,7 @@ _xdr_ib_request (XDR *xdrs, ib_request *objp)
 		  (u_int *) &objp->ibr_cbhost.ibr_cbhost_len, 1,
 		  sizeof (nis_server), (xdrproc_t) _xdr_nis_server))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->ibr_bufsize))
+  if (!xdr_u_int (xdrs, &objp->ibr_bufsize))
     return FALSE;
   if (!xdr_netobj (xdrs, &objp->ibr_cookie))
     return FALSE;
@@ -409,7 +344,7 @@ _xdr_ping_args (XDR *xdrs, ping_args *objp)
 {
   if (!_xdr_nis_name (xdrs, &objp->dir))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->stamp))
+  if (!xdr_uint32_t (xdrs, &objp->stamp))
     return FALSE;
   return TRUE;
 }
@@ -419,9 +354,9 @@ _xdr_cp_result (XDR *xdrs, cp_result *objp)
 {
   if (!_xdr_nis_error (xdrs, &objp->cp_status))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->cp_zticks))
+  if (!xdr_uint32_t (xdrs, &objp->cp_zticks))
     return FALSE;
-  if (!xdr_u_long (xdrs, &objp->cp_dticks))
+  if (!xdr_uint32_t (xdrs, &objp->cp_dticks))
     return FALSE;
   return TRUE;
 }
@@ -429,14 +364,10 @@ _xdr_cp_result (XDR *xdrs, cp_result *objp)
 bool_t
 _xdr_nis_tag (XDR *xdrs, nis_tag *objp)
 {
-  if (!xdr_u_long (xdrs, &objp->tag_type))
-    {
-      return FALSE;
-    }
-  if (!xdr_string (xdrs, &objp->tag_val, 1024))
-    {
-      return FALSE;
-    }
+  if (!xdr_u_int (xdrs, &objp->tag_type))
+    return FALSE;
+  if (!xdr_string (xdrs, &objp->tag_val, ~0))
+    return FALSE;
   return TRUE;
 }
 
diff --git a/nis/rpcsvc/nis.h b/nis/rpcsvc/nis.h
index 3148a8d8b2..151b4394bf 100644
--- a/nis/rpcsvc/nis.h
+++ b/nis/rpcsvc/nis.h
@@ -72,6 +72,7 @@ __BEGIN_DECLS
 #define NIS_PK_DH 1
 #define NIS_PK_RSA 2
 #define NIS_PK_KERB 3
+#define NIS_PK_DHEXT 4
 
 struct nis_attr {
 	char *zattr_ndx;
@@ -118,7 +119,7 @@ enum nstype {
 typedef enum nstype nstype;
 
 struct oar_mask {
-	u_long oa_rights;
+	u_int oa_rights;
 	zotypes oa_otype;
 };
 typedef struct oar_mask oar_mask;
@@ -136,7 +137,7 @@ struct nis_server {
 		u_int ep_len;
 		endpoint *ep_val;
 	} ep;
-	u_long key_type;
+	u_int key_type;
 	netobj pkey;
 };
 typedef struct nis_server nis_server;
@@ -148,7 +149,7 @@ struct directory_obj {
 		u_int do_servers_len;
 		nis_server *do_servers_val;
 	} do_servers;
-	u_long do_ttl;
+	uint32_t do_ttl;
 	struct {
 		u_int do_armask_len;
 		oar_mask *do_armask_val;
@@ -163,7 +164,7 @@ typedef struct directory_obj directory_obj;
 #define EN_ASN1 64
 
 struct entry_col {
-	u_long ec_flags;
+	u_int ec_flags;
 	struct {
 		u_int ec_value_len;
 		char *ec_value_val;
@@ -181,7 +182,7 @@ struct entry_obj {
 typedef struct entry_obj entry_obj;
 
 struct group_obj {
-	u_long gr_flags;
+	u_int gr_flags;
 	struct {
 		u_int gr_members_len;
 		nis_name *gr_members_val;
@@ -209,8 +210,8 @@ typedef struct link_obj link_obj;
 
 struct table_col {
 	char *tc_name;
-	u_long tc_flags;
-	u_long tc_rights;
+	u_int tc_flags;
+	u_int tc_rights;
 };
 typedef struct table_col table_col;
 
@@ -243,8 +244,8 @@ struct objdata {
 typedef struct objdata objdata;
 
 struct nis_oid {
-	u_long ctime;
-	u_long mtime;
+	uint32_t ctime;
+	uint32_t mtime;
 };
 typedef struct nis_oid nis_oid;
 
@@ -254,8 +255,8 @@ struct nis_object {
 	nis_name zo_owner;
 	nis_name zo_group;
 	nis_name zo_domain;
-	u_long zo_access;
-	u_long zo_ttl;
+	u_int zo_access;
+	uint32_t zo_ttl;
 	objdata zo_data;
 };
 typedef struct nis_object nis_object;
@@ -321,10 +322,10 @@ struct nis_result {
 		nis_object *objects_val;
 	} objects;
 	netobj cookie;
-	u_long zticks;
-	u_long dticks;
-	u_long aticks;
-	u_long cticks;
+	uint32_t zticks;
+	uint32_t dticks;
+	uint32_t aticks;
+	uint32_t cticks;
 };
 typedef struct nis_result nis_result;
 
@@ -343,7 +344,7 @@ struct ib_request {
 		u_int ibr_srch_len;
 		nis_attr *ibr_srch_val;
 	} ibr_srch;
-	u_long ibr_flags;
+	u_int ibr_flags;
 	struct {
 		u_int ibr_obj_len;
 		nis_object *ibr_obj_val;
@@ -352,14 +353,14 @@ struct ib_request {
 		u_int ibr_cbhost_len;
 		nis_server *ibr_cbhost_val;
 	} ibr_cbhost;
-	u_long ibr_bufsize;
+	u_int ibr_bufsize;
 	netobj ibr_cookie;
 };
 typedef struct ib_request ib_request;
 
 struct ping_args {
 	nis_name dir;
-	u_long stamp;
+	uint32_t stamp;
 };
 typedef struct ping_args ping_args;
 
@@ -377,7 +378,7 @@ enum log_entry_t {
 typedef enum log_entry_t log_entry_t;
 
 struct log_entry {
-	u_long le_time;
+	uint32_t le_time;
 	log_entry_t le_type;
 	nis_name le_princp;
 	nis_name le_name;
@@ -401,13 +402,13 @@ typedef struct log_result log_result;
 
 struct cp_result {
 	nis_error cp_status;
-	u_long cp_zticks;
-	u_long cp_dticks;
+	uint32_t cp_zticks;
+	uint32_t cp_dticks;
 };
 typedef struct cp_result cp_result;
 
 struct nis_tag {
-	u_long tag_type;
+	u_int tag_type;
 	char *tag_val;
 };
 typedef struct nis_tag nis_tag;
@@ -422,7 +423,7 @@ typedef struct nis_taglist nis_taglist;
 
 struct dump_args {
 	nis_name da_dir;
-	u_long da_time;
+	uint32_t da_time;
 	struct {
 		u_int da_cbhost_len;
 		nis_server *da_cbhost_val;
@@ -532,78 +533,78 @@ typedef enum name_pos name_pos;
 #ifndef __nis_3_h
 #define __nis_3_h
 
-#define NIS_PROG ((u_long)100300)
-#define NIS_VERSION ((u_long)3)
+#define NIS_PROG 100300
+#define NIS_VERSION 3
 
-#define NIS_LOOKUP ((u_long)1)
+#define NIS_LOOKUP 1
 extern  nis_result * nis_lookup_3 __P ((ns_request *, CLIENT *));
 extern  nis_result * nis_lookup_3_svc __P ((ns_request *, struct svc_req *));
-#define NIS_ADD ((u_long)2)
+#define NIS_ADD 2
 extern  nis_result * nis_add_3 __P ((ns_request *, CLIENT *));
 extern  nis_result * nis_add_3_svc __P ((ns_request *, struct svc_req *));
-#define NIS_MODIFY ((u_long)3)
+#define NIS_MODIFY 3
 extern  nis_result * nis_modify_3 __P ((ns_request *, CLIENT *));
 extern  nis_result * nis_modify_3_svc __P ((ns_request *, struct svc_req *));
-#define NIS_REMOVE ((u_long)4)
+#define NIS_REMOVE 4
 extern  nis_result * nis_remove_3 __P ((ns_request *, CLIENT *));
 extern  nis_result * nis_remove_3_svc __P ((ns_request *, struct svc_req *));
-#define NIS_IBLIST ((u_long)5)
+#define NIS_IBLIST 5
 extern  nis_result * nis_iblist_3 __P ((ib_request *, CLIENT *));
 extern  nis_result * nis_iblist_3_svc __P ((ib_request *, struct svc_req *));
-#define NIS_IBADD ((u_long)6)
+#define NIS_IBADD 6
 extern  nis_result * nis_ibadd_3 __P ((ib_request *, CLIENT *));
 extern  nis_result * nis_ibadd_3_svc __P ((ib_request *, struct svc_req *));
-#define NIS_IBMODIFY ((u_long)7)
+#define NIS_IBMODIFY 7
 extern  nis_result * nis_ibmodify_3 __P ((ib_request *, CLIENT *));
 extern  nis_result * nis_ibmodify_3_svc __P ((ib_request *, struct svc_req *));
-#define NIS_IBREMOVE ((u_long)8)
+#define NIS_IBREMOVE 8
 extern  nis_result * nis_ibremove_3 __P ((ib_request *, CLIENT *));
 extern  nis_result * nis_ibremove_3_svc __P ((ib_request *, struct svc_req *));
-#define NIS_IBFIRST ((u_long)9)
+#define NIS_IBFIRST 9
 extern  nis_result * nis_ibfirst_3 __P ((ib_request *, CLIENT *));
 extern  nis_result * nis_ibfirst_3_svc __P ((ib_request *, struct svc_req *));
-#define NIS_IBNEXT ((u_long)10)
+#define NIS_IBNEXT 10
 extern  nis_result * nis_ibnext_3 __P ((ib_request *, CLIENT *));
 extern  nis_result * nis_ibnext_3_svc __P ((ib_request *, struct svc_req *));
-#define NIS_FINDDIRECTORY ((u_long)12)
+#define NIS_FINDDIRECTORY 12
 extern  fd_result * nis_finddirectory_3 __P ((fd_args *, CLIENT *));
 extern  fd_result * nis_finddirectory_3_svc __P ((fd_args *,
 						  struct svc_req *));
-#define NIS_STATUS ((u_long)14)
+#define NIS_STATUS 14
 extern  nis_taglist * nis_status_3 __P ((nis_taglist *, CLIENT *));
 extern  nis_taglist * nis_status_3_svc __P ((nis_taglist *, struct svc_req *));
-#define NIS_DUMPLOG ((u_long)15)
+#define NIS_DUMPLOG 15
 extern  log_result * nis_dumplog_3 __P ((dump_args *, CLIENT *));
 extern  log_result * nis_dumplog_3_svc __P ((dump_args *, struct svc_req *));
-#define NIS_DUMP ((u_long)16)
+#define NIS_DUMP 16
 extern  log_result * nis_dump_3 __P ((dump_args *, CLIENT *));
 extern  log_result * nis_dump_3_svc __P ((dump_args *, struct svc_req *));
-#define NIS_CALLBACK ((u_long)17)
+#define NIS_CALLBACK 17
 extern  bool_t * nis_callback_3 __P ((netobj *, CLIENT *));
 extern  bool_t * nis_callback_3_svc __P ((netobj *, struct svc_req *));
-#define NIS_CPTIME ((u_long)18)
-extern  u_long * nis_cptime_3 __P ((nis_name *, CLIENT *));
-extern  u_long * nis_cptime_3_svc __P ((nis_name *, struct svc_req *));
-#define NIS_CHECKPOINT ((u_long)19)
+#define NIS_CPTIME 18
+extern  uint32_t * nis_cptime_3 __P ((nis_name *, CLIENT *));
+extern  uint32_t * nis_cptime_3_svc __P ((nis_name *, struct svc_req *));
+#define NIS_CHECKPOINT 19
 extern  cp_result * nis_checkpoint_3 __P ((nis_name *, CLIENT *));
 extern  cp_result * nis_checkpoint_3_svc __P ((nis_name *, struct svc_req *));
-#define NIS_PING ((u_long)20)
+#define NIS_PING 20
 extern  void * nis_ping_3 __P ((ping_args *, CLIENT *));
 extern  void * nis_ping_3_svc __P ((ping_args *, struct svc_req *));
-#define NIS_SERVSTATE ((u_long)21)
+#define NIS_SERVSTATE 21
 extern  nis_taglist * nis_servstate_3 __P ((nis_taglist *, CLIENT *));
 extern  nis_taglist * nis_servstate_3_svc __P ((nis_taglist *,
 						struct svc_req *));
-#define NIS_MKDIR ((u_long)22)
+#define NIS_MKDIR 22
 extern  nis_error * nis_mkdir_3 __P ((nis_name *, CLIENT *));
 extern  nis_error * nis_mkdir_3_svc __P ((nis_name *, struct svc_req *));
-#define NIS_RMDIR ((u_long)23)
+#define NIS_RMDIR 23
 extern  nis_error * nis_rmdir_3 __P ((nis_name *, CLIENT *));
 extern  nis_error * nis_rmdir_3_svc __P ((nis_name *, struct svc_req *));
-#define NIS_UPDKEYS ((u_long)24)
+#define NIS_UPDKEYS 24
 extern  nis_error * nis_updkeys_3 __P ((nis_name *, CLIENT *));
 extern  nis_error * nis_updkeys_3_svc __P ((nis_name *, struct svc_req *));
 
 __END_DECLS
 
-#endif /* !_NIS_H_RPCGEN */
+#endif /* ! _RPCSVC_NIS_H */
diff --git a/nis/rpcsvc/nis.x b/nis/rpcsvc/nis.x
index 2d19f37931..93aa09f625 100644
--- a/nis/rpcsvc/nis.x
+++ b/nis/rpcsvc/nis.x
@@ -123,10 +123,10 @@ struct nis_result {
 	nis_error	status;		/* Status of the response */
 	nis_object	objects<>;	/* objects found 	  */
 	netobj		cookie;		/* Cookie Data 		  */
-	u_long		zticks;		/* server ticks	 	  */
-	u_long		dticks;		/* DBM ticks.		  */
-	u_long		aticks;		/* Cache (accel) ticks	  */
-	u_long		cticks;		/* Client ticks		  */
+	uint32_t	zticks;		/* server ticks	 	  */
+	uint32_t	dticks;		/* DBM ticks.		  */
+	uint32_t	aticks;		/* Cache (accel) ticks	  */
+	uint32_t	cticks;		/* Client ticks		  */
 };
 
 /* 
@@ -153,10 +153,10 @@ struct ns_request {
 struct ib_request {
 	nis_name  	ibr_name;	/* The name of the Table 	*/
 	nis_attr  	ibr_srch<>; 	/* The search critereia 	*/
-	u_long		ibr_flags;	/* Optional flags 		*/
+	u_int		ibr_flags;	/* Optional flags 		*/
 	nis_object	ibr_obj<1>;	/* optional object (add/modify) */
 	nis_server	ibr_cbhost<1>;	/* Optional callback info	*/
-	u_long		ibr_bufsize;	/* Optional first/next bufsize	*/
+	u_int		ibr_bufsize;	/* Optional first/next bufsize	*/
 	netobj		ibr_cookie;	/* The first/next cookie	*/
 };
 
@@ -167,7 +167,7 @@ struct ib_request {
  */
 struct ping_args {
 	nis_name	dir;	/* Directory that had the change */
-	u_long		stamp;	/* timestamp of the transaction  */
+	uint32_t	stamp;	/* timestamp of the transaction  */
 };
 
 /* 
@@ -198,7 +198,7 @@ enum log_entry_t {
  * 'name'. 
  */
 struct log_entry {
-	u_long		le_time;	/* Time in seconds 		*/
+	uint32_t	le_time;	/* Time in seconds 		*/
 	log_entry_t	le_type;	/* Type of log entry 		*/
 	nis_name	le_princp;	/* Principal making the change	*/
 	nis_name	le_name;	/* Name of table/dir involved 	*/
@@ -214,19 +214,19 @@ struct log_result {
 	
 struct cp_result {
 	nis_error	cp_status;	/* Status of the checkpoint 	*/
-	u_long		cp_zticks;	/* Service 'ticks' 	    	*/
-	u_long		cp_dticks;	/* Database 'ticks'	    	*/
+	uint32_t	cp_zticks;	/* Service 'ticks' 	    	*/
+	uint32_t	cp_dticks;	/* Database 'ticks'	    	*/
 };
 
 /*
  * This structure defines a generic NIS tag list. The taglist contains
- * zero or tags, each of which is a type and a value. (u_long). 
+ * zero or tags, each of which is a type and a value. (u_int). 
  * These are used to report statistics (see tag definitions below)
  * and to set or reset state variables.
  */
 struct nis_tag {
-	u_long	tag_type;	/* Statistic tag (may vary) 	 */
-	string	tag_val<1024>;	/* Statistic value may also vary */
+	u_int	tag_type;	/* Statistic tag (may vary) 	 */
+	string	tag_val<>;	/* Statistic value may also vary */
 };
 
 struct nis_taglist {
@@ -235,7 +235,7 @@ struct nis_taglist {
 
 struct dump_args {
 	nis_name	da_dir;		/* Directory to dump 	*/
-	u_long		da_time;	/* From this timestamp	*/
+	uint32_t	da_time;	/* From this timestamp	*/
 	nis_server	da_cbhost<1>;	/* Callback to use.	*/
 };
 
@@ -258,7 +258,7 @@ struct nis_bound_endpoint {
 	endpoint ep;
 	int generation;
 	int rank;
-	u_long flags;
+	u_int flags;
 	int hostnum;
 	int epnum;
 	nis_name uaddr;
@@ -342,7 +342,7 @@ program  NIS_PROG {
 		bool	    NIS_CALLBACK(netobj) = 17;
 
 		/* Return last update time for named dir */
-		u_long      NIS_CPTIME(nis_name) = 18;
+		uint32_t    NIS_CPTIME(nis_name) = 18;
 
 		/* Checkpoint directory or table named */
 		cp_result   NIS_CHECKPOINT(nis_name) = 19;
@@ -392,7 +392,7 @@ program  NIS_PROG {
 %/* Structure for storing dynamically allocated static data */
 %struct nis_sdata {
 %	void	*buf;	/* Memory allocation pointer 	*/
-%	u_long	size;	/* Buffer size			*/
+%	u_int	size;	/* Buffer size			*/
 %};
 %
 %/* Generic client creating flags */
diff --git a/nis/rpcsvc/nis_callback.h b/nis/rpcsvc/nis_callback.h
index 526a633831..106bd03b9e 100644
--- a/nis/rpcsvc/nis_callback.h
+++ b/nis/rpcsvc/nis_callback.h
@@ -45,18 +45,18 @@ struct cback_data {
 };
 typedef struct cback_data cback_data;
 
-#define CB_PROG ((u_long)100302)
-#define CB_VERS ((u_long)1)
+#define CB_PROG 100302
+#define CB_VERS 1
 
-#define CBPROC_RECEIVE ((u_long)1)
+#define CBPROC_RECEIVE 1
 extern  bool_t * cbproc_receive_1 __P ((cback_data *, CLIENT *));
 extern  bool_t * cbproc_receive_1_svc __P ((cback_data *, struct svc_req *));
 
-#define CBPROC_FINISH ((u_long)2)
+#define CBPROC_FINISH 2
 extern  void * cbproc_finish_1 __P ((void *, CLIENT *));
 extern  void * cbproc_finish_1_svc __P ((void *, struct svc_req *));
 
-#define CBPROC_ERROR ((u_long)3)
+#define CBPROC_ERROR 3
 extern  void * cbproc_error_1 __P ((nis_error *, CLIENT *));
 extern  void * cbproc_error_1_svc __P ((nis_error *, struct svc_req *));
 extern int cb_prog_1_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
diff --git a/nis/rpcsvc/nis_object.x b/nis/rpcsvc/nis_object.x
index 496a16a1e1..ecd9f48a77 100644
--- a/nis/rpcsvc/nis_object.x
+++ b/nis/rpcsvc/nis_object.x
@@ -5,7 +5,7 @@
  *	All Rights Reserved.
  */
 
-%#pragma ident	"@(#)nis_object.x	1.9	96/07/09 SMI"
+%#pragma ident	"@(#)nis_object.x	1.12	97/11/19 SMI"
 
 #if RPC_HDR
 %
@@ -46,6 +46,7 @@ const NIS_PK_NONE      = 0;	/* no public key (unix/sys auth) */
 const NIS_PK_DH	       = 1;	/* Public key is Diffie-Hellman type */
 const NIS_PK_RSA       = 2;	/* Public key if RSA type */
 const NIS_PK_KERB      = 3;	/* Use kerberos style authentication */
+const NIS_PK_DHEXT     = 4;	/* Extended Diffie-Hellman for RPC-GSS */
 
 /*
  * The fundamental name type of NIS. The name may consist of two parts,
@@ -123,7 +124,7 @@ enum nstype {
  * administrator's approval.
  */
 struct oar_mask {
-	u_long	oa_rights;	/* Access rights mask 	*/
+	u_int	oa_rights;	/* Access rights mask 	*/
 	zotypes	oa_otype;	/* Object type 		*/
 };
 
@@ -141,7 +142,7 @@ struct endpoint {
 struct nis_server {
 	nis_name	name; 	 	/* Principal name of the server  */
 	endpoint	ep<>;  		/* Universal addr(s) for server  */
-	u_long		key_type;	/* Public key type		 */
+	u_int		key_type;	/* Public key type		 */
 	netobj		pkey;		/* server's public key  	 */
 };
 
@@ -149,7 +150,7 @@ struct directory_obj {
 	nis_name   do_name;	 /* Name of the directory being served   */
 	nstype	   do_type;	 /* one of NIS, DNS, IVY, YP, or X.500 	 */
 	nis_server do_servers<>; /* <0> == Primary name server     	 */
-	u_long	   do_ttl;	 /* Time To Live (for caches) 		 */
+	uint32_t   do_ttl;	 /* Time To Live (for caches) 		 */
 	oar_mask   do_armask<>;  /* Create/Destroy rights by object type */
 };
 
@@ -169,7 +170,7 @@ const EN_MODIFIED = 8;	/* Indicates entry is modified. 	*/
 const EN_ASN1     = 64;	/* Means contents use ASN.1 encoding    */
 
 struct entry_col {
-	u_long	ec_flags;	/* Flags for this value */
+	u_int	ec_flags;	/* Flags for this value */
 	opaque	ec_value<>;	/* It's textual value	*/
 };
 
@@ -185,7 +186,7 @@ struct entry_obj {
  * name.directory and recursive groups are expressed as @groupname.directory
  */
 struct group_obj {
-	u_long		gr_flags;	/* Flags controlling group	*/
+	u_int		gr_flags;	/* Flags controlling group	*/
 	nis_name	gr_members<>;  	/* List of names in group 	*/
 };
 
@@ -228,8 +229,8 @@ const TA_ASN1       = 64;	/* Means contents use ASN.1 encoding     */
 
 struct table_col {
 	string	tc_name<64>;	/* Column Name 	 	   */
-	u_long	tc_flags;	/* control flags	   */
-	u_long	tc_rights;	/* Access rights mask	   */
+	u_int	tc_flags;	/* control flags	   */
+	u_int	tc_rights;	/* Access rights mask	   */
 };
 
 struct table_obj {
@@ -280,8 +281,8 @@ union objdata switch (zotypes zo_type) {
  * new position and calculate the size. 
  */
 struct nis_oid {
-	u_long	ctime;		/* Time of objects creation 	*/
-	u_long	mtime;		/* Time of objects modification */
+	uint32_t ctime;		/* Time of objects creation 	*/
+	uint32_t mtime;		/* Time of objects modification */
 };
 
 struct nis_object {
@@ -290,8 +291,8 @@ struct nis_object {
 	nis_name zo_owner;	/* NIS name of object owner.		*/
 	nis_name zo_group;	/* NIS name of access group.		*/
 	nis_name zo_domain;	/* The administrator for the object	*/
-	u_long	 zo_access;	/* Access rights (owner, group, world)	*/
-	u_long	 zo_ttl;	/* Object's time to live in seconds.	*/
+	u_int	 zo_access;	/* Access rights (owner, group, world)	*/
+	uint32_t zo_ttl;	/* Object's time to live in seconds.	*/
 	objdata	 zo_data;	/* Data structure for this type 	*/
 };
 #if RPC_HDR
diff --git a/nis/rpcsvc/nislib.h b/nis/rpcsvc/nislib.h
index 60bf8923d8..007123df41 100644
--- a/nis/rpcsvc/nislib.h
+++ b/nis/rpcsvc/nislib.h
@@ -32,8 +32,8 @@ typedef const char *const_nis_name;
  * nis_lookup (name, flags) resolves a NIS+ name and returns a copy of
  *                          that object  from a NIS+ server.
  *    const nis_name name: name of the object to be resolved
- *    u_long flags: logically ORing zero or more flags (FOLLOW_LINKS,
- *                  HARD_LOOKUP, [NO_CACHE], MASTER_ONLY, EXPAND_NAME)
+ *    unsigned int flags: logically ORing zero or more flags (FOLLOW_LINKS,
+ *                          HARD_LOOKUP, [NO_CACHE], MASTER_ONLY, EXPAND_NAME)
  *
  * nis_add (name, obj) adds objects to the NIS+ namespace.
  *    const nis_name name: fully qualified NIS+ name.
@@ -52,7 +52,7 @@ typedef const char *const_nis_name;
  * nis_modify (name, obj) can change specific attributes of an object
  *                        that already exists in the namespace.
  */
-extern nis_result *nis_lookup __P ((const_nis_name name, u_long flags));
+extern nis_result *nis_lookup __P ((const_nis_name name, unsigned int flags));
 extern nis_result *nis_add __P ((const_nis_name name, const nis_object *obj));
 extern nis_result *nis_remove __P ((const_nis_name name,
 				    const nis_object *obj));
@@ -64,9 +64,9 @@ extern nis_result *nis_modify __P ((const_nis_name name,
  * nis_list (table_name, flags, callback(table_name, obj, userdata), userdata)
  *           search a table in the NIS+ namespace.
  *    const nis_name table_name: indexed name ([xx=yy],table.dir)
- *    u_long flags: logically ORing one or more flags (FOLLOW_LINKS,
- *                  [FOLLOW_PATH], HARD_LOOKUP, [ALL_RESULTS], [NO_CACHE],
- *                  MASTER_ONLY, EXPAND_NAME, RETURN_RESULT)
+ *    unsigned int flags: logically ORing one or more flags (FOLLOW_LINKS,
+ *                      [FOLLOW_PATH], HARD_LOOKUP, [ALL_RESULTS], [NO_CACHE],
+ *                      MASTER_ONLY, EXPAND_NAME, RETURN_RESULT)
  *    callback(): callback is an optional pointer to a function that will
  *                process the ENTRY type objects that are returned from the
  *                search. If this pointer is NULL, then all entries that match
@@ -80,14 +80,14 @@ extern nis_result *nis_modify __P ((const_nis_name name,
  *                                        NIS+ table_name.
  *    const nis_name table_name
  *    const nis_object *obj
- *    u_long flags: 0, ADD_OVERWRITE, RETURN_RESULT
+ *    unsigned int flags: 0, ADD_OVERWRITE, RETURN_RESULT
  *
  * nis_modify_entry (name, obj, flags) modifies an object identified by name.
  *    const nis_name name: object identifier
  *    const nis_object *obj: should point to an entry with the EN_MODIFIED
  *                           flag set in each column that contains new
  *                           information.
- *    u_long flags: 0, MOD_SAMEOBJ, RETURN_RESULT
+ *    unsigned int flags: 0, MOD_SAMEOBJ, RETURN_RESULT
  *
  * nis_remove_entry (table_name, obj, flags) removes a set of entries
  *                                 identified by table_name from the table.
@@ -98,7 +98,7 @@ extern nis_result *nis_modify __P ((const_nis_name name,
  *                           is not the same as the cached object pointed to
  *                           by object then the operation will fail with an
  *                           NIS_NOTSAMEOBJ error
- *    u_long flags: 0, REM_MULTIPLE
+ *    unsigned int flags: 0, REM_MULTIPLE
  *
  * nis_first_entry (table_name) fetches entries from a table one at a time.
  *    const nis_name table_name
@@ -109,19 +109,20 @@ extern nis_result *nis_modify __P ((const_nis_name name,
  *    const netobj *cookie: The value of cookie from the nis_result structure
  *                          form the previous call.
  */
-extern nis_result *nis_list __P ((const_nis_name name, u_long flags,
+extern nis_result *nis_list __P ((const_nis_name name, unsigned int flags,
 				  int (*callback)(const_nis_name table_name,
 						  const nis_object *obj,
 						  const void *userdata),
 				  const void *userdata));
 extern nis_result *nis_add_entry __P ((const_nis_name table_name,
-				       const nis_object *obj, u_long flags));
+				       const nis_object *obj,
+				       unsigned int flags));
 extern nis_result *nis_modify_entry __P ((const_nis_name name,
 					  const nis_object *obj,
-					  u_long flags));
+					  unsigned int flags));
 extern nis_result *nis_remove_entry __P ((const_nis_name table_name,
 					  const nis_object *obj,
-					  u_long flags));
+					  unsigned int flags));
 extern nis_result *nis_first_entry __P ((const_nis_name table_name));
 extern nis_result *nis_next_entry __P ((const_nis_name table_name,
 					const netobj *cookie));
@@ -188,7 +189,8 @@ extern nis_error nis_addmember __P ((const_nis_name member,
 				     const_nis_name group));
 extern nis_error nis_removemember __P ((const_nis_name member,
 					const_nis_name group));
-extern nis_error nis_creategroup __P ((const_nis_name group, u_long flags));
+extern nis_error nis_creategroup __P ((const_nis_name group,
+				       unsigned int flags));
 extern nis_error nis_destroygroup __P ((const_nis_name group));
 extern void nis_print_group_entry __P ((const_nis_name group));
 extern nis_error nis_verifygroup __P ((const_nis_name group));
@@ -196,7 +198,7 @@ extern nis_error nis_verifygroup __P ((const_nis_name group));
 /*
 ** nis_ping
 */
-extern void nis_ping __P ((const_nis_name dirname, u_long utime,
+extern void nis_ping __P ((const_nis_name dirname, uint32_t utime,
 			   const nis_object *dirobj));
 extern nis_result *nis_checkpoint __P ((const_nis_name dirname));
 
@@ -204,7 +206,7 @@ extern nis_result *nis_checkpoint __P ((const_nis_name dirname));
 ** nis_print (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
 */
 extern void nis_print_result __P ((const nis_result *result));
-extern void nis_print_rights __P ((u_long rights));
+extern void nis_print_rights __P ((unsigned int rights));
 extern void nis_print_directory __P ((const directory_obj *dirobj));
 extern void nis_print_group __P ((const group_obj *grpobj));
 extern void nis_print_table __P ((const table_obj *tblobj));
@@ -237,11 +239,11 @@ extern void nis_free_object __P ((nis_object *obj));
 /* (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!) */
 extern nis_name __nis_default_owner __P ((char *));
 extern nis_name __nis_default_group __P ((char *));
-extern u_long __nis_default_ttl __P ((char *));
-extern u_long __nis_default_access __P ((char *, u_long));
+extern uint32_t __nis_default_ttl __P ((char *));
+extern unsigned int __nis_default_access __P ((char *, unsigned int));
 extern fd_result *__nis_finddirectory __P ((directory_obj *, const_nis_name));
 extern void __free_fdresult __P ((fd_result *));
-extern u_long __nis_hash __P ((const void *keyarg, register size_t len));
+extern uint32_t __nis_hash __P ((const void *keyarg, register size_t len));
 
 /* NIS+ cache locking */
 extern int __nis_lock_cache __P ((void));
@@ -254,11 +256,11 @@ struct dir_binding
 {
   CLIENT *clnt;                  /* RPC CLIENT handle */
   nis_server *server_val;        /* List of servers */
-  u_int server_len;              /* # of servers */
-  u_int server_used;             /* Which server we are bind in the moment ? */
-  u_int current_ep;              /* Which endpoint of the server are in use? */
-  u_int trys;                    /* How many server have we tried ? */
-  u_int class;                   /* From which class is server_val ? */
+  unsigned int server_len;       /* # of servers */
+  unsigned int server_used;      /* Which server we are bind in the moment ? */
+  unsigned int current_ep;       /* Which endpoint of the server are in use? */
+  unsigned int trys;             /* How many server have we tried ? */
+  unsigned int class;            /* From which class is server_val ? */
   bool_t master_only;            /* Is only binded to the master */
   bool_t use_auth;               /* Do we use AUTH ? */
   bool_t use_udp;                /* Do we use UDP ? */
@@ -268,7 +270,7 @@ struct dir_binding
 typedef struct dir_binding dir_binding;
 
 extern nis_error __nisbind_create __P ((dir_binding *, const nis_server *,
-					u_int, u_long));
+					unsigned int, unsigned int));
 extern nis_error __nisbind_connect __P ((dir_binding *));
 extern nis_error __nisbind_next __P ((dir_binding *));
 extern void __nisbind_destroy __P ((dir_binding *));
diff --git a/nis/rpcsvc/yp.h b/nis/rpcsvc/yp.h
index 556e57476f..d951c15f10 100644
--- a/nis/rpcsvc/yp.h
+++ b/nis/rpcsvc/yp.h
@@ -237,70 +237,70 @@ typedef struct ypbind_setdom ypbind_setdom;
 
 __BEGIN_DECLS
 
-#define YPPROG ((u_long)100004)
-#define YPVERS ((u_long)2)
+#define YPPROG 100004
+#define YPVERS 2
 
-#define YPPROC_NULL ((u_long)0)
+#define YPPROC_NULL 0
 extern  void *ypproc_null_2 __P ((void *, CLIENT *));
 extern  void *ypproc_null_2_svc __P ((void *, struct svc_req *));
-#define YPPROC_DOMAIN ((u_long)1)
+#define YPPROC_DOMAIN 1
 extern  bool_t *ypproc_domain_2 __P ((domainname *, CLIENT *));
 extern  bool_t *ypproc_domain_2_svc __P ((domainname *, struct svc_req *));
-#define YPPROC_DOMAIN_NONACK ((u_long)2)
+#define YPPROC_DOMAIN_NONACK 2
 extern  bool_t *ypproc_domain_nonack_2 __P ((domainname *, CLIENT *));
 extern  bool_t *ypproc_domain_nonack_2_svc __P ((domainname *, struct svc_req *));
-#define YPPROC_MATCH ((u_long)3)
+#define YPPROC_MATCH 3
 extern  ypresp_val *ypproc_match_2 __P ((ypreq_key *, CLIENT *));
 extern  ypresp_val *ypproc_match_2_svc __P ((ypreq_key *, struct svc_req *));
-#define YPPROC_FIRST ((u_long)4)
+#define YPPROC_FIRST 4
 extern  ypresp_key_val *ypproc_first_2 __P ((ypreq_key *, CLIENT *));
 extern  ypresp_key_val *ypproc_first_2_svc __P ((ypreq_key *, struct svc_req *));
-#define YPPROC_NEXT ((u_long)5)
+#define YPPROC_NEXT 5
 extern  ypresp_key_val *ypproc_next_2 __P ((ypreq_key *, CLIENT *));
 extern  ypresp_key_val *ypproc_next_2_svc __P ((ypreq_key *, struct svc_req *));
-#define YPPROC_XFR ((u_long)6)
+#define YPPROC_XFR 6
 extern  ypresp_xfr *ypproc_xfr_2 __P ((ypreq_xfr *, CLIENT *));
 extern  ypresp_xfr *ypproc_xfr_2_svc __P ((ypreq_xfr *, struct svc_req *));
-#define YPPROC_CLEAR ((u_long)7)
+#define YPPROC_CLEAR 7
 extern  void *ypproc_clear_2 __P ((void *, CLIENT *));
 extern  void *ypproc_clear_2_svc __P ((void *, struct svc_req *));
-#define YPPROC_ALL ((u_long)8)
+#define YPPROC_ALL 8
 extern  ypresp_all *ypproc_all_2 __P ((ypreq_nokey *, CLIENT *));
 extern  ypresp_all *ypproc_all_2_svc __P ((ypreq_nokey *, struct svc_req *));
-#define YPPROC_MASTER ((u_long)9)
+#define YPPROC_MASTER 9
 extern  ypresp_master *ypproc_master_2 __P ((ypreq_nokey *, CLIENT *));
 extern  ypresp_master *ypproc_master_2_svc __P ((ypreq_nokey *, struct svc_req *));
-#define YPPROC_ORDER ((u_long)10)
+#define YPPROC_ORDER 10
 extern  ypresp_order *ypproc_order_2 __P ((ypreq_nokey *, CLIENT *));
 extern  ypresp_order *ypproc_order_2_svc __P ((ypreq_nokey *, struct svc_req *));
-#define YPPROC_MAPLIST ((u_long)11)
+#define YPPROC_MAPLIST 11
 extern  ypresp_maplist *ypproc_maplist_2 __P ((domainname *, CLIENT *));
 extern  ypresp_maplist *ypproc_maplist_2_svc __P ((domainname *, struct svc_req *));
 extern int ypprog_2_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
 
 
-#define YPPUSH_XFRRESPPROG ((u_long)0x40000000)
-#define YPPUSH_XFRRESPVERS ((u_long)1)
+#define YPPUSH_XFRRESPPROG (0x40000000)
+#define YPPUSH_XFRRESPVERS 1
 
-#define YPPUSHPROC_NULL ((u_long)0)
+#define YPPUSHPROC_NULL 0
 extern  void *yppushproc_null_1 __P ((void *, CLIENT *));
 extern  void *yppushproc_null_1_svc __P ((void *, struct svc_req *));
-#define YPPUSHPROC_XFRRESP ((u_long)1)
+#define YPPUSHPROC_XFRRESP 1
 extern  void *yppushproc_xfrresp_1 __P ((yppushresp_xfr *, CLIENT *));
 extern  void *yppushproc_xfrresp_1_svc __P ((yppushresp_xfr *, struct svc_req *));
 extern int yppush_xfrrespprog_1_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
 
 
-#define YPBINDPROG ((u_long)100007)
-#define YPBINDVERS ((u_long)2)
+#define YPBINDPROG 100007
+#define YPBINDVERS 2
 
-#define YPBINDPROC_NULL ((u_long)0)
+#define YPBINDPROC_NULL 0
 extern  void *ypbindproc_null_2 __P ((void *, CLIENT *));
 extern  void *ypbindproc_null_2_svc __P ((void *, struct svc_req *));
-#define YPBINDPROC_DOMAIN ((u_long)1)
+#define YPBINDPROC_DOMAIN 1
 extern  ypbind_resp *ypbindproc_domain_2 __P ((domainname *, CLIENT *));
 extern  ypbind_resp *ypbindproc_domain_2_svc __P ((domainname *, struct svc_req *));
-#define YPBINDPROC_SETDOM ((u_long)2)
+#define YPBINDPROC_SETDOM 2
 extern  void *ypbindproc_setdom_2 __P ((ypbind_setdom *, CLIENT *));
 extern  void *ypbindproc_setdom_2_svc __P ((ypbind_setdom *, struct svc_req *));
 extern int ypbindprog_2_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
diff --git a/nis/rpcsvc/yp_prot.h b/nis/rpcsvc/yp_prot.h
index 82f93b49ed..158a9c128f 100644
--- a/nis/rpcsvc/yp_prot.h
+++ b/nis/rpcsvc/yp_prot.h
@@ -60,13 +60,13 @@ __BEGIN_DECLS
 
 /* Program and version symbols, magic numbers */
 
-#define YPPROG		((u_long)100004)
-#define YPVERS		((u_long)2)
-#define YPVERS_ORIG	((u_long)1)
+#define YPPROG		100004
+#define YPVERS		2
+#define YPVERS_ORIG	1
 #define YPMAXRECORD	1024
-#define YPMAXDOMAIN	64 /* XXX orig. yp_prot.h defines ((u_long)256) */
+#define YPMAXDOMAIN	64 /* XXX orig. yp_prot.h defines 256 */
 #define YPMAXMAP	64
-#define YPMAXPEER	64 /* XXX orig. yp_prot.h defines ((u_long)256) */
+#define YPMAXPEER	64 /* XXX orig. yp_prot.h defines 256 */
 
 /* byte size of a large NIS packet */
 #define YPMSGSZ		1600
@@ -198,19 +198,19 @@ struct ypresp_maplist {
  * of the protocol.
  */
 
-#define YPPROC_NULL	((u_long)0)
-#define YPPROC_DOMAIN	((u_long)1)
-#define YPPROC_DOMAIN_NONACK ((u_long)2)
-#define YPPROC_MATCH	((u_long)3)
-#define YPPROC_FIRST	((u_long)4)
-#define YPPROC_NEXT	((u_long)5)
-#define YPPROC_XFR	((u_long)6)
-#define YPPROC_CLEAR	((u_long)7)
-#define YPPROC_ALL	((u_long)8)
-#define YPPROC_MASTER	((u_long)9)
-#define YPPROC_ORDER	((u_long)10)
-#define YPPROC_MAPLIST	((u_long)11)
-#define	YPPROC_NEWXFR	((u_long)12)
+#define YPPROC_NULL	0
+#define YPPROC_DOMAIN	1
+#define YPPROC_DOMAIN_NONACK 2
+#define YPPROC_MATCH	3
+#define YPPROC_FIRST	4
+#define YPPROC_NEXT	5
+#define YPPROC_XFR	6
+#define YPPROC_CLEAR	7
+#define YPPROC_ALL	8
+#define YPPROC_MASTER	9
+#define YPPROC_ORDER	10
+#define YPPROC_MAPLIST	11
+#define	YPPROC_NEWXFR	12
 
 /*
  *		Protocol between clients and NIS binder servers
@@ -229,15 +229,15 @@ struct ypresp_maplist {
 
 /* Program and version symbols, magic numbers */
 
-#define YPBINDPROG		((u_long)100007)
-#define YPBINDVERS		((u_long)2)
-#define YPBINDVERS_ORIG		((u_long)1)
+#define YPBINDPROG		100007
+#define YPBINDVERS		2
+#define YPBINDVERS_ORIG		1
 
 /* Procedure symbols */
 
-#define YPBINDPROC_NULL		((u_long)0)
-#define YPBINDPROC_DOMAIN	((u_long)1)
-#define YPBINDPROC_SETDOM	((u_long)2)
+#define YPBINDPROC_NULL		0
+#define YPBINDPROC_DOMAIN	1
+#define YPBINDPROC_SETDOM	2
 /*
  * Response structure and overall result status codes.  Success and failure
  * represent two separate response message types.
@@ -282,13 +282,13 @@ struct ypbind_setdom {
  *		is supplied to ypxfr as a command-line parameter when it
  *		is activated by ypserv.
  */
-#define YPPUSHVERS		((u_long)1)
-#define YPPUSHVERS_ORIG		((u_long)1)
+#define YPPUSHVERS		1
+#define YPPUSHVERS_ORIG		1
 
 /* Procedure symbols */
 
-#define YPPUSHPROC_NULL		((u_long)0)
-#define YPPUSHPROC_XFRRESP	((u_long)1)
+#define YPPUSHPROC_NULL		0
+#define YPPUSHPROC_XFRRESP	1
 
 /* Status values for yppushresp_xfr.status */
 
diff --git a/nis/rpcsvc/ypupd.h b/nis/rpcsvc/ypupd.h
index d7ce0d76d0..5b17b62f2a 100644
--- a/nis/rpcsvc/ypupd.h
+++ b/nis/rpcsvc/ypupd.h
@@ -69,19 +69,19 @@ typedef struct ypdelete_args ypdelete_args;
 
 extern  bool_t xdr_ypdelete_args __P ((XDR *, ypdelete_args*));
 
-#define YPU_PROG ((u_long)100028)
-#define YPU_VERS ((u_long)1)
+#define YPU_PROG 100028
+#define YPU_VERS 1
 
-#define YPU_CHANGE ((u_long)1)
+#define YPU_CHANGE 1
 extern  u_int * ypu_change_1 __P ((ypupdate_args *, CLIENT *));
 extern  u_int * ypu_change_1_svc __P((ypupdate_args *, struct svc_req *));
-#define YPU_INSERT ((u_long)2)
+#define YPU_INSERT 2
 extern  u_int * ypu_insert_1 __P ((ypupdate_args *, CLIENT *));
 extern  u_int * ypu_insert_1_svc __P ((ypupdate_args *, struct svc_req *));
-#define YPU_DELETE ((u_long)3)
+#define YPU_DELETE 3
 extern  u_int * ypu_delete_1 __P ((ypdelete_args *, CLIENT *));
 extern  u_int * ypu_delete_1_svc __P ((ypdelete_args *, struct svc_req *));
-#define YPU_STORE ((u_long)4)
+#define YPU_STORE 4
 extern  u_int * ypu_store_1 __P ((ypupdate_args *, CLIENT *));
 extern  u_int * ypu_store_1_svc __P ((ypupdate_args *, struct svc_req *));
 
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index 826b759b25..ef0f385a1e 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -106,7 +106,7 @@ __yp_bind (const char *domain, dom_binding **ypdb)
 	  unsigned short port;
 	  int fd;
 
-	  sprintf (path, "%s/%s.%ld", BINDINGDIR, domain, YPBINDVERS);
+	  sprintf (path, "%s/%s.%d", BINDINGDIR, domain, YPBINDVERS);
 	  fd = open (path, O_RDONLY);
 	  if (fd >= 0)
 	    {
@@ -599,7 +599,7 @@ static int (*ypall_foreach) __P ((int status, char *key, int keylen,
 				  char *val, int vallen, char *data));
 
 static bool_t
-__xdr_ypresp_all (XDR * xdrs, u_long * objp)
+__xdr_ypresp_all (XDR *xdrs, u_long *objp)
 {
   while (1)
     {