#include "squid.h"
#include "helper/protocol_defines.h"
#include "rfc1738.h"
#include "util.h"
#include <cctype>
#include <cerrno>
#include <csignal>
#include <cstdlib>
#include <cstring>
#include <ctime>
Go to the source code of this file.
Classes | |
struct | edui_conf_t |
struct | edui_ldap_t |
Macros | |
#define | EDUI_PROGRAM_NAME "ext_edirectory_userip_acl" |
#define | EDUI_PROGRAM_VERSION "2.1" |
#define | _GNU_SOURCE |
#define | __USE_GNU |
#define | LDAP_DEPRECATED 1 /* Set flag for enabling classic ldap functions */ |
#define | EDUI_MAXLEN 4096 /* Modified to improve performance, unless HELPER_INPUT_BUFFER exists */ |
#define | USE_LDAP_INIT |
#define | NETSCAPE_SSL |
#define | LDAP_AUTH_TLS ((ber_tag_t) 0xb3U) |
#define | EDUI_MODE_INIT 0x01 |
#define | EDUI_MODE_DEBUG 0x02 /* Replace with Squid's debug system */ |
#define | EDUI_MODE_TLS 0x04 |
#define | EDUI_MODE_IPV4 0x08 |
#define | EDUI_MODE_IPV6 0x10 |
#define | EDUI_MODE_GROUP 0x20 /* Group is REQUIRED */ |
#define | EDUI_MODE_PERSIST 0x40 /* Persistent LDAP connections */ |
#define | EDUI_MODE_KILL 0x80 |
#define | LDAP_INIT_S 0x0001 |
#define | LDAP_OPEN_S 0x0002 |
#define | LDAP_BIND_S 0x0004 |
#define | LDAP_SEARCH_S 0x0008 /* We got data */ |
#define | LDAP_VAL_S 0x0010 /* Data has been copied to l->val */ |
#define | LDAP_CLOSE_S 0x0020 |
#define | LDAP_PERSIST_S 0x0040 /* Persistent connection */ |
#define | LDAP_IDLE_S 0x0080 /* Connection is idle */ |
#define | LDAP_SSL_S 0x0100 |
#define | LDAP_TLS_S 0x0200 |
#define | LDAP_IPV4_S 0x0400 /* Search IP is IPv4 */ |
#define | LDAP_IPV6_S 0x0800 /* Search IP is IPv6 */ |
#define | LDAP_ERR_NULL -1 /* Null edui_ldap_t pointer */ |
#define | LDAP_ERR_POINTER -2 /* Null l->lp pointer */ |
#define | LDAP_ERR_PARAM -3 /* Null or Missing parameters */ |
#define | LDAP_ERR_INIT -4 /* Not initialized */ |
#define | LDAP_ERR_OPEN -5 /* Not open */ |
#define | LDAP_ERR_CONNECT -6 /* Unable to connect */ |
#define | LDAP_ERR_BIND -7 /* Not bound */ |
#define | LDAP_ERR_SEARCHED -8 /* Already Searched */ |
#define | LDAP_ERR_NOT_SEARCHED -9 /* Not searching */ |
#define | LDAP_ERR_INVALID -10 /* Invalid parameter */ |
#define | LDAP_ERR_OOB -11 /* Out of bounds value */ |
#define | LDAP_ERR_PERSIST -12 /* Persistent mode is not active */ |
#define | LDAP_ERR_DATA -13 /* Required data missing */ |
#define | LDAP_ERR_NOTFOUND -14 /* Item not found */ |
#define | LDAP_ERR_OTHER -15 /* Other Generic Error condition */ |
#define | LDAP_ERR_FAILED -16 /* Operation failed */ |
#define | LDAP_ERR_SUCCESS -17 /* Operation successful */ |
Functions | |
static void | local_printfx (const char *,...) |
static int | StringSplit (char *, char, char *, size_t) |
static int | BinarySplit (void *, size_t, char, void *, size_t) |
static void | DisplayVersion () |
static void | DisplayUsage () |
static void | InitConf () |
static void | DisplayConf () |
static void | InitLDAP (edui_ldap_t *) |
static int | OpenLDAP (edui_ldap_t *, char *, unsigned int) |
static int | CloseLDAP (edui_ldap_t *) |
static int | SetVerLDAP (edui_ldap_t *, int) |
static int | BindLDAP (edui_ldap_t *, char *, char *, unsigned int) |
static int | ConvertIP (edui_ldap_t *, char *) |
static int | ResetLDAP (edui_ldap_t *) |
static int | SearchFilterLDAP (edui_ldap_t *, char *) |
static int | SearchLDAP (edui_ldap_t *, int, char *, char **) |
static int | SearchIPLDAP (edui_ldap_t *) |
const char * | ErrLDAP (int) |
void | SigTrap (int) |
static struct addrinfo * | makeIpBinary (const char *src) |
static int | makeHexString (char *dst, const int dstSize, const char *src, const int srcLen) |
static int | MainSafe (int argc, char **argv) |
int | main (int argc, char **argv) |
Variables | |
const char * | search_attrib [] = { "cn", "uid", "networkAddress", "groupMembership", nullptr } |
static edui_conf_t | edui_conf |
static edui_ldap_t | edui_ldap |
time_t | edui_now |
time_t | edui_elap |
Macro Definition Documentation
◆ __USE_GNU
#define __USE_GNU |
Definition at line 51 of file ext_edirectory_userip_acl.cc.
◆ _GNU_SOURCE
#define _GNU_SOURCE |
Definition at line 48 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MAXLEN
#define EDUI_MAXLEN 4096 /* Modified to improve performance, unless HELPER_INPUT_BUFFER exists */ |
Definition at line 82 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_DEBUG
#define EDUI_MODE_DEBUG 0x02 /* Replace with Squid's debug system */ |
Definition at line 102 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_GROUP
#define EDUI_MODE_GROUP 0x20 /* Group is REQUIRED */ |
Definition at line 106 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_INIT
#define EDUI_MODE_INIT 0x01 |
Definition at line 101 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_IPV4
#define EDUI_MODE_IPV4 0x08 |
Definition at line 104 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_IPV6
#define EDUI_MODE_IPV6 0x10 |
Definition at line 105 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_KILL
#define EDUI_MODE_KILL 0x80 |
Definition at line 108 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_PERSIST
#define EDUI_MODE_PERSIST 0x40 /* Persistent LDAP connections */ |
Definition at line 107 of file ext_edirectory_userip_acl.cc.
◆ EDUI_MODE_TLS
#define EDUI_MODE_TLS 0x04 |
Definition at line 103 of file ext_edirectory_userip_acl.cc.
◆ EDUI_PROGRAM_NAME
#define EDUI_PROGRAM_NAME "ext_edirectory_userip_acl" |
Definition at line 43 of file ext_edirectory_userip_acl.cc.
◆ EDUI_PROGRAM_VERSION
#define EDUI_PROGRAM_VERSION "2.1" |
Definition at line 44 of file ext_edirectory_userip_acl.cc.
◆ LDAP_AUTH_TLS
#define LDAP_AUTH_TLS ((ber_tag_t) 0xb3U) |
Definition at line 96 of file ext_edirectory_userip_acl.cc.
◆ LDAP_BIND_S
#define LDAP_BIND_S 0x0004 |
Definition at line 129 of file ext_edirectory_userip_acl.cc.
◆ LDAP_CLOSE_S
#define LDAP_CLOSE_S 0x0020 |
Definition at line 132 of file ext_edirectory_userip_acl.cc.
◆ LDAP_DEPRECATED
#define LDAP_DEPRECATED 1 /* Set flag for enabling classic ldap functions */ |
Definition at line 62 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_BIND
#define LDAP_ERR_BIND -7 /* Not bound */ |
Definition at line 147 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_CONNECT
#define LDAP_ERR_CONNECT -6 /* Unable to connect */ |
Definition at line 146 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_DATA
#define LDAP_ERR_DATA -13 /* Required data missing */ |
Definition at line 153 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_FAILED
#define LDAP_ERR_FAILED -16 /* Operation failed */ |
Definition at line 156 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_INIT
#define LDAP_ERR_INIT -4 /* Not initialized */ |
Definition at line 144 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_INVALID
#define LDAP_ERR_INVALID -10 /* Invalid parameter */ |
Definition at line 150 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_NOT_SEARCHED
#define LDAP_ERR_NOT_SEARCHED -9 /* Not searching */ |
Definition at line 149 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_NOTFOUND
#define LDAP_ERR_NOTFOUND -14 /* Item not found */ |
Definition at line 154 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_NULL
#define LDAP_ERR_NULL -1 /* Null edui_ldap_t pointer */ |
Definition at line 141 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_OOB
#define LDAP_ERR_OOB -11 /* Out of bounds value */ |
Definition at line 151 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_OPEN
#define LDAP_ERR_OPEN -5 /* Not open */ |
Definition at line 145 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_OTHER
#define LDAP_ERR_OTHER -15 /* Other Generic Error condition */ |
Definition at line 155 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_PARAM
#define LDAP_ERR_PARAM -3 /* Null or Missing parameters */ |
Definition at line 143 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_PERSIST
#define LDAP_ERR_PERSIST -12 /* Persistent mode is not active */ |
Definition at line 152 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_POINTER
#define LDAP_ERR_POINTER -2 /* Null l->lp pointer */ |
Definition at line 142 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_SEARCHED
#define LDAP_ERR_SEARCHED -8 /* Already Searched */ |
Definition at line 148 of file ext_edirectory_userip_acl.cc.
◆ LDAP_ERR_SUCCESS
#define LDAP_ERR_SUCCESS -17 /* Operation successful */ |
Definition at line 157 of file ext_edirectory_userip_acl.cc.
◆ LDAP_IDLE_S
#define LDAP_IDLE_S 0x0080 /* Connection is idle */ |
Definition at line 134 of file ext_edirectory_userip_acl.cc.
◆ LDAP_INIT_S
#define LDAP_INIT_S 0x0001 |
Definition at line 127 of file ext_edirectory_userip_acl.cc.
◆ LDAP_IPV4_S
#define LDAP_IPV4_S 0x0400 /* Search IP is IPv4 */ |
Definition at line 137 of file ext_edirectory_userip_acl.cc.
◆ LDAP_IPV6_S
#define LDAP_IPV6_S 0x0800 /* Search IP is IPv6 */ |
Definition at line 138 of file ext_edirectory_userip_acl.cc.
◆ LDAP_OPEN_S
#define LDAP_OPEN_S 0x0002 |
Definition at line 128 of file ext_edirectory_userip_acl.cc.
◆ LDAP_PERSIST_S
#define LDAP_PERSIST_S 0x0040 /* Persistent connection */ |
Definition at line 133 of file ext_edirectory_userip_acl.cc.
◆ LDAP_SEARCH_S
#define LDAP_SEARCH_S 0x0008 /* We got data */ |
Definition at line 130 of file ext_edirectory_userip_acl.cc.
◆ LDAP_SSL_S
#define LDAP_SSL_S 0x0100 |
Definition at line 135 of file ext_edirectory_userip_acl.cc.
◆ LDAP_TLS_S
#define LDAP_TLS_S 0x0200 |
Definition at line 136 of file ext_edirectory_userip_acl.cc.
◆ LDAP_VAL_S
#define LDAP_VAL_S 0x0010 /* Data has been copied to l->val */ |
Definition at line 131 of file ext_edirectory_userip_acl.cc.
◆ NETSCAPE_SSL
#define NETSCAPE_SSL |
Definition at line 88 of file ext_edirectory_userip_acl.cc.
◆ USE_LDAP_INIT
#define USE_LDAP_INIT |
Definition at line 86 of file ext_edirectory_userip_acl.cc.
Function Documentation
◆ BinarySplit()
|
static |
Definition at line 311 of file ext_edirectory_userip_acl.cc.
Referenced by SearchIPLDAP().
◆ BindLDAP()
|
static |
Definition at line 657 of file ext_edirectory_userip_acl.cc.
References edui_ldap_t::basedn, edui_ldap_t::dn, edui_ldap_t::err, LDAP_AUTH_TLS, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_FAILED, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OOB, LDAP_ERR_OPEN, LDAP_ERR_POINTER, LDAP_ERR_SUCCESS, LDAP_INIT_S, LDAP_OPEN_S, edui_ldap_t::lp, edui_ldap_t::passwd, edui_ldap_t::status, edui_ldap_t::type, and xstrncpy().
Referenced by MainSafe().
◆ CloseLDAP()
|
static |
Definition at line 593 of file ext_edirectory_userip_acl.cc.
References edui_ldap_t::err, edui_ldap_t::idle_time, LDAP_ERR_FAILED, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_SUCCESS, LDAP_INIT_S, LDAP_OPEN_S, edui_ldap_t::lm, edui_ldap_t::lp, edui_ldap_t::status, and edui_ldap_t::val.
Referenced by MainSafe(), and SigTrap().
◆ ConvertIP()
|
static |
Definition at line 799 of file ext_edirectory_userip_acl.cc.
References edui_conf, EDUI_MAXLEN, EDUI_MODE_IPV4, EDUI_MODE_IPV6, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_INIT, LDAP_ERR_INVALID, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_PARAM, LDAP_INIT_S, LDAP_IPV4_S, LDAP_IPV6_S, LDAP_OPEN_S, makeHexString(), makeIpBinary(), edui_conf_t::mode, edui_ldap_t::search_ip, and edui_ldap_t::status.
Referenced by MainSafe().
◆ DisplayConf()
|
static |
Definition at line 414 of file ext_edirectory_userip_acl.cc.
References edui_conf_t::attrib, edui_conf_t::basedn, DisplayVersion(), edui_conf_t::dn, edui_conf, EDUI_MAXLEN, EDUI_MODE_DEBUG, EDUI_MODE_GROUP, EDUI_MODE_IPV4, EDUI_MODE_IPV6, EDUI_MODE_PERSIST, EDUI_MODE_TLS, edui_conf_t::host, local_printfx(), edui_conf_t::mode, edui_conf_t::passwd, edui_conf_t::persist_timeout, edui_conf_t::port, edui_conf_t::scope, edui_conf_t::search_filter, and edui_conf_t::ver.
Referenced by MainSafe().
◆ DisplayUsage()
|
static |
Definition at line 365 of file ext_edirectory_userip_acl.cc.
References DisplayVersion(), edui_conf, local_printfx(), and edui_conf_t::program.
Referenced by MainSafe().
◆ DisplayVersion()
|
static |
Definition at line 358 of file ext_edirectory_userip_acl.cc.
References EDUI_PROGRAM_VERSION, and local_printfx().
Referenced by DisplayConf(), DisplayUsage(), and MainSafe().
◆ ErrLDAP()
const char * ErrLDAP | ( | int | e | ) |
Definition at line 1230 of file ext_edirectory_userip_acl.cc.
References LDAP_ERR_BIND, LDAP_ERR_CONNECT, LDAP_ERR_DATA, LDAP_ERR_FAILED, LDAP_ERR_INIT, LDAP_ERR_INVALID, LDAP_ERR_NOT_SEARCHED, LDAP_ERR_NOTFOUND, LDAP_ERR_NULL, LDAP_ERR_OOB, LDAP_ERR_OPEN, LDAP_ERR_OTHER, LDAP_ERR_PARAM, LDAP_ERR_PERSIST, LDAP_ERR_POINTER, LDAP_ERR_SEARCHED, and LDAP_ERR_SUCCESS.
Referenced by MainSafe().
◆ InitConf()
|
static |
Definition at line 395 of file ext_edirectory_userip_acl.cc.
References edui_conf_t::attrib, edui_conf_t::basedn, edui_conf_t::dn, edui_conf, EDUI_MODE_INIT, edui_conf_t::host, edui_conf_t::mode, edui_conf_t::passwd, edui_conf_t::persist_timeout, edui_conf_t::port, edui_conf_t::program, edui_conf_t::scope, edui_conf_t::search_filter, and edui_conf_t::ver.
Referenced by MainSafe().
◆ InitLDAP()
|
static |
Definition at line 500 of file ext_edirectory_userip_acl.cc.
References edui_conf_t::basedn, edui_ldap_t::basedn, edui_conf_t::dn, edui_ldap_t::dn, edui_conf, edui_ldap_t::err, edui_conf_t::host, edui_ldap_t::host, edui_ldap_t::idle_time, LDAP_INIT_S, edui_ldap_t::lm, edui_ldap_t::lp, edui_ldap_t::num_ent, edui_ldap_t::num_val, edui_conf_t::passwd, edui_ldap_t::passwd, edui_conf_t::port, edui_ldap_t::port, edui_conf_t::scope, edui_ldap_t::scope, edui_conf_t::search_filter, edui_ldap_t::search_filter, edui_ldap_t::search_ip, edui_ldap_t::status, edui_ldap_t::type, edui_ldap_t::userid, edui_ldap_t::val, edui_ldap_t::ver, and xstrncpy().
Referenced by MainSafe().
◆ local_printfx()
|
static |
Definition at line 218 of file ext_edirectory_userip_acl.cc.
References debug(), edui_conf, EDUI_MAXLEN, EDUI_PROGRAM_NAME, edui_conf_t::program, and xstrncpy().
Referenced by DisplayConf(), DisplayUsage(), DisplayVersion(), and MainSafe().
◆ main()
Definition at line 1766 of file ext_edirectory_userip_acl.cc.
References MainSafe().
◆ MainSafe()
Definition at line 1299 of file ext_edirectory_userip_acl.cc.
References edui_conf_t::attrib, edui_conf_t::basedn, BindLDAP(), CloseLDAP(), ConvertIP(), debug(), debug_enabled, DisplayConf(), DisplayUsage(), DisplayVersion(), edui_conf_t::dn, edui_conf, edui_elap, edui_ldap, EDUI_MAXLEN, EDUI_MODE_DEBUG, EDUI_MODE_GROUP, EDUI_MODE_IPV4, EDUI_MODE_IPV6, EDUI_MODE_KILL, EDUI_MODE_PERSIST, EDUI_MODE_TLS, edui_now, edui_ldap_t::err, ErrLDAP(), edui_conf_t::host, edui_ldap_t::idle_time, InitConf(), InitLDAP(), LDAP_AUTH_TLS, LDAP_BIND_S, LDAP_ERR_NOTFOUND, LDAP_ERR_SUCCESS, LDAP_IDLE_S, LDAP_INIT_S, LDAP_OPEN_S, LDAP_PERSIST_S, local_printfx(), edui_conf_t::mode, OpenLDAP(), edui_conf_t::passwd, edui_conf_t::persist_timeout, edui_conf_t::port, edui_conf_t::program, ResetLDAP(), edui_conf_t::scope, edui_ldap_t::scope, search_attrib, edui_conf_t::search_filter, edui_ldap_t::search_filter, edui_ldap_t::search_ip, SearchFilterLDAP(), SearchIPLDAP(), SearchLDAP(), SetVerLDAP(), SigTrap(), size_t, edui_ldap_t::status, StringSplit(), edui_ldap_t::userid, edui_conf_t::ver, and xstrncpy().
Referenced by main().
◆ makeHexString()
|
static |
Convert srcLen bytes from src into HEX and store into dst, which has a maximum content size of dstSize including c-string terminator. The dst value produced will be a 0-terminated c-string.
- Return values
-
N length of dst written (excluding c-string terminator) -11 (LDAP_ERR_OOB) buffer overflow detected
Definition at line 771 of file ext_edirectory_userip_acl.cc.
References LDAP_ERR_OOB.
Referenced by ConvertIP(), and SearchIPLDAP().
◆ makeIpBinary()
|
static |
Convert the IP address string representation in src to its binary representation.
- Returns
- binary representation of the src IP address. Must be free'd using freeaddrinfo().
Definition at line 744 of file ext_edirectory_userip_acl.cc.
Referenced by ConvertIP().
◆ OpenLDAP()
|
static |
Definition at line 552 of file ext_edirectory_userip_acl.cc.
References edui_ldap_t::err, edui_ldap_t::host, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_CONNECT, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_SUCCESS, LDAP_INIT_S, LDAP_OPEN_S, LDAP_SSL_S, LDAP_TLS_S, edui_ldap_t::lp, edui_ldap_t::port, edui_ldap_t::status, and xstrncpy().
Referenced by MainSafe().
◆ ResetLDAP()
|
static |
Definition at line 862 of file ext_edirectory_userip_acl.cc.
References edui_conf, edui_ldap_t::err, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_PERSIST, LDAP_ERR_SUCCESS, LDAP_IDLE_S, LDAP_INIT_S, LDAP_IPV4_S, LDAP_IPV6_S, LDAP_OPEN_S, LDAP_PERSIST_S, LDAP_SEARCH_S, LDAP_VAL_S, edui_ldap_t::lm, edui_ldap_t::num_ent, edui_ldap_t::num_val, edui_conf_t::search_filter, edui_ldap_t::search_filter, edui_ldap_t::search_ip, edui_ldap_t::status, edui_ldap_t::userid, edui_ldap_t::val, and xstrncpy().
Referenced by MainSafe().
◆ SearchFilterLDAP()
|
static |
Definition at line 906 of file ext_edirectory_userip_acl.cc.
References edui_ldap_t::basedn, edui_conf, EDUI_MAXLEN, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_DATA, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OOB, LDAP_ERR_OPEN, LDAP_INIT_S, LDAP_IPV4_S, LDAP_IPV6_S, LDAP_OPEN_S, edui_conf_t::search_filter, edui_ldap_t::search_filter, edui_ldap_t::search_ip, edui_ldap_t::status, and xstrncpy().
Referenced by MainSafe().
◆ SearchIPLDAP()
|
static |
Definition at line 1048 of file ext_edirectory_userip_acl.cc.
References edui_conf_t::attrib, BinarySplit(), debug(), edui_conf, EDUI_MAXLEN, edui_ldap_t::err, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_DATA, LDAP_ERR_INIT, LDAP_ERR_NOT_SEARCHED, LDAP_ERR_NOTFOUND, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_POINTER, LDAP_ERR_SUCCESS, LDAP_INIT_S, LDAP_IPV4_S, LDAP_IPV6_S, LDAP_OPEN_S, LDAP_SEARCH_S, LDAP_VAL_S, edui_ldap_t::lm, edui_ldap_t::lp, makeHexString(), edui_ldap_t::num_ent, edui_ldap_t::num_val, edui_ldap_t::search_ip, edui_ldap_t::status, edui_ldap_t::userid, edui_ldap_t::val, and xstrncpy().
Referenced by MainSafe().
◆ SearchLDAP()
|
static |
Definition at line 994 of file ext_edirectory_userip_acl.cc.
References edui_ldap_t::basedn, EDUI_MAXLEN, edui_ldap_t::err, edui_ldap_t::idle_time, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_DATA, LDAP_ERR_FAILED, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_PARAM, LDAP_ERR_POINTER, LDAP_ERR_SEARCHED, LDAP_ERR_SUCCESS, LDAP_INIT_S, LDAP_OPEN_S, LDAP_SEARCH_S, edui_ldap_t::lm, edui_ldap_t::lp, edui_ldap_t::num_ent, edui_ldap_t::status, and xstrncpy().
Referenced by MainSafe().
◆ SetVerLDAP()
|
static |
Definition at line 629 of file ext_edirectory_userip_acl.cc.
References edui_ldap_t::err, LDAP_BIND_S, LDAP_ERR_BIND, LDAP_ERR_FAILED, LDAP_ERR_INIT, LDAP_ERR_NULL, LDAP_ERR_OPEN, LDAP_ERR_PARAM, LDAP_ERR_POINTER, LDAP_ERR_SUCCESS, LDAP_INIT_S, LDAP_OPEN_S, edui_ldap_t::lp, edui_ldap_t::status, and edui_ldap_t::ver.
Referenced by MainSafe().
◆ SigTrap()
void SigTrap | ( | int | s | ) |
Definition at line 1279 of file ext_edirectory_userip_acl.cc.
References CloseLDAP(), debug(), edui_conf, edui_ldap, EDUI_MODE_KILL, LDAP_OPEN_S, edui_conf_t::mode, and edui_ldap_t::status.
Referenced by MainSafe().
◆ StringSplit()
Definition at line 260 of file ext_edirectory_userip_acl.cc.
Referenced by MainSafe().
Variable Documentation
◆ edui_conf
|
static |
Definition at line 205 of file ext_edirectory_userip_acl.cc.
Referenced by ConvertIP(), DisplayConf(), DisplayUsage(), InitConf(), InitLDAP(), local_printfx(), MainSafe(), ResetLDAP(), SearchFilterLDAP(), SearchIPLDAP(), and SigTrap().
◆ edui_elap
time_t edui_elap |
Definition at line 208 of file ext_edirectory_userip_acl.cc.
Referenced by MainSafe().
◆ edui_ldap
|
static |
Definition at line 206 of file ext_edirectory_userip_acl.cc.
Referenced by MainSafe(), and SigTrap().
◆ edui_now
time_t edui_now |
Definition at line 207 of file ext_edirectory_userip_acl.cc.
Referenced by MainSafe().
◆ search_attrib
const char* search_attrib[] = { "cn", "uid", "networkAddress", "groupMembership", nullptr } |
Definition at line 204 of file ext_edirectory_userip_acl.cc.
Referenced by MainSafe().