git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e490415
)
registry: Avoid mapping registry return codes: return the right value in the first...
author
Jelmer Vernooij
<jelmer@samba.org>
Fri, 18 Jan 2008 02:00:00 +0000
(
03:00
+0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Fri, 18 Jan 2008 02:42:00 +0000
(
03:42
+0100)
(This used to be commit
434e4857cec17d6d9e8983e151c170eed59fc6d1
)
source4/lib/registry/local.c
patch
|
blob
|
history
source4/lib/registry/samba.c
patch
|
blob
|
history
source4/lib/registry/tests/registry.c
patch
|
blob
|
history
source4/rpc_server/winreg/rpc_winreg.c
patch
|
blob
|
history
diff --git
a/source4/lib/registry/local.c
b/source4/lib/registry/local.c
index fa59f255966c0154fd870f2f0499efd0dc9d86e6..3e463100c9cb80380f02066cfd3b6a45010f8c91 100644
(file)
--- a/
source4/lib/registry/local.c
+++ b/
source4/lib/registry/local.c
@@
-140,7
+140,7
@@
WERROR local_get_predefined_key(struct registry_context *ctx,
}
if (mp == NULL)
}
if (mp == NULL)
- return WERR_
NOT_FOUND
;
+ return WERR_
BADFILE
;
*key = reg_import_hive_key(ctx, mp->key,
mp->path.predefined_key,
*key = reg_import_hive_key(ctx, mp->key,
mp->path.predefined_key,
diff --git
a/source4/lib/registry/samba.c
b/source4/lib/registry/samba.c
index 02f3363bab97366e806eaf393425c5e1854cb7bf..599385e73c210819a59d539aae946966fe4421ed 100644
(file)
--- a/
source4/lib/registry/samba.c
+++ b/
source4/lib/registry/samba.c
@@
-42,7
+42,7
@@
static WERROR mount_samba_hive(struct registry_context *ctx,
error = reg_open_hive(ctx, location, auth_info, creds, lp_ctx, &hive);
error = reg_open_hive(ctx, location, auth_info, creds, lp_ctx, &hive);
- if (W_ERROR_EQUAL(error, WERR_
NOT_FOUND
))
+ if (W_ERROR_EQUAL(error, WERR_
BADFILE
))
error = reg_open_ldb_file(ctx, location, auth_info,
creds, lp_ctx, &hive);
error = reg_open_ldb_file(ctx, location, auth_info,
creds, lp_ctx, &hive);
diff --git
a/source4/lib/registry/tests/registry.c
b/source4/lib/registry/tests/registry.c
index 59e31f55dc15415b13c6d681080abe59b7ae1421..06783e6a75676afec31bdac0ce0fcacaf769c01f 100644
(file)
--- a/
source4/lib/registry/tests/registry.c
+++ b/
source4/lib/registry/tests/registry.c
@@
-53,7
+53,7
@@
static bool test_get_predefined_unknown(struct torture_context *tctx,
WERROR error;
error = reg_get_predefined_key(rctx, 1337, &root);
WERROR error;
error = reg_get_predefined_key(rctx, 1337, &root);
- torture_assert_werr_equal(tctx, error, WERR_
NOT_FOUND
,
+ torture_assert_werr_equal(tctx, error, WERR_
BADFILE
,
"getting predefined key failed");
return true;
}
"getting predefined key failed");
return true;
}
diff --git
a/source4/rpc_server/winreg/rpc_winreg.c
b/source4/rpc_server/winreg/rpc_winreg.c
index 3c00944d595a8df0922509c29c8591f134aa81d9..681e3b918f870afc11f38ce47c81539fbd3ee8c0 100644
(file)
--- a/
source4/rpc_server/winreg/rpc_winreg.c
+++ b/
source4/rpc_server/winreg/rpc_winreg.c
@@
-356,13
+356,6
@@
static WERROR dcesrv_winreg_OpenKey(struct dcesrv_call_state *dce_call,
r->out.handle = &newh->wire_handle;
} else {
talloc_free(newh);
r->out.handle = &newh->wire_handle;
} else {
talloc_free(newh);
- /*
- * Windows expects WERR_BADFILE when a particular key
- * is not found. If we receive WERR_NOT_FOUND from the lower
- * layer calls, translate it here to return what is expected.
- */
- if (W_ERROR_EQUAL(result, WERR_NOT_FOUND))
- return WERR_BADFILE;
}
return result;
}
return result;