From 4572e7d7212418319164f26a182a9793cf0fcc1c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 29 Jan 2009 20:30:19 +0000 Subject: [PATCH] proxy RFC4525 increment; bail out in case of unsupported extension (ITS#5912) --- servers/slapd/back-ldap/init.c | 5 ++++- servers/slapd/back-meta/init.c | 5 ++++- servers/slapd/modify.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index 93df94c28e..6c9979bd50 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -62,7 +62,10 @@ ldap_back_initialize( BackendInfo *bi ) * and the entryTtl attribute */ SLAP_BFLAG_DYNAMIC | #endif /* LDAP_DYNAMIC_OBJECTS */ - 0; + + /* back-ldap recognizes RFC4525 increment; + * let the remote server complain, if needed (ITS#5912) */ + SLAP_BFLAG_INCREMENT; bi->bi_open = ldap_back_open; bi->bi_config = 0; diff --git a/servers/slapd/back-meta/init.c b/servers/slapd/back-meta/init.c index 4d7d92195e..ab9df5687b 100644 --- a/servers/slapd/back-meta/init.c +++ b/servers/slapd/back-meta/init.c @@ -53,7 +53,10 @@ meta_back_initialize( SLAP_BFLAG_DYNAMIC | #endif /* LDAP_DYNAMIC_OBJECTS */ #endif - 0; + + /* back-meta recognizes RFC4525 increment; + * let the remote server complain, if needed (ITS#5912) */ + SLAP_BFLAG_INCREMENT; bi->bi_open = meta_back_open; bi->bi_config = 0; diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 115b4705ee..7adc30469c 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -268,6 +268,7 @@ fe_op_modify( Operation *op, SlapReply *rs ) if ( op->orm_increment && !SLAP_INCREMENT( op->o_bd ) ) { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, "modify/increment not supported in context" ); + goto cleanup; } /* -- 2.39.5