ldap_backend.cc File Reference
#include "squid.h"
#include <cstdio>
#include "auth/digest/eDirectory/ldap_backend.h"
#include <lber.h>
#include <ldap.h>
#include "auth/digest/eDirectory/edir_ldapext.h"
Include dependency graph for ldap_backend.cc:

Go to the source code of this file.

Macros

#define LDAP_DEPRECATED   1
 
#define PROGRAM_NAME   "digest_pw_auth(LDAP_backend)"
 

Functions

static void ldapconnect (void)
 
static int readSecret (const char *filename)
 
static int squid_ldap_errno (LDAP *ld)
 
static void squid_ldap_set_aliasderef (int deref)
 
static void squid_ldap_set_referrals (int referrals)
 
static void squid_ldap_set_timelimit (int aTimeLimit)
 
static void squid_ldap_set_connect_timeout (int aTimeLimit)
 
static void squid_ldap_memfree (char *p)
 
static int ldap_escape_value (char *escaped, int size, const char *src)
 
static char * getpassword (char *login, char *realm)
 
int LDAPArguments (int argc, char **argv)
 
void LDAPHHA1 (RequestData *requestData)
 

Variables

static LDAP * ld = nullptr
 
static const char * passattr = nullptr
 
static char * ldapServer = nullptr
 
static const char * userbasedn = nullptr
 
static const char * userdnattr = nullptr
 
static const char * usersearchfilter = nullptr
 
static const char * binddn = nullptr
 
static const char * bindpasswd = nullptr
 
static const char * delimiter = ":"
 
static int encrpass = 0
 
static int searchscope = LDAP_SCOPE_SUBTREE
 
static int persistent = 0
 
static int noreferrals = 0
 
static int port = LDAP_PORT
 
static int strip_nt_domain = 0
 
static int edir_universal_passwd = 0
 
static int aliasderef = LDAP_DEREF_NEVER
 
static int connect_timeout = 0
 
static int timelimit = LDAP_NO_LIMIT
 

Macro Definition Documentation

◆ LDAP_DEPRECATED

#define LDAP_DEPRECATED   1

Definition at line 16 of file ldap_backend.cc.

◆ PROGRAM_NAME

#define PROGRAM_NAME   "digest_pw_auth(LDAP_backend)"

Definition at line 53 of file ldap_backend.cc.

Function Documentation

◆ getpassword()

static char * getpassword ( char *  login,
char *  realm 
)
static

◆ ldap_escape_value()

static int ldap_escape_value ( char *  escaped,
int  size,
const char *  src 
)
static

Definition at line 167 of file ldap_backend.cc.

References size.

Referenced by getpassword().

◆ LDAPArguments()

◆ ldapconnect()

◆ LDAPHHA1()

◆ readSecret()

static int readSecret ( const char *  filename)
static

Definition at line 648 of file ldap_backend.cc.

References bindpasswd, BUFSIZ, PROGRAM_NAME, and xstrdup.

Referenced by LDAPArguments().

◆ squid_ldap_errno()

static int squid_ldap_errno ( LDAP *  ld)
static

Definition at line 125 of file ldap_backend.cc.

References ld.

◆ squid_ldap_memfree()

static void squid_ldap_memfree ( char *  p)
static

Definition at line 153 of file ldap_backend.cc.

◆ squid_ldap_set_aliasderef()

static void squid_ldap_set_aliasderef ( int  deref)
static

Definition at line 130 of file ldap_backend.cc.

References ld.

Referenced by ldapconnect().

◆ squid_ldap_set_connect_timeout()

static void squid_ldap_set_connect_timeout ( int  aTimeLimit)
static

Definition at line 148 of file ldap_backend.cc.

Referenced by ldapconnect().

◆ squid_ldap_set_referrals()

static void squid_ldap_set_referrals ( int  referrals)
static

Definition at line 135 of file ldap_backend.cc.

References ld.

Referenced by ldapconnect().

◆ squid_ldap_set_timelimit()

static void squid_ldap_set_timelimit ( int  aTimeLimit)
static

Definition at line 143 of file ldap_backend.cc.

References ld.

Referenced by ldapconnect().

Variable Documentation

◆ aliasderef

int aliasderef = LDAP_DEREF_NEVER
static

Definition at line 73 of file ldap_backend.cc.

Referenced by LDAPArguments(), and ldapconnect().

◆ binddn

const char* binddn = nullptr
static

Definition at line 63 of file ldap_backend.cc.

Referenced by LDAPArguments(), and ldapconnect().

◆ bindpasswd

const char* bindpasswd = nullptr
static

Definition at line 64 of file ldap_backend.cc.

Referenced by LDAPArguments(), ldapconnect(), and readSecret().

◆ connect_timeout

int connect_timeout = 0
static

Definition at line 78 of file ldap_backend.cc.

Referenced by LDAPArguments(), and ldapconnect().

◆ delimiter

const char* delimiter = ":"
static

◆ edir_universal_passwd

int edir_universal_passwd = 0
static

Definition at line 72 of file ldap_backend.cc.

Referenced by getpassword(), and LDAPArguments().

◆ encrpass

int encrpass = 0
static

Definition at line 66 of file ldap_backend.cc.

Referenced by getpassword(), LDAPArguments(), and LDAPHHA1().

◆ ld

◆ ldapServer

char* ldapServer = nullptr
static

Definition at line 59 of file ldap_backend.cc.

Referenced by checkLDAP(), LDAPArguments(), ldapconnect(), main(), and open_ldap_connection().

◆ noreferrals

int noreferrals = 0
static

Definition at line 69 of file ldap_backend.cc.

Referenced by getpassword(), LDAPArguments(), and ldapconnect().

◆ passattr

const char* passattr = nullptr
static

Definition at line 58 of file ldap_backend.cc.

Referenced by getpassword(), and LDAPArguments().

◆ persistent

int persistent = 0
static

Definition at line 68 of file ldap_backend.cc.

Referenced by LDAPArguments().

◆ port

◆ searchscope

int searchscope = LDAP_SCOPE_SUBTREE
static

Definition at line 67 of file ldap_backend.cc.

Referenced by getpassword(), and LDAPArguments().

◆ strip_nt_domain

int strip_nt_domain = 0
static

Definition at line 71 of file ldap_backend.cc.

Referenced by LDAPArguments(), and main().

◆ timelimit

int timelimit = LDAP_NO_LIMIT
static

Definition at line 79 of file ldap_backend.cc.

Referenced by LDAPArguments(), and ldapconnect().

◆ userbasedn

const char* userbasedn = nullptr
static

Definition at line 60 of file ldap_backend.cc.

Referenced by getpassword(), and LDAPArguments().

◆ userdnattr

const char* userdnattr = nullptr
static

Definition at line 61 of file ldap_backend.cc.

Referenced by getpassword(), and LDAPArguments().

◆ usersearchfilter

const char* usersearchfilter = nullptr
static

Definition at line 62 of file ldap_backend.cc.

Referenced by getpassword(), and LDAPArguments().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors