git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8afaa7
)
s3-rpc_client: Close policy handles before creating defaults.
author
Andreas Schneider
<asn@samba.org>
Mon, 25 Jul 2011 20:16:20 +0000
(22:16 +0200)
committer
Andreas Schneider
<asn@samba.org>
Wed, 27 Jul 2011 06:49:58 +0000
(08:49 +0200)
We reopen the hive and key so close them before reopen.
source3/rpc_client/cli_winreg_spoolss.c
patch
|
blob
|
history
diff --git
a/source3/rpc_client/cli_winreg_spoolss.c
b/source3/rpc_client/cli_winreg_spoolss.c
index ebdd419a6557971850eece980379b116491edb86..e3d8a3d20548e55aeea9afcd129b08ca49df74e7 100644
(file)
--- a/
source3/rpc_client/cli_winreg_spoolss.c
+++ b/
source3/rpc_client/cli_winreg_spoolss.c
@@
-1666,6
+1666,21
@@
WERROR winreg_get_printer_secdesc(TALLOC_CTX *mem_ctx,
}
if (!W_ERROR_IS_OK(result)) {
if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+ WERROR ignore;
+
+ if (is_valid_policy_hnd(&key_hnd)) {
+ dcerpc_winreg_CloseKey(winreg_handle,
+ tmp_ctx,
+ &key_hnd,
+ &ignore);
+ }
+
+ if (is_valid_policy_hnd(&hive_hnd)) {
+ dcerpc_winreg_CloseKey(winreg_handle,
+ tmp_ctx,
+ &hive_hnd,
+ &ignore);
+ }
goto create_default;
}
goto done;