From 7e0bef604af0abeedd46f3ae42bd3002f18556f5 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 28 Oct 2011 19:52:49 +0200 Subject: s4:lib/registry/ldb.c - quit the deletion of a not-existing default value with WERR_BADFILE Reviewed-by: Jelmer --- source4/lib/registry/ldb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/lib/registry') diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 0aa476f799..0f0ddf9154 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -653,7 +653,9 @@ static WERROR ldb_del_value(TALLOC_CTX *mem_ctx, struct hive_key *key, talloc_free(msg); - if (ret != LDB_SUCCESS) { + if (ret == LDB_ERR_NO_SUCH_ATTRIBUTE) { + return WERR_BADFILE; + } else if (ret != LDB_SUCCESS) { DEBUG(1, ("ldb_del_value: %s\n", ldb_errstring(kd->ldb))); return WERR_FOOBAR; } -- cgit