s4:s3compat Improve debug messages in auth_ntlmssp replacement
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 11:17:45 +0000 (21:17 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 12:34:23 +0000 (22:34 +1000)
source4/s3compat/auth_ntlmssp.c

index 0940c9885fffe1ecea18cc21d2057b0c6a109997..4929d50af1c5a91d8447f848274b9d033e085cb2 100644 (file)
@@ -42,9 +42,9 @@ NTSTATUS auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
 
        status = s3compat_gensec_session_info_info3(tmp_ctx, 
                                                    auth_ntlmssp_state->gensec_security, &info3);
-       DEBUG(1, ("s3compat_gensec_session_info_info3 returned %s\n", nt_errstr(status)));
        
        if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(1, ("s3compat_gensec_session_info_info3 returned %s\n", nt_errstr(status)));
                talloc_free(tmp_ctx);
                return status;
        }
@@ -55,8 +55,8 @@ NTSTATUS auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
                                        info3);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(tmp_ctx);
-               DEBUG(1, ("make_server_info_info3 failed: %s\n",
-                          nt_errstr(status)));
+               DEBUG(1, (__location__ "auth_ntlmssp_server_info: make_server_info_info3 for user %s\\%s failed: %s\n",
+                         info3->base.domain.string, info3->base.account_name.string, nt_errstr(status)));
                return status;
        }
        
@@ -64,7 +64,7 @@ NTSTATUS auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
        status = gensec_session_key(auth_ntlmssp_state->gensec_security, &session_key);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(tmp_ctx);
-               DEBUG(1, ("gensec_session_key failed: %s\n",
+               DEBUG(1, (__location__ "auth_ntlmssp_server_info: gensec_session_key failed: %s\n",
                           nt_errstr(status)));
                return status;
        }