(RADIATOR) %{Handler:name}

Mariano Absatz radiator at lists.com.ar
Mon Sep 16 17:25:33 CDT 2002


ALLRIGHT, ALLRIGHT... I saw it, I see how stupid I am... it was plain 
%{name}... I'm sorry... :-(


El 16 Sep 2002 a las 16:07, Mariano Absatz escribió:

> OK,
> 
> now that I'm doing it this way I note... whereas there is a %{Reply:name} 
> easy replacement, I see no %{Request:name} equivalent... 
> 
> Is there a reason for that? Nobody ever asked for it?
> 
> Wouldn't this patch to Util.pm just do:
> ==============================================================================
> *** Util.pm.ORI Mon Sep 16 15:55:47 2002
> --- Util.pm     Mon Sep 16 16:00:20 2002
> ***************
> *** 332,337 ****
> --- 332,338 ----
>   
>       $s =~ s/%\{GlobalVar:([^{]+)\}/{&main::getVariable($1)}/egs;
>       $s =~ s/%\{Reply:([^{]+)\}/{$rpacket ? $rpacket->get_attr($1) : 
> ''}/egs;
> +     $s =~ s/%\{Request:([^{]+)\}/{$cpacket ? $cpacket->get_attr($1) : 
> ''}/egs;
>       $s =~ s/%\{Client:([^{]+)\}/{$p ? $p->{Client}{$1} : ''}/egs;
>       $s =~ s/%\{Handler:([^{]+)\}/{$p ? $p->{Handler}{$1} : ''}/egs;
>   #    $s =~ s/%\{Eval:([^{]+)\}/{eval($1)}/egs;
> ==============================================================================
> 
> Am I breaking something here? or does it make no sense?
> 
> TIA
> 
> El 14 Sep 2002 a las 10:19, Hugh Irvine escribió:
> 
> > 
> > Hello Mariano -
> > 
> > The AuthBy RADIUS clause actually deals with four seperate packets: the 
> > request packet, the reply packet, the packet that is sent to the proxy 
> > and the reply that comes back from the proxy. If you are interested, 
> > have a look at the code in "Radius/AuthRADIUS.pm".
> > 
> > And yes you can use AddToRequest and StripFromRequest as you describe.
> > 
> > regards
> > 
> > Hugh
> > 
> > 
> > On Saturday, September 14, 2002, at 05:06 AM, Mariano Absatz wrote:
> > 
> > > El 13 Sep 2002 a las 15:00, Mariano Absatz escribió:
> > > ...
> > >>>
> > >>> Otherwise, if you want to do fancy things such as you show below, you
> > >>> should use a hook (examples in "goodies/hooks.txt"). And it would
> > >>> probably be best to set a pseudo-attribute in the request packet that
> > >>> would then be used in the AuthBy clause.
> > >> Can't I do it via an "AddToRequest" in the <Handler>?
> > >> (http://www.open.com.au/radiator/ref.html#pgfId=428093) I can Perl, 
> > >> but,
> > >> especially when it is for a customer, I'd rather do it cleanly in the 
> > >> config
> > >> file...
> > >>
> > > (using again the BAD habit of replying to my own message)
> > >
> > > Now that I think about it... whether I do it via config file or hook, 
> > > the
> > > problem of adding a pseudo-attribute to the request packet is that the
> > > request packet will be forwarded to the proxied radius server... if I 
> > > don't
> > > prevent this, would the proxied packet include this pseudo-attribute? 
> > > or the
> > > packet to be proxied is not what I see as the "request packet"?
> > >
> > > That is, in the case of <AuthBy RADIUS> (or it's siblings), the request
> > > packet is not discarded, so I can not fiddle with it too liberally...
> > >
> > > Or can I add the attribute in the calling <Handler> with "AddToRequest"
> > > (http://www.open.com.au/radiator/ref.html#pgfId=428093) and remove it 
> > > in the
> > > called <AuthBy RADIUS> with "StripFromRequest"
> > > (http://www.open.com.au/radiator/ref.html#pgfId=417276)?
> > >

--
Mariano Absatz
El Baby
----------------------------------------------------------
 /"\                             |
 \ /     ASCII RIBBON CAMPAIGN   |
  X        AGAINST HTML MAIL     |
 / \                             |


===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list