Phil Mayers wrote:
Tim White wrote:
$ freeradius -v
freeradius: FreeRADIUS Version 1.1.6, for host i486-pc-linux-gnu, built on Jun 8 2007 at 17:17:46

I'm using Freeradius, with MySQL (rlm_sql) as the backend for Coova Chilli (and it's JSON interface). Unfortunately, the reply-message when the password is expired, contains a newline at the end, which breaks chilli (due to the newline being in the JSON object, which breaks). Short of recompiling Freeradius with the newlines removed, is there an easier way to change this reply-message?

Assuming you mean a radius Reply-Message attribute in the Access-Accept or Access-Reject, there are two possibilities:
Yes

1. You have put the newline in yourself, either in files (/etc/raddb/users) or the SQL/LDAP/other lookup
 2. It's in their accidentally

I'm going to take a wild guess and say you forgot the closing " in /etc/raddb/users i.e. you have:

DEFAULT
    Reply-Message = "there will be a newline here
Firstly, I'm not using files at all, and as it's the Reply-Message for when a password has expired, it's not going to be in /etc/raddb/users anyway, as when a password has expired, the server replaces all the Reply-Message attributes with it's own. In this case, the one with the newline.

As advised in the docs and on this mailing list daily, run the server in debug mode (-X) to see where the newline is actually coming from.
I did that.


I've now got the sources, and it appears to be in the src that the problem is.
freeradius-1.1.7/src/main/auth.c:84
                             "Password Has Expired\r\n",

Looking the the 2.0.2 sources, I see the same problem, except I understand seeing as this code is in rlm_expiration now, that it can be overridden in config files.
freeradius-2.0.2/src/modules/rlm_expiration/rlm_expiration.c:54
       NULL, "Password Has Expired\r\n"},


So from my quick look, is there no way to fix this in 1.1.7 without recompiling freeradius? If not, anyone know of a package for 2.0.2 for Ubuntu?

Thanks

Tim
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to