RE: finding out which section we're in
Thanks Alan and Arran. I'll try this or separate this policies out, whichever works i guess! Thanks again Andy ________________________________________ From: Freeradius-Users [freeradius-users-bounces+andy.franks=sath.nhs.uk@lists.freeradius.org] on behalf of Arran Cudbard-Bell [a.cudbardb@freeradius.org] Sent: 02 December 2015 18:35 To: FreeRadius users mailing list Subject: Re: finding out which section we're in
On Dec 2, 2015, at 1:04 PM, Franks Andy (IT Technical Architecture Manager) <Andy.Franks@sath.nhs.uk> wrote:
Sorry, realise this request is a bit ambiguous - to state things better, I have policy.d unlang "scripts" which are called both in authorize, accounting and so on (same script), and in the script I want to say if (section==authorize) { stuff } elseif (section==accounting) { stuff }
%{Request-Processing-Stage} -Arran
I'd use seperate policies because it keeps it simpler - your code will otherwise be a nest of if/else statements and wrappers Think about if you have different virtual servers...each will have auth/autz/acct but you may want different things.... alan
On Dec 2, 2015, at 4:02 PM, Alan Buxey <A.L.M.Buxey@LBORO.AC.UK> wrote:
I'd use seperate policies because it keeps it simpler - your code will otherwise be a nest of if/else statements and wrappers
Think about if you have different virtual servers...each will have auth/autz/acct but you may want different things....
You can use the special policy names e.g. policy.authorize { } policy.authenticate { } and call 'policy' in the different sections to achieve per section behaviour. -Arran
participants (3)
-
Alan Buxey -
Arran Cudbard-Bell -
Franks Andy (IT Technical Architecture Manager)