about summary refs log tree commit diff
path: root/nis/nss_nisplus/nisplus-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nisplus/nisplus-network.c')
-rw-r--r--nis/nss_nisplus/nisplus-network.c13
1 files changed, 6 insertions, 7 deletions
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);