[PATCH] Configure file without an empty line
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I had to apply this patch to 1.1.7 to have it read the config files if the configuration does not end with an empty line. diff -ur freeradius-1.1.7-org/src/main/conffile.c freeradius-1.1.7/src/main/conffile.c - --- freeradius-1.1.7-org/src/main/conffile.c 2007-04-07 18:28:17.000000000 -0400 +++ freeradius-1.1.7/src/main/conffile.c 2008-02-01 16:32:36.000000000 -0500 @@ -672,7 +672,7 @@ * We've filled the buffer, and there isn't * a CR in it. Die! */ - - if (cbuf[len - 1] != '\n') { + if (!eof && cbuf[len - 1] != '\n') { radlog(L_ERR, "%s[%d]: Line too long", cf, *lineno); cf_section_free(&cs); Attached is the configuration file that would fail with an Line too long error. Notice that the end of the file is "...blabla\n", not "...blabla\n\n" I have not tried v2.0.1. - -- ============== +---------------------------------------------+ Martin Gadbois | "Please answer by yes or no. | Sr. SW Designer | Uncooperative user waste precious CPU time" | Colubris Networks Inc. | -- The Andromeda Strain, M. Crichton, 1969 | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHqcyrMPkSU9icdA0RAuI3AJ9rBf22wvN7VlZPwZb6q5wLGvrG5gCfZlsh pW9i0iwZmnYltWoJdMSGgCE= =+wv9 -----END PGP SIGNATURE----- # # Configuration for the SQL module, when using Postgresql. # # The database schema is available at: # # doc/examples/postgresql.sql # # Updated for using AttributeGroup/AttributeNumber in *reply tables. # server & password must already be defined driver = "rlm_sql_postgresql" login = "postgres" radius_db = "postgres" acct_table1 = "radius.radacct" acct_table2 = "radius.radacct" # Allow for storing data after authentication postauth_table = "radius.radpostauth" authcheck_table = "radius.radcheck" authreply_table = "radius.radreply" groupcheck_table = "radius.radgroupcheck" groupreply_table = "radius.radgroupreply" # Table to keep group info radusergroup_table = "radius.radusergroup" # Where to store a request authorize_radrequest_table = "radius.radrequest" # Remove stale session if checkrad does not see a double login deletestalesessions = yes # Print all SQL statements when in debug mode (-x) sqltrace = no # sqltracefile = ${logdir}/sqltrace.sql # number of sql connections to make to server num_sql_socks = 5 sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" group_membership_query = "SELECT GroupName FROM ${radusergroup_table} WHERE UserName='%{SQL-User-Name}'" postauth_query = "SELECT radius.post_authentication('%{SQL-User-Name}', '%{reply:Packet-Type}', '%{Acct-Session-Id}', '%{Colubris-Access-Controlled}', %{Colubris-VSC-Index}, %{Colubris-Active-User-Sessions}, '%{reply:Colubris-Auth-Method}','%{EAP-Type}', '%{request:Freeradius-Proxied-To}' )"
Martin Gadbois wrote:
I had to apply this patch to 1.1.7 to have it read the config files if the configuration does not end with an empty line.
I've added the patch, but I don't think we'll be releasing a 1.1.8.
I have not tried v2.0.1.
That part of the code has been re-written, and doesn't have this problem. Alan DeKok.
participants (2)
-
Alan DeKok -
Martin Gadbois