]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/entry.c
Partial revert of f30269f5d2e4bb5ee7486fe6542078d1b59dba6d
[openldap] / servers / slapd / entry.c
index 542db90165db3f72855293b0a91b6f7f338839a3..9a4cbdf59e6f74e0d74579b372dac2a17982c442 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -814,18 +814,11 @@ int entry_header(EntryHeader *eh)
 {
        unsigned char *ptr = (unsigned char *)eh->bv.bv_val;
 
+       /* Some overlays can create empty entries
+        * so don't check for zeros here.
+        */
        eh->nattrs = entry_getlen(&ptr);
-       if ( !eh->nattrs ) {
-               Debug( LDAP_DEBUG_ANY,
-                       "entry_header: attribute count was zero\n", 0, 0, 0);
-               return LDAP_OTHER;
-       }
        eh->nvals = entry_getlen(&ptr);
-       if ( !eh->nvals ) {
-               Debug( LDAP_DEBUG_ANY,
-                       "entry_header: value count was zero\n", 0, 0, 0);
-               return LDAP_OTHER;
-       }
        eh->data = (char *)ptr;
        return LDAP_SUCCESS;
 }