mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3-rpc_client: Close policy handles before creating defaults.
We reopen the hive and key so close them before reopen.
This commit is contained in:
parent
f8afaa76f2
commit
5045281e17
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user