[PATCH] authenticate only service type

Muhammad Tayseer Alquoatli idoit.ief at gmail.com
Wed Apr 25 10:35:13 CEST 2007

Hi list:
I've been working hard to let freeradius handles "Service-Type =
AUTHENTICATE_ONLY" the proper way, but i couldn't achieve that till
I've changed two lines in the source code
with you this patch freeradius understands AUTHENTICATE_ONLY and
doesn't complain about it, but handles it as all other service types
(i.e. runs the post-auth module and sets network configuration in the
reply) while it must only authenticate the user and returns a network
configuration free accept/reject reply
the patch below could be applied to freeradius-1.1.6
Best regards

diff -uNrp orig_freeradius-1.1.6/src/main/auth.c
--- orig_freeradius-1.1.6/src/main/auth.c       2007-04-25
10:45:08.000000000 +0300
+++ freeradius-1.1.6/src/main/auth.c    2007-04-25 10:47:12.000000000 +0300
@@ -1025,8 +1025,9 @@ autz_redo:

       if (exec_program)
-       result = rad_postauth(request);
+       check_item = pairfind(request->packet->vps, PW_SERVICE_TYPE);
+        if (check_item && check_item->lvalue != PW_AUTHENTICATE_ONLY)
+               result = rad_postauth(request);

       return result;

Muhammad Tayseer Alquoatli

More information about the Freeradius-Devel mailing list