Red Hat Bugzilla – Bug 7041
linuxconf core dumps due to long lins in /etc/hosts
Last modified: 2008-05-01 11:37:52 EDT
I have an entry in /etc/hosts wirth many aliases. The Line is more than
320 chars. Linuxconf core dumps after reading /etc/hosts.
If the line is shorter (less than ca. 320 chars) everything is ok.
Ok, I found the problem. This will be fixed in linuxconf 1.16r8.1. Note that
the user interface can't handle line that long for editing. Input are especially
limited (because of the web interface) to some arbitrary values. But I have
tested that if you edit any other line, the file is properly written back. If
you edit that specific record, it will be truncated.
I don't know how to include patch in this tool (bugzilla). I can send you
a patch if you need. Basically, a snprintf instead of sprintf at line
464 of the file netconf/hosts.cc. Very old code btw (1994).
Have verified linuxconf-1.16r10 allows long lines in /etc/hosts. This will be
relased as errata when testing is complete.