From: Pierangelo Masarati Date: Sat, 9 Aug 2008 16:04:55 +0000 (+0000) Subject: don't return entry if requested attr is not present (ITS#5650) X-Git-Tag: LOCKER_IDS X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c97ef0a708304ad49f61dabe8d9999782a6af55f;p=openldap don't return entry if requested attr is not present (ITS#5650) --- diff --git a/servers/slapd/back-bdb/id2entry.c b/servers/slapd/back-bdb/id2entry.c index 15da6c7659..76ad30ce3b 100644 --- a/servers/slapd/back-bdb/id2entry.c +++ b/servers/slapd/back-bdb/id2entry.c @@ -401,6 +401,15 @@ dn2entry_retry: goto return_results; } + /* NOTE: attr_find() or attrs_find()? */ + if ( at && attr_find( e->e_attrs, at ) == NULL ) { + Debug( LDAP_DEBUG_ACL, + "<= bdb_entry_get: failed to find attribute %s\n", + at->ad_cname.bv_val, 0, 0 ); + rc = LDAP_NO_SUCH_ATTRIBUTE; + goto return_results; + } + return_results: if( rc != LDAP_SUCCESS ) { /* free entry */