diff options
author | Andreas Schneider <asn@samba.org> | 2011-07-25 22:16:20 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-07-27 08:49:58 +0200 |
commit | 5045281e17d7f90e1f31b7bf9ffdea9b59b99373 (patch) | |
tree | 31e5a30c9fee25a464765ed69309fa0f13dc3b06 /source3/rpc_client | |
parent | f8afaa76f225e4e7a477a59fa0a4b8f040afb2b6 (diff) | |
download | samba-5045281e17d7f90e1f31b7bf9ffdea9b59b99373.tar.gz samba-5045281e17d7f90e1f31b7bf9ffdea9b59b99373.tar.xz samba-5045281e17d7f90e1f31b7bf9ffdea9b59b99373.zip |
s3-rpc_client: Close policy handles before creating defaults.
We reopen the hive and key so close them before reopen.
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_winreg_spoolss.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c index ebdd419a65..e3d8a3d205 100644 --- 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; |