about summary refs log tree commit diff
path: root/nis/nss_nisplus
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nisplus')
-rw-r--r--nis/nss_nisplus/nisplus-alias.c6
-rw-r--r--nis/nss_nisplus/nisplus-ethers.c14
-rw-r--r--nis/nss_nisplus/nisplus-grp.c6
-rw-r--r--nis/nss_nisplus/nisplus-hosts.c16
-rw-r--r--nis/nss_nisplus/nisplus-netgrp.c12
-rw-r--r--nis/nss_nisplus/nisplus-network.c13
-rw-r--r--nis/nss_nisplus/nisplus-proto.c12
-rw-r--r--nis/nss_nisplus/nisplus-publickey.c6
-rw-r--r--nis/nss_nisplus/nisplus-pwd.c6
-rw-r--r--nis/nss_nisplus/nisplus-rpc.c12
-rw-r--r--nis/nss_nisplus/nisplus-service.c14
-rw-r--r--nis/nss_nisplus/nisplus-spwd.c6
12 files changed, 58 insertions, 65 deletions
diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c
index 8d682d785c..f074c5fa63 100644
--- a/nis/nss_nisplus/nisplus-alias.c
+++ b/nis/nss_nisplus/nisplus-alias.c
@@ -48,9 +48,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "mail_aliases.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "mail_aliases.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
diff --git a/nis/nss_nisplus/nisplus-ethers.c b/nis/nss_nisplus/nisplus-ethers.c
index cfdb3dc4e1..b21c276df2 100644
--- a/nis/nss_nisplus/nisplus-ethers.c
+++ b/nis/nss_nisplus/nisplus-ethers.c
@@ -92,9 +92,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "ethers.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "ethers.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
@@ -267,10 +267,10 @@ _nss_nisplus_getntohost_r (const struct ether_addr *addr,
       char buf[255 + tablename_len];
 
       memset (&buf, '\0', sizeof (buf));
-      snprintf(buf, sizeof (buf), "[addr=%x:%x:%x:%x:%x:%x],ethers.org_dir",
-	       addr->ether_addr_octet[0], addr->ether_addr_octet[1],
-	       addr->ether_addr_octet[2], addr->ether_addr_octet[3],
-	       addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
+      sprintf(buf, "[addr=%x:%x:%x:%x:%x:%x],ethers.org_dir",
+	      addr->ether_addr_octet[0], addr->ether_addr_octet[1],
+	      addr->ether_addr_octet[2], addr->ether_addr_octet[3],
+	      addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
 
       result = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
 
diff --git a/nis/nss_nisplus/nisplus-grp.c b/nis/nss_nisplus/nisplus-grp.c
index 1031d69ac9..fb200321d2 100644
--- a/nis/nss_nisplus/nisplus-grp.c
+++ b/nis/nss_nisplus/nisplus-grp.c
@@ -43,9 +43,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "group.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "group.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c
index 89a8bf7564..7fefec0fd3 100644
--- a/nis/nss_nisplus/nisplus-hosts.c
+++ b/nis/nss_nisplus/nisplus-hosts.c
@@ -98,8 +98,8 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
   if (NISENTRYLEN (0, 0, result) + 1 > room_left)
     goto no_more_room;
 
-  p = stpncpy (first_unused, NISENTRYVAL (0, 0, result),
-	       NISENTRYLEN (0, 0, result));
+  p = __stpncpy (first_unused, NISENTRYVAL (0, 0, result),
+		 NISENTRYLEN (0, 0, result));
   *p = '\0';
   room_left -= (NISENTRYLEN (0, 0, result) + 1);
   host->h_name = first_unused;
@@ -115,8 +115,8 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
 	    goto no_more_room;
 
 	  *p++ = ' ';
-	  p = stpncpy (p, NISENTRYVAL (i, 1, result),
-		       NISENTRYLEN (i, 1, result));
+	  p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+			 NISENTRYLEN (i, 1, result));
 	  *p = '\0';
 	  room_left -= (NISENTRYLEN (i, 1, result) + 1);
 	}
@@ -176,9 +176,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "hosts.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "hosts.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
@@ -415,7 +415,7 @@ _nss_nisplus_gethostbyaddr_r (const char *addr, int addrlen, int type,
       char buf[255 + tablename_len];
       int retval, parse_res;
 
-      snprintf(buf, sizeof (buf) -1, "[addr=%s],%s",
+      sprintf (buf, "[addr=%s],%s",
 	       inet_ntoa (*(struct in_addr *)addr), tablename_val);
       result = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
 
diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c
index 967eec898c..2a2f4b5ec9 100644
--- a/nis/nss_nisplus/nisplus-netgrp.c
+++ b/nis/nss_nisplus/nisplus-netgrp.c
@@ -92,8 +92,8 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
       else
 	{
 	  result->val.triple.host = cp;
-	  cp = stpncpy (cp, NISENTRYVAL (position, 2, data),
-			NISENTRYLEN (position, 2, data));
+	  cp = __stpncpy (cp, NISENTRYVAL (position, 2, data),
+			  NISENTRYLEN (position, 2, data));
 	  *cp = '\0';
 	  ++cp;
 	}
@@ -103,8 +103,8 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
       else
 	{
 	  result->val.triple.user = cp;
-	  cp = stpncpy (cp, NISENTRYVAL (position, 3, data),
-			NISENTRYLEN (position, 3, data));
+	  cp = __stpncpy (cp, NISENTRYVAL (position, 3, data),
+			  NISENTRYLEN (position, 3, data));
 	  *cp = '\0';
 	  ++cp;
 	}
@@ -114,8 +114,8 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
       else
 	{
 	  result->val.triple.domain = cp;
-	  cp = stpncpy (cp, NISENTRYVAL (position, 4, data),
-			NISENTRYLEN (position, 4, data));
+	  cp = __stpncpy (cp, NISENTRYVAL (position, 4, data),
+			  NISENTRYLEN (position, 4, data));
 	  *cp = '\0';
 	}
 
diff --git a/nis/nss_nisplus/nisplus-network.c b/nis/nss_nisplus/nisplus-network.c
index ff71af8573..8aa8bc0f9e 100644
--- a/nis/nss_nisplus/nisplus-network.c
+++ b/nis/nss_nisplus/nisplus-network.c
@@ -87,8 +87,8 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network,
 	    goto no_more_room;
 
 	  *p++ = ' ';
-          p = stpncpy (p, NISENTRYVAL (i, 1, result),
-                       NISENTRYLEN (i, 1, result));
+          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+			 NISENTRYLEN (i, 1, result));
           *p = '\0';
           room_left -= (NISENTRYLEN (i, 1, result) + 1);
         }
@@ -149,9 +149,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "networks.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "networks.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
@@ -366,8 +366,7 @@ _nss_nisplus_getnetbyaddr_r (const unsigned long addr, const int type,
     struct in_addr in;
 
     in = inet_makeaddr (addr, 0);
-    snprintf(buf, sizeof (buf) - 1, "[addr=%s],%s",
-	     inet_ntoa (in), tablename_len);
+    sprintf (buf, "[addr=%s],%s", inet_ntoa (in), tablename_val);
 
     result = nis_list(buf, EXPAND_NAME, NULL, NULL);
 
diff --git a/nis/nss_nisplus/nisplus-proto.c b/nis/nss_nisplus/nisplus-proto.c
index ddfce86905..b64d4bdd02 100644
--- a/nis/nss_nisplus/nisplus-proto.c
+++ b/nis/nss_nisplus/nisplus-proto.c
@@ -85,8 +85,8 @@ _nss_nisplus_parse_protoent (nis_result * result, struct protoent *proto,
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
             goto no_more_room;
 	  *p++ = ' ';
-          p = stpncpy (p, NISENTRYVAL (i, 1, result),
-                       NISENTRYLEN (i, 1, result));
+          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+			 NISENTRYLEN (i, 1, result));
           *p = '\0';
           room_left -= (NISENTRYLEN (i, 1, result) + 1);
         }
@@ -143,9 +143,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "protocols.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "protocols.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
@@ -327,7 +327,7 @@ _nss_nisplus_getprotobynumber_r (const int number, struct protoent *proto,
     nis_result *result;
     char buf[46 + tablename_len];
 
-    snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val);
+    sprintf (buf, "[number=%d],%s", number, tablename_val);
 
     result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
 
diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c
index 99ec2a08ec..72ed1a5044 100644
--- a/nis/nss_nisplus/nisplus-publickey.c
+++ b/nis/nss_nisplus/nisplus-publickey.c
@@ -25,10 +25,8 @@
 #include <syslog.h>
 #include <rpc/rpc.h>
 #include <rpcsvc/nis.h>
-#ifdef HAVE_SECURE_RPC
 #include <rpc/key_prot.h>
 extern int xdecrypt (char *, char *);
-#endif
 
 #include <nss-nisplus.h>
 
@@ -107,7 +105,6 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey)
 enum nss_status
 _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd)
 {
-#ifdef HAVE_SECURE_RPC
   nis_result *res;
   enum nss_status retval;
   char buf[NIS_MAXNAMELEN+2];
@@ -179,9 +176,6 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd)
 
   buf[HEXKEYBYTES] = 0;
   strcpy (skey, buf);
-#else
-  skey[0] = 0;
-#endif
 
   return NSS_STATUS_SUCCESS;
 }
diff --git a/nis/nss_nisplus/nisplus-pwd.c b/nis/nss_nisplus/nisplus-pwd.c
index e358b060e1..3974defa47 100644
--- a/nis/nss_nisplus/nisplus-pwd.c
+++ b/nis/nss_nisplus/nisplus-pwd.c
@@ -43,9 +43,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "passwd.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "passwd.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
diff --git a/nis/nss_nisplus/nisplus-rpc.c b/nis/nss_nisplus/nisplus-rpc.c
index 6682a7502a..e93a51652e 100644
--- a/nis/nss_nisplus/nisplus-rpc.c
+++ b/nis/nss_nisplus/nisplus-rpc.c
@@ -82,8 +82,8 @@ _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc,
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
 	    goto no_more_room;
 	  *p++ = ' ';
-          p = stpncpy (p, NISENTRYVAL (i, 1, result),
-                       NISENTRYLEN (i, 1, result));
+          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+			 NISENTRYLEN (i, 1, result));
           *p = '\0';
           room_left -= (NISENTRYLEN (i, 1, result) + 1);
         }
@@ -144,9 +144,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "rpc.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "rpc.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
@@ -329,7 +329,7 @@ _nss_nisplus_getrpcbynumber_r (const int number, struct rpcent *rpc,
     nis_result *result;
     char buf[100 + tablename_len];
 
-    snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val);
+    sprintf (buf, "[number=%d],%s", number, tablename_val);
 
     result = nis_list(buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
 
diff --git a/nis/nss_nisplus/nisplus-service.c b/nis/nss_nisplus/nisplus-service.c
index e8a12145d3..e1a89f92be 100644
--- a/nis/nss_nisplus/nisplus-service.c
+++ b/nis/nss_nisplus/nisplus-service.c
@@ -91,8 +91,8 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
             goto no_more_room;
 	  *p++ = ' ';
-          p = stpncpy (p, NISENTRYVAL (i, 1, result),
-                       NISENTRYLEN (i, 1, result));
+          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+			 NISENTRYLEN (i, 1, result));
           *p = '\0';
           room_left -= (NISENTRYLEN (i, 1, result) + 1);
         }
@@ -150,9 +150,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "services.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "services.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);
@@ -348,8 +348,8 @@ _nss_nisplus_getservbynumber_r (const int number, const char *protocol,
       nis_result *result;
       char buf[60 + strlen (protocol) + tablename_len];
 
-      snprintf (buf, sizeof (buf), "[number=%d,proto=%s],%s",
-		number, protocol, tablename_val);
+      sprintf (buf, "[number=%d,proto=%s],%s",
+	       number, protocol, tablename_val);
 
       result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
 
diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c
index 507aa4bcad..1b3f68325e 100644
--- a/nis/nss_nisplus/nisplus-spwd.c
+++ b/nis/nss_nisplus/nisplus-spwd.c
@@ -41,9 +41,9 @@ _nss_create_tablename (void)
       char buf [40 + strlen (nis_local_directory ())];
       char *p;
 
-      p = stpcpy (buf, "passwd.org_dir.");
-      p = stpcpy (p, nis_local_directory ());
-      tablename_val = strdup (buf);
+      p = __stpcpy (buf, "passwd.org_dir.");
+      p = __stpcpy (p, nis_local_directory ());
+      tablename_val = __strdup (buf);
       if (tablename_val == NULL)
         return NSS_STATUS_TRYAGAIN;
       tablename_len = strlen (tablename_val);