about summary refs log tree commit diff
path: root/nis/nss_compat
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_compat')
-rw-r--r--nis/nss_compat/compat-grp.c12
-rw-r--r--nis/nss_compat/compat-pwd.c8
-rw-r--r--nis/nss_compat/compat-spwd.c8
3 files changed, 2 insertions, 26 deletions
diff --git a/nis/nss_compat/compat-grp.c b/nis/nss_compat/compat-grp.c
index a460d8a8ef..6d4ca25e5d 100644
--- a/nis/nss_compat/compat-grp.c
+++ b/nis/nss_compat/compat-grp.c
@@ -29,10 +29,6 @@
 #include <rpcsvc/nis.h>
 #include <nsswitch.h>
 
-/* Comment out the following line for the production version.  */
-/* #define NDEBUG 1 */
-#include <assert.h>
-
 #include "nss-nisplus.h"
 #include "nisplus-parser.h"
 
@@ -101,10 +97,6 @@ _nss_first_init (void)
 						key, sizeof (key) - 1),
 				       local_dir, len_local_dir + 1)
 		     - grptable) - 1;
-
-      /* *Maybe* (I'm no NIS expert) we have to duplicate the `local_dir'
-	 value since it might change during our work.  So add a test here.  */
-      assert (grptablelen == sizeof (key) + len_local_dir);
     }
 
   return NSS_STATUS_SUCCESS;
@@ -705,7 +697,7 @@ getgrgid_plusgroup (gid_t gid, struct group *result, char *buffer,
   if (use_nisplus) /* Do the NIS+ query here */
     {
       nis_result *res;
-      char buf[1024 + grptablelen];
+      char buf[24 + grptablelen];
 
       sprintf(buf, "[gid=%d],%s", gid, grptable);
       res = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
@@ -727,7 +719,7 @@ getgrgid_plusgroup (gid_t gid, struct group *result, char *buffer,
     }
   else /* Use NIS */
     {
-      char buf[1024];
+      char buf[24];
       char *domain, *outval, *p;
       int outvallen;
 
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c
index 0216522d36..38a7e2f205 100644
--- a/nis/nss_compat/compat-pwd.c
+++ b/nis/nss_compat/compat-pwd.c
@@ -30,10 +30,6 @@
 #include <rpcsvc/nis.h>
 #include <nsswitch.h>
 
-/* Comment out the following line for the production version.  */
-/* #define NDEBUG 1 */
-#include <assert.h>
-
 #include "netgroup.h"
 #include "nss-nisplus.h"
 #include "nisplus-parser.h"
@@ -227,10 +223,6 @@ internal_setpwent (ent_t *ent)
 						key, sizeof (key) - 1),
 				       local_dir, len_local_dir + 1)
 		     - pwdtable) - 1;
-
-      /* *Maybe* (I'm no NIS expert) we have to duplicate the `local_dir'
-	 value since it might change during our work.  So add a test here.  */
-      assert (pwdtablelen == sizeof (key) + len_local_dir);
     }
 
   ent->blacklist.current = 0;
diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c
index c33d5aa339..5da19d3feb 100644
--- a/nis/nss_compat/compat-spwd.c
+++ b/nis/nss_compat/compat-spwd.c
@@ -30,10 +30,6 @@
 #include <rpcsvc/nis.h>
 #include <nsswitch.h>
 
-/* Comment out the following line for the production version.  */
-/* #define NDEBUG 1 */
-#include <assert.h>
-
 #include "netgroup.h"
 #include "nss-nisplus.h"
 #include "nisplus-parser.h"
@@ -179,10 +175,6 @@ internal_setspent (ent_t *ent)
 						key, sizeof (key) - 1),
 				       local_dir, len_local_dir + 1)
 		     - pwdtable) - 1;
-
-      /* *Maybe* (I'm no NIS expert) we have to duplicate the `local_dir'
-	 value since it might change during our work.  So add a test here.  */
-      assert (pwdtablelen == sizeof (key) + len_local_dir);
     }
 
   ent->blacklist.current = 0;