#include "squid.h"
#include "base64.h"
#include "helper/protocol_defines.h"
#include "ntlmauth/ntlmauth.h"
#include "ntlmauth/support_bits.cci"
#include "sspi/sspwin32.h"
#include "util.h"
#include <cctype>
#include <lm.h>
![](ntlm__sspi__auth_8cc__incl.png)
Go to the source code of this file.
Macros | |
#define | FAIL_DEBUG 0 |
Functions | |
static int | Valid_Group (char *UserName, char *Group) |
static NtlmError | ntlm_check_auth (ntlm_authenticate *auth, char *user, char *domain, int auth_length) |
static void | helperfail (const char *reason) |
static void | usage () |
static void | process_options (int argc, char *argv[]) |
static bool | token_decode (size_t *decodedLen, uint8_t decoded[], const char *buf) |
static int | manage_request () |
int | main (int argc, char *argv[]) |
Variables | |
int | NTLM_packet_debug_enabled = 0 |
static int | have_challenge |
char * | NTAllowedGroup |
char * | NTDisAllowedGroup |
int | UseDisallowedGroup = 0 |
int | UseAllowedGroup = 0 |
char * | my_program_name = nullptr |
Macro Definition Documentation
◆ FAIL_DEBUG
#define FAIL_DEBUG 0 |
Definition at line 68 of file ntlm_sspi_auth.cc.
Function Documentation
◆ helperfail()
|
static |
Definition at line 229 of file ntlm_sspi_auth.cc.
References SEND_BH.
Referenced by manage_request().
◆ main()
Definition at line 520 of file ntlm_sspi_auth.cc.
References debug(), LoadSecurityDll(), manage_request(), my_program_name, NTLM_PACKAGE_NAME, NULL, process_options(), SSP_NTLM, UnloadSecurityDll(), and VERSION.
◆ manage_request()
|
static |
Definition at line 315 of file ntlm_sspi_auth.cc.
References BadNtGroup, BadRequest, debug(), _ntlm_negotiate::flags, have_challenge, _ntlm_negotiate::hdr, HELPER_INPUT_BUFFER, helperfail(), hex_dump(), lc(), le32toh, None, NTLM_ANY, NTLM_AUTHENTICATE, NTLM_CHALLENGE, ntlm_check_auth(), NTLM_NEGOTIATE, NTLM_NEGOTIATE_ALWAYS_SIGN, NTLM_NEGOTIATE_ASCII, NTLM_NEGOTIATE_USE_LM, NTLM_NEGOTIATE_USE_NTLM, NTLM_packet_debug_enabled, ntlm_validate_packet(), NULL, SEND_ERR, SEND_TT, _ntlmhdr::signature, SspiError, token_decode(), and _ntlmhdr::type.
Referenced by main().
◆ ntlm_check_auth()
|
static |
Definition at line 174 of file ntlm_sspi_auth.cc.
References BadNtGroup, BadRequest, credentials, debug(), None, NTAllowedGroup, NTDisAllowedGroup, ntlm_unpack_auth(), SspiError, UseAllowedGroup, UseDisallowedGroup, and Valid_Group().
Referenced by manage_request().
◆ process_options()
|
static |
Definition at line 260 of file ntlm_sspi_auth.cc.
References debug_enabled, getopt(), NTAllowedGroup, NTDisAllowedGroup, NTLM_packet_debug_enabled, optarg, opterr, optopt, safe_free, usage(), UseAllowedGroup, UseDisallowedGroup, and xstrdup.
Referenced by main().
◆ token_decode()
|
static |
Definition at line 301 of file ntlm_sspi_auth.cc.
References base64_decode_final(), base64_decode_init(), base64_decode_update(), and SEND_BH.
Referenced by manage_request().
◆ usage()
|
static |
Definition at line 247 of file ntlm_sspi_auth.cc.
References my_program_name.
Referenced by process_options().
◆ Valid_Group()
|
static |
Definition at line 101 of file ntlm_sspi_auth.cc.
References FALSE, NULL, and TRUE.
Referenced by ntlm_check_auth().
Variable Documentation
◆ have_challenge
|
static |
Definition at line 89 of file ntlm_sspi_auth.cc.
Referenced by manage_request().
◆ my_program_name
char* my_program_name = nullptr |
Definition at line 244 of file ntlm_sspi_auth.cc.
◆ NTAllowedGroup
char* NTAllowedGroup |
Definition at line 90 of file ntlm_sspi_auth.cc.
Referenced by ntlm_check_auth(), and process_options().
◆ NTDisAllowedGroup
char* NTDisAllowedGroup |
Definition at line 91 of file ntlm_sspi_auth.cc.
Referenced by ntlm_check_auth(), and process_options().
◆ NTLM_packet_debug_enabled
int NTLM_packet_debug_enabled = 0 |
Definition at line 88 of file ntlm_sspi_auth.cc.
Referenced by manage_request(), and process_options().
◆ UseAllowedGroup
int UseAllowedGroup = 0 |
Definition at line 93 of file ntlm_sspi_auth.cc.
Referenced by ntlm_check_auth(), and process_options().
◆ UseDisallowedGroup
int UseDisallowedGroup = 0 |
Definition at line 92 of file ntlm_sspi_auth.cc.
Referenced by ntlm_check_auth(), and process_options().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products