summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-13 15:41:07 +0200
committerMichael Adam <obnox@samba.org>2008-04-13 15:41:07 +0200
commit86d189dad1e8d833974522ad86fd5b7317542c4a (patch)
tree0a96e4675a3bab5c1a9578cba9728d41d99f5ffd
parente5d83f07cd6bf720a77f7d19a171164cec37415f (diff)
downloadsamba-86d189dad1e8d833974522ad86fd5b7317542c4a.tar.gz
samba-86d189dad1e8d833974522ad86fd5b7317542c4a.tar.bz2
samba-86d189dad1e8d833974522ad86fd5b7317542c4a.zip
registry: honour the WERROR that regsubkey_ctr_addkey gives in regdb_fetch_keys.
Michael (This used to be commit 7dd7471da7eca2671b4aa62e8790973e3ff14177)
-rw-r--r--source3/registry/reg_backend_db.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 31a8f77614..bd28eb3241 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -720,6 +720,7 @@ fail:
int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr)
{
+ WERROR werr;
char *path = NULL;
uint32 num_items;
uint8 *buf;
@@ -764,7 +765,12 @@ int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr)
for (i=0; i<num_items; i++) {
len += tdb_unpack(buf+len, buflen-len, "f", subkeyname);
- regsubkey_ctr_addkey(ctr, subkeyname);
+ werr = regsubkey_ctr_addkey(ctr, subkeyname);
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(5, ("regdb_fetch_keys: regsubkey_ctr_addkey "
+ "failed: %s\n", dos_errstr(werr)));
+ goto fail;
+ }
}
DEBUG(11,("regdb_fetch_keys: Exit [%d] items\n", num_items));