diff options
author | Michael Adam <obnox@samba.org> | 2011-07-04 13:09:31 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-07-04 20:02:08 +0200 |
commit | 144c8d77d8dcde0b85cef28b6515360aa0c55b85 (patch) | |
tree | 7e6afe584f58bbad2127556d8a94b2e18fe1635b /source3 | |
parent | 15a50ef8f856d83508ece3a8294dfaffbadc3b41 (diff) | |
download | samba-144c8d77d8dcde0b85cef28b6515360aa0c55b85.tar.gz samba-144c8d77d8dcde0b85cef28b6515360aa0c55b85.tar.bz2 samba-144c8d77d8dcde0b85cef28b6515360aa0c55b85.zip |
s3:registry: add regdb_create_subkey_internal() taking additional db context argument
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_backend_db.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index efb2b46b88..84ac57216b 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -1143,14 +1143,16 @@ done: return werror_to_ntstatus(werr); } -static WERROR regdb_create_subkey(const char *key, const char *subkey) +static WERROR regdb_create_subkey_internal(struct db_context *db, + const char *key, + const char *subkey) { WERROR werr; struct regsubkey_ctr *subkeys; TALLOC_CTX *mem_ctx = talloc_stackframe(); struct regdb_create_subkey_context create_ctx; - if (!regdb_key_exists(regdb, key)) { + if (!regdb_key_exists(db, key)) { werr = WERR_NOT_FOUND; goto done; } @@ -1158,7 +1160,7 @@ static WERROR regdb_create_subkey(const char *key, const char *subkey) werr = regsubkey_ctr_init(mem_ctx, &subkeys); W_ERROR_NOT_OK_GOTO_DONE(werr); - werr = regdb_fetch_keys_internal(regdb, key, subkeys); + werr = regdb_fetch_keys_internal(db, key, subkeys); W_ERROR_NOT_OK_GOTO_DONE(werr); if (regsubkey_ctr_key_exists(subkeys, subkey)) { @@ -1171,7 +1173,7 @@ static WERROR regdb_create_subkey(const char *key, const char *subkey) create_ctx.key = key; create_ctx.subkey = subkey; - werr = ntstatus_to_werror(dbwrap_trans_do(regdb, + werr = ntstatus_to_werror(dbwrap_trans_do(db, regdb_create_subkey_action, &create_ctx)); @@ -1180,6 +1182,11 @@ done: return werr; } +static WERROR regdb_create_subkey(const char *key, const char *subkey) +{ + return regdb_create_subkey_internal(regdb, key, subkey); +} + /** * create a subkey of a given key */ |