s3:ntlmssp Don't use talloc_tos() for NTLMSSP blobs for now
authorAndrew Bartlett <abartlet@samba.org>
Fri, 6 Aug 2010 10:41:54 +0000 (20:41 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 9 Aug 2010 06:30:43 +0000 (16:30 +1000)
This code will, I hope, soon be merged in common, and the Samba4
use case does not currently support talloc_tos() properly.  Use another
context for now.

Andrew Bartlett

source3/libsmb/ntlmssp.c

index 1157ef9d1558f6a854647be0f13e09fac3588bf0..ffd8f5e3fb51e3b1548d8f81595ea05b98f066c2 100644 (file)
@@ -416,7 +416,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
 
                if (DEBUGLEVEL >= 10) {
                        struct CHALLENGE_MESSAGE *challenge = talloc(
-                               talloc_tos(), struct CHALLENGE_MESSAGE);
+                               ntlmssp_state, struct CHALLENGE_MESSAGE);
                        if (challenge != NULL) {
                                challenge->NegotiateFlags = chal_flags;
                                status = ntlmssp_pull_CHALLENGE_MESSAGE(
@@ -524,7 +524,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
 
        if (DEBUGLEVEL >= 10) {
                struct AUTHENTICATE_MESSAGE *authenticate = talloc(
-                       talloc_tos(), struct AUTHENTICATE_MESSAGE);
+                       ntlmssp_state, struct AUTHENTICATE_MESSAGE);
                if (authenticate != NULL) {
                        NTSTATUS status;
                        authenticate->NegotiateFlags = auth_flags;