#include "squid.h"
#include "auth/digest/eDirectory/digest_common.h"
#include <lber.h>
#include <ldap.h>
#include <wchar.h>
#include "edir_ldapext.h"

Go to the source code of this file.
Macros | |
#define | NMASLDAP_GET_LOGIN_CONFIG_REQUEST "2.16.840.1.113719.1.39.42.100.3" |
#define | NMASLDAP_GET_LOGIN_CONFIG_RESPONSE "2.16.840.1.113719.1.39.42.100.4" |
#define | NMASLDAP_SET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.11" |
#define | NMASLDAP_SET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.12" |
#define | NMASLDAP_GET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.13" |
#define | NMASLDAP_GET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.14" |
#define | NMAS_LDAP_EXT_VERSION 1 |
#define | SMB_MALLOC_ARRAY(type, nelem) calloc(sizeof(type), nelem) |
#define | DEBUG(level, args) |
Functions | |
static int | berEncodePasswordData (struct berval **requestBV, const char *objectDN, const char *password, const char *password2) |
static int | berEncodeLoginData (struct berval **requestBV, char *objectDN, unsigned int methodIDLen, unsigned int *methodID, char *tag, size_t putDataLen, void *putData) |
static int | berDecodeLoginData (struct berval *replyBV, int *serverVersion, size_t *retDataLen, void *retData) |
static int | getLoginConfig (LDAP *ld, char *objectDN, unsigned int methodIDLen, unsigned int *methodID, char *tag, size_t *dataLen, void *data) |
static int | nmasldap_get_simple_pwd (LDAP *ld, char *objectDN, size_t pwdLen, char *pwd) |
static int | nmasldap_get_password (LDAP *ld, char *objectDN, size_t *pwdSize, unsigned char *pwd) |
int | nds_get_password (LDAP *ld, char *object_dn, size_t *pwd_len, char *pwd) |
Macro Definition Documentation
◆ DEBUG
#define DEBUG | ( | level, | |
args | |||
) |
Definition at line 72 of file edir_ldapext.cc.
◆ NMAS_LDAP_EXT_VERSION
#define NMAS_LDAP_EXT_VERSION 1 |
Definition at line 69 of file edir_ldapext.cc.
◆ NMASLDAP_GET_LOGIN_CONFIG_REQUEST
#define NMASLDAP_GET_LOGIN_CONFIG_REQUEST "2.16.840.1.113719.1.39.42.100.3" |
Definition at line 62 of file edir_ldapext.cc.
◆ NMASLDAP_GET_LOGIN_CONFIG_RESPONSE
#define NMASLDAP_GET_LOGIN_CONFIG_RESPONSE "2.16.840.1.113719.1.39.42.100.4" |
Definition at line 63 of file edir_ldapext.cc.
◆ NMASLDAP_GET_PASSWORD_REQUEST
#define NMASLDAP_GET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.13" |
Definition at line 66 of file edir_ldapext.cc.
◆ NMASLDAP_GET_PASSWORD_RESPONSE
#define NMASLDAP_GET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.14" |
Definition at line 67 of file edir_ldapext.cc.
◆ NMASLDAP_SET_PASSWORD_REQUEST
#define NMASLDAP_SET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.11" |
Definition at line 64 of file edir_ldapext.cc.
◆ NMASLDAP_SET_PASSWORD_RESPONSE
#define NMASLDAP_SET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.12" |
Definition at line 65 of file edir_ldapext.cc.
◆ SMB_MALLOC_ARRAY
Definition at line 71 of file edir_ldapext.cc.
Function Documentation
◆ berDecodeLoginData()
|
static |
Definition at line 231 of file edir_ldapext.cc.
References NULL, and SMB_MALLOC_ARRAY.
Referenced by getLoginConfig(), and nmasldap_get_password().
◆ berEncodeLoginData()
|
static |
Definition at line 149 of file edir_ldapext.cc.
References int, NMAS_LDAP_EXT_VERSION, and NULL.
Referenced by getLoginConfig().
◆ berEncodePasswordData()
|
static |
Definition at line 79 of file edir_ldapext.cc.
References NMAS_LDAP_EXT_VERSION, and NULL.
Referenced by nmasldap_get_password().
◆ getLoginConfig()
|
static |
Definition at line 285 of file edir_ldapext.cc.
References berDecodeLoginData(), berEncodeLoginData(), data, ld, NMAS_LDAP_EXT_VERSION, NMASLDAP_GET_LOGIN_CONFIG_REQUEST, NMASLDAP_GET_LOGIN_CONFIG_RESPONSE, and NULL.
Referenced by nmasldap_get_simple_pwd().
◆ nds_get_password()
Definition at line 497 of file edir_ldapext.cc.
References DEBUG, ld, nmasldap_get_password(), and nmasldap_get_simple_pwd().
Referenced by getpassword().
◆ nmasldap_get_password()
|
static |
Definition at line 413 of file edir_ldapext.cc.
References berDecodeLoginData(), berEncodePasswordData(), ld, NMAS_LDAP_EXT_VERSION, NMASLDAP_GET_PASSWORD_REQUEST, NMASLDAP_GET_PASSWORD_RESPONSE, NULL, and SMB_MALLOC_ARRAY.
Referenced by nds_get_password().
◆ nmasldap_get_simple_pwd()
Definition at line 355 of file edir_ldapext.cc.
References getLoginConfig(), ld, NULL, and SMB_MALLOC_ARRAY.
Referenced by nds_get_password().