help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RES: [Help-gnu-radius] Trouble with Simultaneous-Use precedence?


From: Sergey Poznyakoff
Subject: Re: RES: [Help-gnu-radius] Trouble with Simultaneous-Use precedence?
Date: Fri, 01 Mar 2002 12:13:38 +0200

Hi, Norman

> Someone have any tips about implementing this behaviour from within
> gnu-radius

The following patch should do the job. I haven't tested it, however,
so I'd appreciate any feedback from you.

To apply:
   cd radiusd-0.96
   patch -l -p0 < PATCHFILENAME

--- orig/radiusd/auth.c Fri Dec 21 16:08:18 2001
+++ radiusd/auth.c      Fri Mar  1 12:09:44 2002
@@ -1047,6 +1047,7 @@ sfn_simuse(m)
        char  name[AUTH_STRING_LEN];
        int rc;
        int count;
+       VALUE_PAIR *p;
        
        strip_username(strip_names,
                       m->namepair->strvalue, m->user_check, name);
@@ -1056,6 +1057,17 @@ sfn_simuse(m)
                     avp_create(DA_SIMULTANEOUS_USE, 0, NULL, count));
        if (!rc)
                return;
+
+       /* If an external check is requested and it returns 0, continue
+          as usual */
+       if (p = avl_find(m->user_check, DA_EXEC_PROGRAM_WAIT)) {
+               if (radius_exec_program(p->strvalue,
+                                       m->req,
+                                       &m->user_reply,
+                                       1,
+                                       &m->user_msg) == 0)
+                       return;
+       }
 
        auth_format_msg(m,
                        (m->check_pair->lvalue > 1) ?

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]