[PATCH] Configure file without an empty line

Martin Gadbois martin.gadbois at colubris.com
Wed Feb 6 16:05:15 CET 2008


-----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-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: freeradius-sql.conf
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20080206/7193cd16/attachment.ksh>


More information about the Freeradius-Devel mailing list