SHA256
1
0
forked from pool/dhcp
dhcp/dhcp-3.0.5-ldap-patch-casa-fix.dif

54 lines
2.0 KiB
Plaintext

--- server/ldap.c
+++ server/ldap.c 2007/01/24 12:43:12
@@ -462,7 +462,7 @@
{
ret = dmalloc (db.len + 1, MDL);
if (ret == NULL)
- log_fatal ("no memory for ldap username");
+ log_fatal ("no memory for ldap option %d value", option_name);
memcpy (ret, db.data, db.len);
ret[db.len] = 0;
@@ -562,7 +562,7 @@
SV_LDAP_DEBUG_FILE);
#if defined (LDAP_CASA_AUTH)
- if (!load_uname_pwd_from_miCASA(ldap_username,ldap_password))
+ if (!load_uname_pwd_from_miCASA(&ldap_username,&ldap_password))
{
#if defined (DEBUG_LDAP)
log_info ("Authentication credential taken from file");
--- server/ldap_casa.c
+++ server/ldap_casa.c 2007/01/24 12:43:12
@@ -81,9 +81,9 @@
load_uname_pwd_from_miCASA (char **ldap_username, char **ldap_password)
{
int result = 0;
- int32_t credentialtype = SSCS_CRED_TYPE_SERVER_F;
- SSCS_BASIC_CREDENTIAL credential = {0};
- SSCS_SECRET_ID_T applicationSecretId = {0};
+ uint32_t credentialtype = SSCS_CRED_TYPE_SERVER_F;
+ SSCS_BASIC_CREDENTIAL credential;
+ SSCS_SECRET_ID_T applicationSecretId;
char *tempVar = NULL;
const char applicationName[10] = "dhcp-ldap";
@@ -105,15 +105,15 @@
if(credential.unLen)
{
tempVar = dmalloc (credential.unLen + 1, MDL);
- memcpy(tempVar , credential.username, credential.unLen);
if (!tempVar)
log_fatal ("no memory for ldap_username");
+ memcpy(tempVar , credential.username, credential.unLen);
*ldap_username = tempVar;
tempVar = dmalloc (credential.pwordLen + 1, MDL);
- memcpy(tempVar, credential.password, credential.pwordLen);
if (!tempVar)
log_fatal ("no memory for ldap_password");
+ memcpy(tempVar, credential.password, credential.pwordLen);
*ldap_password = tempVar;
#if defined (DEBUG_LDAP)