mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3:winbind: Simplify open_cached_internal_pipe_conn()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15046 Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
e1f29b0970
commit
91395e660a
@ -150,9 +150,10 @@ static NTSTATUS open_cached_internal_pipe_conn(
|
|||||||
struct rpc_pipe_client **lsa_pipe,
|
struct rpc_pipe_client **lsa_pipe,
|
||||||
struct policy_handle *lsa_hnd)
|
struct policy_handle *lsa_hnd)
|
||||||
{
|
{
|
||||||
struct winbind_internal_pipes *internal_pipes = NULL;
|
struct winbind_internal_pipes *internal_pipes =
|
||||||
|
domain->backend_data.samr_pipes;
|
||||||
|
|
||||||
if (domain->backend_data.samr_pipes == NULL) {
|
if (internal_pipes == NULL) {
|
||||||
TALLOC_CTX *frame = talloc_stackframe();
|
TALLOC_CTX *frame = talloc_stackframe();
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
@ -190,14 +191,11 @@ static NTSTATUS open_cached_internal_pipe_conn(
|
|||||||
}
|
}
|
||||||
|
|
||||||
domain->backend_data.samr_pipes =
|
domain->backend_data.samr_pipes =
|
||||||
talloc_move(domain, &internal_pipes);
|
talloc_steal(domain, internal_pipes);
|
||||||
|
|
||||||
TALLOC_FREE(frame);
|
TALLOC_FREE(frame);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal_pipes = domain->backend_data.samr_pipes;
|
|
||||||
|
|
||||||
if (samr_domain_hnd) {
|
if (samr_domain_hnd) {
|
||||||
*samr_domain_hnd = internal_pipes->samr_domain_hnd;
|
*samr_domain_hnd = internal_pipes->samr_domain_hnd;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user