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

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

#define DEBUG (   level,
  args 
)

Definition at line 72 of file edir_ldapext.cc.

Referenced by nds_get_password().

#define NMAS_LDAP_EXT_VERSION   1
#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.

Referenced by getLoginConfig().

#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.

Referenced by getLoginConfig().

#define NMASLDAP_GET_PASSWORD_REQUEST   "2.16.840.1.113719.1.39.42.100.13"

Definition at line 66 of file edir_ldapext.cc.

Referenced by nmasldap_get_password().

#define NMASLDAP_GET_PASSWORD_RESPONSE   "2.16.840.1.113719.1.39.42.100.14"

Definition at line 67 of file edir_ldapext.cc.

Referenced by nmasldap_get_password().

#define NMASLDAP_SET_PASSWORD_REQUEST   "2.16.840.1.113719.1.39.42.100.11"

Definition at line 64 of file edir_ldapext.cc.

#define NMASLDAP_SET_PASSWORD_RESPONSE   "2.16.840.1.113719.1.39.42.100.12"

Definition at line 65 of file edir_ldapext.cc.

#define SMB_MALLOC_ARRAY (   type,
  nelem 
)    calloc(sizeof(type), nelem)

Function Documentation

static int berDecodeLoginData ( struct berval *  replyBV,
int serverVersion,
size_t retDataLen,
void *  retData 
)
static

Definition at line 231 of file edir_ldapext.cc.

References free, NULL, and SMB_MALLOC_ARRAY.

Referenced by getLoginConfig(), and nmasldap_get_password().

static int berEncodeLoginData ( struct berval **  requestBV,
char *  objectDN,
unsigned int  methodIDLen,
unsigned int methodID,
char *  tag,
size_t  putDataLen,
void *  putData 
)
static

Definition at line 149 of file edir_ldapext.cc.

References i, int, NMAS_LDAP_EXT_VERSION, and NULL.

Referenced by getLoginConfig().

static int berEncodePasswordData ( struct berval **  requestBV,
const char *  objectDN,
const char *  password,
const char *  password2 
)
static

Definition at line 79 of file edir_ldapext.cc.

References NMAS_LDAP_EXT_VERSION, and NULL.

Referenced by nmasldap_get_password().

static int getLoginConfig ( LDAP *  ld,
char *  objectDN,
unsigned int  methodIDLen,
unsigned int methodID,
char *  tag,
size_t dataLen,
void *  data 
)
static
int nds_get_password ( LDAP *  ld,
char *  object_dn,
size_t pwd_len,
char *  pwd 
)

Definition at line 497 of file edir_ldapext.cc.

References DEBUG, nmasldap_get_password(), and nmasldap_get_simple_pwd().

Referenced by getpassword().

static int nmasldap_get_password ( LDAP *  ld,
char *  objectDN,
size_t pwdSize,
unsigned char *  pwd 
)
static
static int nmasldap_get_simple_pwd ( LDAP *  ld,
char *  objectDN,
size_t  pwdLen,
char *  pwd 
)
static

Definition at line 355 of file edir_ldapext.cc.

References free, getLoginConfig(), NULL, and SMB_MALLOC_ARRAY.

Referenced by nds_get_password().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors