s3-dcerpc: avoid talloc_move on schannel creds in cli_rpc_pipe_open_schannel_with_key().
commit99cb69fca3d8374df3a85ec76180fc4e6acb15f8
authorGünther Deschner <gd@samba.org>
Mon, 23 Aug 2010 14:02:23 +0000 (23 16:02 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 27 Sep 2010 19:29:01 +0000 (27 21:29 +0200)
treec822dfc48486db835939aa7d02e047d692930cad
parent1c1eb9a2bb622a041891c65abc62e72b7782d77f
s3-dcerpc: avoid talloc_move on schannel creds in cli_rpc_pipe_open_schannel_with_key().

Initially, the schannel creds were talloc memduped, then, during the netlogon
creds client merge (baf7274fed2f1ae7a9e3a57160bf5471566e636c) they were first
talloc_referenced and then later (53765c81f726a8c056cc4e57004592dd489975c9)
talloc_moved.

The issue with using talloc_move here is that users of that function in winbind
will only be able to have two schanneled connections, as the cached schannel
credentials pointer from the netlogon pipe will be set to NULL. Do a deep copy
of the struct instead.

Guenther
(cherry picked from commit 898c6123355a3a11ec17f0396c4cb3018c75c184)
(cherry picked from commit 68e83f9fedf0a0f0fa412d3ecec8ee853bf82bac)
libcli/auth/credentials.c
libcli/auth/proto.h
source3/rpc_client/cli_pipe.c