Commit 17e223b8 authored by Ondrej Kuznik's avatar Ondrej Kuznik Committed by Howard Chu
Browse files

ITS#7212 rudimentary slapmodify support for back-config

parent 5ee5251f
...@@ -7385,6 +7385,18 @@ config_tool_entry_next( BackendDB *be ) ...@@ -7385,6 +7385,18 @@ config_tool_entry_next( BackendDB *be )
return NOID; return NOID;
} }
static ID
config_tool_dn2id_get( Backend *be, struct berval *dn )
{
CfBackInfo *cfb = be->be_private;
BackendInfo *bi = cfb->cb_db.bd_info;
if ( bi && bi->bi_tool_dn2id_get )
return bi->bi_tool_dn2id_get( &cfb->cb_db, dn );
return NOID;
}
static Entry * static Entry *
config_tool_entry_get( BackendDB *be, ID id ) config_tool_entry_get( BackendDB *be, ID id )
{ {
...@@ -7567,6 +7579,22 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text ) ...@@ -7567,6 +7579,22 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
return NOID; return NOID;
} }
static ID
config_tool_entry_modify( 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_modify )
return bi->bi_tool_entry_modify( &cfb->cb_db, e, text );
return NOID;
}
static struct { static struct {
char *name; char *name;
AttributeDescription **desc; AttributeDescription **desc;
...@@ -7662,8 +7690,10 @@ config_back_initialize( BackendInfo *bi ) ...@@ -7662,8 +7690,10 @@ config_back_initialize( BackendInfo *bi )
bi->bi_tool_entry_first = config_tool_entry_first; bi->bi_tool_entry_first = config_tool_entry_first;
bi->bi_tool_entry_first_x = config_tool_entry_first_x; bi->bi_tool_entry_first_x = config_tool_entry_first_x;
bi->bi_tool_entry_next = config_tool_entry_next; bi->bi_tool_entry_next = config_tool_entry_next;
bi->bi_tool_dn2id_get = config_tool_dn2id_get;
bi->bi_tool_entry_get = config_tool_entry_get; bi->bi_tool_entry_get = config_tool_entry_get;
bi->bi_tool_entry_put = config_tool_entry_put; bi->bi_tool_entry_put = config_tool_entry_put;
bi->bi_tool_entry_modify = config_tool_entry_modify;
ca.argv = argv; ca.argv = argv;
argv[ 0 ] = "slapd"; argv[ 0 ] = "slapd";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment