forked from pool/freeradius-server
8f973f14f3
- fixed interaction with eDirectory (bnc#720620) OBS-URL: https://build.opensuse.org/request/show/85107 OBS-URL: https://build.opensuse.org/package/show/network/freeradius-server?expand=0&rev=34
137 lines
4.0 KiB
Diff
137 lines
4.0 KiB
Diff
Index: src/modules/rlm_ldap/edir_ldapext.c
|
|
===================================================================
|
|
--- src/modules/rlm_ldap/edir_ldapext.c.orig 2011-06-20 16:57:14.000000000 +0200
|
|
+++ src/modules/rlm_ldap/edir_ldapext.c 2011-09-27 15:05:37.913323658 +0200
|
|
@@ -84,11 +84,11 @@
|
|
BerElement *requestBer = NULL;
|
|
|
|
char * utf8ObjPtr = NULL;
|
|
- int utf8ObjSize = 0;
|
|
+ ber_len_t utf8ObjSize = 0;
|
|
char * utf8PwdPtr = NULL;
|
|
- int utf8PwdSize = 0;
|
|
+ ber_len_t utf8PwdSize = 0;
|
|
char * utf8Pwd2Ptr = NULL;
|
|
- int utf8Pwd2Size = 0;
|
|
+ ber_len_t utf8Pwd2Size = 0;
|
|
|
|
|
|
utf8ObjSize = strlen(objectDN)+1;
|
|
@@ -142,7 +142,7 @@
|
|
/*
|
|
* Convert the BER we just built to a berval that we'll send with the extended request.
|
|
*/
|
|
- if(ber_flatten(requestBer, requestBV) == LBER_ERROR)
|
|
+ if(ber_flatten(requestBer, requestBV) == -1)
|
|
{
|
|
err = NMAS_E_FRAG_FAILURE;
|
|
goto Cleanup;
|
|
@@ -172,16 +172,17 @@
|
|
* buffer was supplied, tries to decode the the return data and length
|
|
*
|
|
* ------------------------------------------------------------------------ */
|
|
-int berDecodeLoginData(
|
|
+ber_int_t berDecodeLoginData(
|
|
struct berval *replyBV,
|
|
- int *serverVersion,
|
|
- size_t *retDataLen,
|
|
+ ber_int_t *serverVersion,
|
|
+ ber_len_t *retDataLen,
|
|
void *retData )
|
|
{
|
|
- int rc=0, err = 0;
|
|
+ int rc=0;
|
|
+ ber_int_t err = 0;
|
|
BerElement *replyBer = NULL;
|
|
char *retOctStr = NULL;
|
|
- size_t retOctStrLen = 0;
|
|
+ ber_len_t retOctStrLen = 0;
|
|
|
|
if((replyBer = ber_init(replyBV)) == NULL)
|
|
{
|
|
@@ -258,14 +259,14 @@
|
|
size_t *pwdSize, // in bytes
|
|
char *pwd )
|
|
{
|
|
- int err = 0;
|
|
+ ber_int_t err = 0;
|
|
|
|
struct berval *requestBV = NULL;
|
|
char *replyOID = NULL;
|
|
struct berval *replyBV = NULL;
|
|
- int serverVersion;
|
|
+ ber_int_t serverVersion;
|
|
char *pwdBuf;
|
|
- size_t pwdBufLen, bufferLen;
|
|
+ ber_len_t pwdBufLen, bufferLen;
|
|
|
|
#ifdef NOT_N_PLAT_NLM
|
|
int currentThreadGroupID;
|
|
@@ -390,29 +391,29 @@
|
|
* and BER encodes the data into the BER value
|
|
*
|
|
* ------------------------------------------------------------------------ */
|
|
-int berEncodeAuthData(
|
|
+static int berEncodeAuthData(
|
|
struct berval **requestBV,
|
|
char *objectDN,
|
|
char *pwd,
|
|
char *sequence,
|
|
char *NasIP,
|
|
char *state,
|
|
- int *auth_state)
|
|
+ ber_int_t *auth_state)
|
|
{
|
|
int err = 0, rc=0;
|
|
BerElement *requestBer = NULL;
|
|
|
|
char * utf8ObjPtr = NULL;
|
|
- int utf8ObjSize = 0;
|
|
+ ber_len_t utf8ObjSize = 0;
|
|
char * utf8PwdPtr = NULL;
|
|
- int utf8PwdSize = 0;
|
|
+ ber_len_t utf8PwdSize = 0;
|
|
char * utf8NasIPPtr = NULL;
|
|
- int utf8NasIPSize = 0;
|
|
+ ber_len_t utf8NasIPSize = 0;
|
|
char * utf8StatePtr = NULL;
|
|
- int utf8StateSize = 0;
|
|
+ ber_len_t utf8StateSize = 0;
|
|
char * utf8SeqPtr = NULL;
|
|
- int utf8SeqSize = 0;
|
|
- int state_present = 0;
|
|
+ ber_len_t utf8SeqSize = 0;
|
|
+ ber_int_t state_present = 0;
|
|
|
|
utf8ObjSize = strlen(objectDN)+1;
|
|
utf8ObjPtr = objectDN;
|
|
@@ -494,12 +495,12 @@
|
|
* buffer was supplied, tries to decode the the return data and length
|
|
*
|
|
* ------------------------------------------------------------------------ */
|
|
-int berDecodeAuthData(
|
|
+static int berDecodeAuthData(
|
|
struct berval *replyBV,
|
|
- int *errCode,
|
|
- size_t *retDataLen,
|
|
+ ber_int_t *errCode,
|
|
+ ber_len_t *retDataLen,
|
|
char *retData,
|
|
- int *auth_state )
|
|
+ ber_int_t *auth_state )
|
|
{
|
|
int rc=0, err = 0;
|
|
BerElement *replyBer = NULL;
|
|
@@ -563,9 +564,9 @@
|
|
struct berval *requestBV = NULL;
|
|
char *replyOID = NULL;
|
|
struct berval *replyBV = NULL;
|
|
- int errCode;
|
|
+ ber_int_t errCode;
|
|
char *challenge;
|
|
- size_t challengesize;
|
|
+ ber_len_t challengesize;
|
|
|
|
challengesize = *statesize;
|
|
challenge = (char *)malloc(challengesize+2);
|