From 8a703aba836b6f5fae97f134c1ca59525161ffd7 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 11 Feb 2008 20:56:46 +0000 Subject: [PATCH] ITS#5328 - return LDAP result code from config_back_entry_get (back-config bi_entry_get_rw) --- servers/slapd/bconfig.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 0be46d6b60..b65928e9a8 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -5298,18 +5298,23 @@ int config_back_entry_get( { CfBackInfo *cfb; CfEntryInfo *ce, *last; + int rc = LDAP_NO_SUCH_OBJECT; cfb = (CfBackInfo *)op->o_bd->be_private; ce = config_find_base( cfb->cb_root, ndn, &last ); if ( ce ) { *ent = ce->ce_entry; - if ( *ent && oc && !is_entry_objectclass_or_sub( *ent, oc ) ) { - *ent = NULL; + if ( *ent ) { + rc = LDAP_SUCCESS; + if ( oc && !is_entry_objectclass_or_sub( *ent, oc ) ) { + rc = LDAP_NO_SUCH_ATTRIBUTE; + *ent = NULL; + } } } - return ( *ent == NULL ? 1 : 0 ); + return rc; } static void -- 2.39.5