The attached patch fixes a parameter juxtaposition and a couple broken RDEBUG 
statements 
in auth.c that were trying to print vp_strvalue of a VALUE_PAIR of type integer.

I haven't looked but there could very well be other instances of this over in 
the accounting area,
and the Session-Type in auth.c may also need a similar fix.  I don't use those 
codepaths.


diff --git a/src/main/auth.c b/src/main/auth.c
index 6a392be..30e6350 100644
--- a/src/main/auth.c
+++ b/src/main/auth.c
@@ -188,7 +188,7 @@ static int rad_check_password(REQUEST *request)
 		auth_type = auth_type_pair->vp_integer;
 		auth_type_count++;
 		dv = dict_valbyattr(PW_AUTH_TYPE,
-				    auth_type_pair->vp_integer, 0);
+				    0, auth_type_pair->vp_integer);
 
 		RDEBUG2("Found Auth-Type = %s",
 			(dv != NULL) ? dv->name : "?");
@@ -426,7 +426,12 @@ int rad_postauth(REQUEST *request)
 	 */
 	vp = pairfind(request->config_items, PW_POST_AUTH_TYPE, 0);
 	if (vp) {
-		RDEBUG2("Using Post-Auth-Type %s", vp->vp_strvalue);
+		DICT_VALUE      *dv;
+		dv = dict_valbyattr(PW_POST_AUTH_TYPE,
+                                    0, vp->vp_integer);
+
+		RDEBUG2("Using Post-Auth-Type %s", 
+			(dv != NULL) ? dv->name : "?");
 		postauth_type = vp->vp_integer;
 	}
 	result = module_post_auth(postauth_type, request);
@@ -602,7 +607,11 @@ autz_redo:
 	if (!autz_retry) {
 		tmp = pairfind(request->config_items, PW_AUTZ_TYPE, 0);
 		if (tmp) {
-			RDEBUG2("Using Autz-Type %s", tmp->vp_strvalue);
+			DICT_VALUE      *dv;
+			dv = dict_valbyattr(PW_AUTZ_TYPE, 0, tmp->vp_integer);
+
+			RDEBUG2("Using Autz-Type %s", 
+				(dv != NULL) ? dv->name : "?");
 			autz_type = tmp->vp_integer;
 			autz_retry = 1;
 			goto autz_redo;
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to