s3: not use as-needed by default and auto use if enable-developer is active
[Samba/ita.git] / libcli / auth / ntlmssp.c
blob1be764ec428f66d158e61e8fcfd0e0866f416334
1 /*
2 Unix SMB/Netbios implementation.
3 Version 3.0
4 handle NLTMSSP, server side
6 Copyright (C) Andrew Tridgell 2001
7 Copyright (C) Andrew Bartlett 2001-2003
8 Copyright (C) Andrew Bartlett 2005 (Updated from gensec).
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #include "includes.h"
25 #include "../libcli/auth/ntlmssp.h"
26 #include "../libcli/auth/ntlmssp_private.h"
28 /**
29 * Print out the NTLMSSP flags for debugging
30 * @param neg_flags The flags from the packet
32 void debug_ntlmssp_flags(uint32_t neg_flags)
34 DEBUG(3,("Got NTLMSSP neg_flags=0x%08x\n", neg_flags));
36 if (neg_flags & NTLMSSP_NEGOTIATE_UNICODE)
37 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_UNICODE\n"));
38 if (neg_flags & NTLMSSP_NEGOTIATE_OEM)
39 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_OEM\n"));
40 if (neg_flags & NTLMSSP_REQUEST_TARGET)
41 DEBUGADD(4, (" NTLMSSP_REQUEST_TARGET\n"));
42 if (neg_flags & NTLMSSP_NEGOTIATE_SIGN)
43 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_SIGN\n"));
44 if (neg_flags & NTLMSSP_NEGOTIATE_SEAL)
45 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_SEAL\n"));
46 if (neg_flags & NTLMSSP_NEGOTIATE_DATAGRAM)
47 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_DATAGRAM\n"));
48 if (neg_flags & NTLMSSP_NEGOTIATE_LM_KEY)
49 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_LM_KEY\n"));
50 if (neg_flags & NTLMSSP_NEGOTIATE_NETWARE)
51 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_NETWARE\n"));
52 if (neg_flags & NTLMSSP_NEGOTIATE_NTLM)
53 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_NTLM\n"));
54 if (neg_flags & NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED)
55 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED\n"));
56 if (neg_flags & NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED)
57 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED\n"));
58 if (neg_flags & NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL)
59 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL\n"));
60 if (neg_flags & NTLMSSP_NEGOTIATE_ALWAYS_SIGN)
61 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_ALWAYS_SIGN\n"));
62 if (neg_flags & NTLMSSP_REQUEST_NON_NT_SESSION_KEY)
63 DEBUGADD(4, (" NTLMSSP_REQUEST_NON_NT_SESSION_KEY\n"));
64 if (neg_flags & NTLMSSP_NEGOTIATE_NTLM2)
65 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_NTLM2\n"));
66 if (neg_flags & NTLMSSP_NEGOTIATE_TARGET_INFO)
67 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_TARGET_INFO\n"));
68 if (neg_flags & NTLMSSP_NEGOTIATE_VERSION)
69 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_VERSION\n"));
70 if (neg_flags & NTLMSSP_NEGOTIATE_128)
71 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_128\n"));
72 if (neg_flags & NTLMSSP_NEGOTIATE_KEY_EXCH)
73 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_KEY_EXCH\n"));
74 if (neg_flags & NTLMSSP_NEGOTIATE_56)
75 DEBUGADD(4, (" NTLMSSP_NEGOTIATE_56\n"));