ntlm_sspi_auth.cc File Reference
#include "squid.h"
#include "base64.h"
#include "helper/protocol_defines.h"
#include "ntlmauth/ntlmauth.h"
#include "ntlmauth/support_bits.cci"
#include "sspwin32.h"
#include "util.h"
#include <windows.h>
#include <sspi.h>
#include <security.h>
#include <lm.h>
#include <ntsecapi.h>
Include dependency graph for ntlm_sspi_auth.cc:

Go to the source code of this file.

Macros

#define FAIL_DEBUG   0
 

Functions

int Valid_Group (char *UserName, char *Group)
 
char * AllocStrFromLSAStr (LSA_UNICODE_STRING LsaStr)
 
char * GetDomainName (void)
 
int ntlm_check_auth (ntlm_authenticate *auth, char *user, char *domain, int auth_length)
 
void helperfail (const char *reason)
 
void usage ()
 
void process_options (int argc, char *argv[])
 
static bool token_decode (size_t *decodedLen, uint8_t decoded[], const char *buf)
 
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 = NULL
 

Macro Definition Documentation

◆ FAIL_DEBUG

#define FAIL_DEBUG   0

Definition at line 68 of file ntlm_sspi_auth.cc.

Function Documentation

◆ AllocStrFromLSAStr()

char* AllocStrFromLSAStr ( LSA_UNICODE_STRING  LsaStr)

Definition at line 173 of file ntlm_sspi_auth.cc.

References len, NULL, safe_free, and xmalloc.

Referenced by GetDomainName().

◆ GetDomainName()

char* GetDomainName ( void  )

Definition at line 194 of file ntlm_sspi_auth.cc.

References AllocStrFromLSAStr(), debug, and NULL.

◆ helperfail()

void helperfail ( const char *  reason)

Definition at line 345 of file ntlm_sspi_auth.cc.

References SEND_BH.

Referenced by manage_request().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ manage_request()

◆ ntlm_check_auth()

◆ process_options()

void process_options ( int  argc,
char *  argv[] 
)

◆ token_decode()

static bool token_decode ( size_t decodedLen,
uint8_t  decoded[],
const char *  buf 
)
static

◆ usage()

void usage ( void  )

Definition at line 363 of file ntlm_sspi_auth.cc.

References my_program_name.

Referenced by process_options().

◆ Valid_Group()

int Valid_Group ( char *  UserName,
char *  Group 
)

Definition at line 107 of file ntlm_sspi_auth.cc.

References FALSE, i, NULL, and TRUE.

Referenced by ntlm_check_auth().

Variable Documentation

◆ have_challenge

int have_challenge
static

Definition at line 95 of file ntlm_sspi_auth.cc.

Referenced by manage_request().

◆ my_program_name

char* my_program_name = NULL

Definition at line 360 of file ntlm_sspi_auth.cc.

Referenced by main(), and usage().

◆ NTAllowedGroup

char* NTAllowedGroup

Definition at line 96 of file ntlm_sspi_auth.cc.

Referenced by ntlm_check_auth(), and process_options().

◆ NTDisAllowedGroup

char* NTDisAllowedGroup

Definition at line 97 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 94 of file ntlm_sspi_auth.cc.

Referenced by manage_request(), and process_options().

◆ UseAllowedGroup

int UseAllowedGroup = 0

Definition at line 99 of file ntlm_sspi_auth.cc.

Referenced by ntlm_check_auth(), and process_options().

◆ UseDisallowedGroup

int UseDisallowedGroup = 0

Definition at line 98 of file ntlm_sspi_auth.cc.

Referenced by ntlm_check_auth(), and process_options().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors