#include "squid.h"
#include "util.h"
#include "auth/digest/LDAP/ldap_backend.h"
#include <lber.h>
#include <ldap.h>
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 const char * | frealm = "" |
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 | 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 |
Definition at line 199 of file ldap_backend.cc.
References debug(), delimiter, encrpass, ld, ldap_escape_value(), ldapconnect(), noreferrals, passattr, PROGRAM_NAME, searchscope, userbasedn, userdnattr, usersearchfilter, and xstrdup.
Referenced by LDAPHHA1().
◆ ldap_escape_value()
◆ LDAPArguments()
Definition at line 399 of file ldap_backend.cc.
References aliasderef, binddn, bindpasswd, connect_timeout, debug_enabled, delimiter, encrpass, frealm, ldapServer, noreferrals, passattr, persistent, port, PROGRAM_NAME, readSecret(), searchscope, strip_nt_domain, timelimit, use_tls, userbasedn, userdnattr, usersearchfilter, version, xmalloc, and xstrdup.
◆ ldapconnect()
|
static |
Definition at line 306 of file ldap_backend.cc.
References aliasderef, binddn, bindpasswd, connect_timeout, debug(), ld, ldapServer, noreferrals, NULL, port, PROGRAM_NAME, squid_ldap_set_aliasderef(), squid_ldap_set_connect_timeout(), squid_ldap_set_referrals(), squid_ldap_set_timelimit(), timelimit, use_tls, and version.
Referenced by getpassword(), and LDAPHHA1().
◆ LDAPHHA1()
void LDAPHHA1 | ( | RequestData * | requestData | ) |
Definition at line 650 of file ldap_backend.cc.
References delimiter, DigestCalcHA1(), encrpass, _request_data::error, frealm, getpassword(), _request_data::HHA1, ldapconnect(), _request_data::realm, _request_data::user, and xstrncpy().
◆ readSecret()
|
static |
Definition at line 619 of file ldap_backend.cc.
References bindpasswd, BUFSIZ, PROGRAM_NAME, and xstrdup.
Referenced by LDAPArguments().
◆ squid_ldap_errno()
|
static |
Definition at line 125 of file ldap_backend.cc.
References ld.
◆ squid_ldap_memfree()
|
static |
Definition at line 153 of file ldap_backend.cc.
◆ squid_ldap_set_aliasderef()
|
static |
◆ squid_ldap_set_connect_timeout()
|
static |
Definition at line 148 of file ldap_backend.cc.
Referenced by ldapconnect().
◆ squid_ldap_set_referrals()
|
static |
◆ squid_ldap_set_timelimit()
|
static |
Variable Documentation
◆ aliasderef
|
static |
Definition at line 73 of file ldap_backend.cc.
Referenced by LDAPArguments(), and ldapconnect().
◆ binddn
|
static |
Definition at line 63 of file ldap_backend.cc.
Referenced by LDAPArguments(), and ldapconnect().
◆ bindpasswd
|
static |
Definition at line 64 of file ldap_backend.cc.
Referenced by LDAPArguments(), ldapconnect(), and readSecret().
◆ connect_timeout
|
static |
Definition at line 78 of file ldap_backend.cc.
Referenced by LDAPArguments(), and ldapconnect().
◆ delimiter
|
static |
Definition at line 65 of file ldap_backend.cc.
Referenced by getpassword(), LDAPArguments(), and LDAPHHA1().
◆ encrpass
|
static |
Definition at line 67 of file ldap_backend.cc.
Referenced by getpassword(), LDAPArguments(), and LDAPHHA1().
◆ frealm
|
static |
Definition at line 66 of file ldap_backend.cc.
Referenced by LDAPArguments(), and LDAPHHA1().
◆ ld
|
static |
Definition at line 57 of file ldap_backend.cc.
Referenced by getpassword(), ldapconnect(), squid_ldap_errno(), squid_ldap_set_aliasderef(), squid_ldap_set_referrals(), and squid_ldap_set_timelimit().
◆ ldapServer
|
static |
Definition at line 59 of file ldap_backend.cc.
Referenced by LDAPArguments(), and ldapconnect().
◆ noreferrals
|
static |
Definition at line 70 of file ldap_backend.cc.
Referenced by getpassword(), LDAPArguments(), and ldapconnect().
◆ passattr
|
static |
Definition at line 58 of file ldap_backend.cc.
Referenced by getpassword(), and LDAPArguments().
◆ persistent
|
static |
Definition at line 69 of file ldap_backend.cc.
Referenced by LDAPArguments().
◆ port
|
static |
Definition at line 71 of file ldap_backend.cc.
Referenced by LDAPArguments(), and ldapconnect().
◆ searchscope
|
static |
Definition at line 68 of file ldap_backend.cc.
Referenced by getpassword(), and LDAPArguments().
◆ strip_nt_domain
|
static |
Definition at line 72 of file ldap_backend.cc.
Referenced by LDAPArguments().
◆ timelimit
|
static |
Definition at line 79 of file ldap_backend.cc.
Referenced by LDAPArguments(), and ldapconnect().
◆ userbasedn
|
static |
Definition at line 60 of file ldap_backend.cc.
Referenced by getpassword(), and LDAPArguments().
◆ userdnattr
|
static |
Definition at line 61 of file ldap_backend.cc.
Referenced by getpassword(), and LDAPArguments().
◆ usersearchfilter
|
static |
Definition at line 62 of file ldap_backend.cc.
Referenced by getpassword(), and LDAPArguments().