From cd9980c48b0a6b5e4c0fb56dc2a1bc4c845f4040 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 11 Aug 2015 14:31:50 +0200 Subject: [PATCH] ITS#8215 Add config tool delete support --- servers/slapd/bconfig.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 495f6c1873..98cc18009c 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -7596,6 +7596,22 @@ config_tool_entry_modify( BackendDB *be, Entry *e, struct berval *text ) return NOID; } +static int +config_tool_entry_delete( BackendDB *be, Entry *e, struct berval *text ) +{ + CfBackInfo *cfb = be->be_private; + BackendInfo *bi = cfb->cb_db.bd_info; + CfEntryInfo *ce, *last; + ConfigArgs ca = {0}; + + ce = config_find_base( cfb->cb_root, &e->e_nname, &last ); + + if ( ce && bi && bi->bi_tool_entry_delete ) + return bi->bi_tool_entry_delete( &cfb->cb_db, e, text ); + + return LDAP_OTHER; +} + static struct { char *name; AttributeDescription **desc; @@ -7695,6 +7711,7 @@ config_back_initialize( BackendInfo *bi ) bi->bi_tool_entry_get = config_tool_entry_get; bi->bi_tool_entry_put = config_tool_entry_put; bi->bi_tool_entry_modify = config_tool_entry_modify; + bi->bi_tool_entry_delete = config_tool_entry_delete; ca.argv = argv; argv[ 0 ] = "slapd"; -- 2.39.5