Changed behaviour in v3.x

stefan.paetow at diamond.ac.uk stefan.paetow at diamond.ac.uk
Mon Jan 27 18:50:58 CET 2014


Hi, 

In my post-auth section, I get the exact date and time in a specific format using /bin/date, and feed that back into an attribute. I've noticed though that now the back-tick exec appends a '\n' (a carriage return) to the end, which it did not do in FR2. Is that now correct (and expected) behaviour?

The code in my post-auth:

update control {
    Tmp-String-1 := `/bin/date -u +%%FT%%TZ`
}          

FR 3 output:

(20)   update control {
(20) Executing: "/bin/date -u +%%FT%%TZ"
(20)    expand: "+%%FT%%TZ" -> '+%FT%TZ'
(20)  Program returned code (0): 2014-01-27T17:20:42Z
(20)             Tmp-String-1 := '2014-01-27T17:20:42Z\n'
(20)    } # update control = noop

FR 2 output:

        expand: +%%FT%%TZ -> +%FT%TZ
Exec-Program output: 2014-01-27T17:35:00Z 
Exec-Program-Wait: plaintext: 2014-01-27T17:35:00Z 
Exec-Program: returned: 0
+++[control] returns noop


When I then re-use the Tmp-String-1 attribute for a reply attribute I'm building, I end up with a CR in the reply attribute, which is then considered invalid (because it contains a CR). If the appended CR is now accepted behaviour, how do I remove it? 

With Regards

Stefan Paetow
Software Engineer
+44 1235 778812
Diamond Light Source Ltd.
Diamond House, Harwell Science and Innovation Campus
Didcot, Oxfordshire, OX11 0DE



-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 





More information about the Freeradius-Users mailing list