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)
committerGünther Deschner <gd@samba.org>
Tue, 10 Aug 2010 10:13:00 +0000 (12:13 +0200)
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

Signed-off-by: Günther Deschner <gd@samba.org>
source3/libsmb/ntlmssp.c

index 2fdc938f49e9c1ba3aad25ba5cd9d8b68d4d498f..920bf94df8e38b1beb453411fd71b3f25a476d78 100644 (file)
@@ -416,7 +416,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
 
                if (DEBUGLEVEL >= 10) {
                        struct CHALLENGE_MESSAGE *challenge = talloc(
 
                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(
                        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(
 
        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;
                if (authenticate != NULL) {
                        NTSTATUS status;
                        authenticate->NegotiateFlags = auth_flags;