summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-01-30 13:49:14 +0100
committerMichael Adam <obnox@samba.org>2011-01-30 14:53:13 +0100
commite57d4c41d7606ab7853383f5de2f572e01bb7942 (patch)
tree9af745fe76b989e1ff18f7425dcec1e4d0ba9029 /source3/utils
parentb1f800a0d17e9a927cb5d998438b3fdb6b302b13 (diff)
downloadsamba-e57d4c41d7606ab7853383f5de2f572e01bb7942.tar.gz
samba-e57d4c41d7606ab7853383f5de2f572e01bb7942.tar.bz2
samba-e57d4c41d7606ab7853383f5de2f572e01bb7942.zip
s3:net registry: ignore WERR_BADFILE when --force is given in deletekey[_recursive]
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Sun Jan 30 14:53:13 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_registry.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c
index 7ad0f36823..1e87e809fb 100644
--- a/source3/utils/net_registry.c
+++ b/source3/utils/net_registry.c
@@ -277,7 +277,9 @@ static int net_registry_deletekey_internal(struct net_context *c, int argc,
} else {
werr = reg_deletekey(hivekey, subkeyname);
}
- if (!W_ERROR_IS_OK(werr)) {
+ if (!W_ERROR_IS_OK(werr) &&
+ !(c->opt_force && W_ERROR_EQUAL(werr, WERR_BADFILE)))
+ {
d_fprintf(stderr, "reg_deletekey %s: %s\n", _("failed"),
win_errstr(werr));
goto done;