From: Alan T. DeKok Date: Fri, 14 Dec 2012 10:39:24 +0000 (-0500) Subject: Fix compiler warnings X-Git-Tag: release_3_0_0_beta1~1367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17eb883c56ba273ec4dc5adfe05665bfc616c53b;p=thirdparty%2Ffreeradius-server.git Fix compiler warnings --- diff --git a/src/modules/rlm_mschap/opendir.c b/src/modules/rlm_mschap/opendir.c index 356c9a5f7bd..b4b6f51a9f7 100644 --- a/src/modules/rlm_mschap/opendir.c +++ b/src/modules/rlm_mschap/opendir.c @@ -34,6 +34,19 @@ RCSID("$Id$") #define kActiveDirLoc "/Active Directory/" +/* + * In rlm_mschap.c + */ +extern void mschap_add_reply(REQUEST *request, VALUE_PAIR** vp, unsigned char ident, + const char* name, const char* value, int len); + +/* + * Only used by rlm_mschap.c + */ +int od_mschap_auth(REQUEST *request, VALUE_PAIR *challenge, + VALUE_PAIR * usernamepair); + + static int getUserNodeRef(char* inUserName, char **outUserName, tDirNodeReference* userNodeRef, tDirReference dsRef) { @@ -41,14 +54,14 @@ static int getUserNodeRef(char* inUserName, char **outUserName, tDirNodeReference nodeRef = 0; long status = eDSNoErr; tContextData context = 0; - unsigned long nodeCount = 0; + uint32_t nodeCount = 0; uint32_t attrIndex = 0; tDataList *nodeName = NULL; tAttributeEntryPtr pAttrEntry = NULL; tDataList *pRecName = NULL; tDataList *pRecType = NULL; tDataList *pAttrType = NULL; - unsigned long recCount = 0; + uint32_t recCount = 0; tRecordEntry *pRecEntry = NULL; tAttributeListRef attrListRef = 0; char *pUserLocation = NULL; @@ -114,7 +127,7 @@ static int getUserNodeRef(char* inUserName, char **outUserName, eDSExact, pRecType, pAttrType, 0, &recCount, &context); if (status != eDSNoErr || recCount == 0) { - radlog(L_ERR,"rlm_mschap: getUserNodeRef(): dsGetRecordList() status = %ld, recCount=%lu", status, recCount); + radlog(L_ERR,"rlm_mschap: getUserNodeRef(): dsGetRecordList() status = %ld, recCount=%u", status, recCount); result = RLM_MODULE_FAIL; break; } @@ -215,7 +228,6 @@ static int getUserNodeRef(char* inUserName, char **outUserName, return result; } - int od_mschap_auth(REQUEST *request, VALUE_PAIR *challenge, VALUE_PAIR * usernamepair) { @@ -231,7 +243,7 @@ int od_mschap_auth(REQUEST *request, VALUE_PAIR *challenge, char *shortUserName = NULL; VALUE_PAIR *response = pairfind(request->packet->vps, PW_MSCHAP2_RESPONSE, VENDORPEC_MICROSOFT); #ifndef NDEBUG - int t; + unsigned int t; #endif username_string = (char *) malloc(usernamepair->length + 1);