INN commit: branches/2.5 (lib/sendpass.c scripts/inncheck.in)
INN Commit
rra at isc.org
Sun Jul 17 19:08:35 UTC 2011
Date: Sunday, July 17, 2011 @ 12:08:34
Author: iulius
Revision: 9273
improve checks on passwd.nntp
Improve the error message when the parsed lined is in wrong format:
"Argument list too long" (E2BIG) instead of "Numerical argument out
of domain" (EDOM).
Also catch a new kind of error in passwd.nntp: any line prior to a matching
<hostname>, which is not empty or starts with a hash, but contains a third
colon somewhere that is not followed by "authinfo".
Thanks to Florian Schlichting for the patch.
Modified:
branches/2.5/lib/sendpass.c
branches/2.5/scripts/inncheck.in
---------------------+
lib/sendpass.c | 2 +-
scripts/inncheck.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Modified: lib/sendpass.c
===================================================================
--- lib/sendpass.c 2011-07-17 19:08:12 UTC (rev 9272)
+++ lib/sendpass.c 2011-07-17 19:08:34 UTC (rev 9273)
@@ -62,7 +62,7 @@
if ((style = strchr(pass, ':')) != NULL) {
*style++ = '\0';
if (strcmp(style, "authinfo") != 0) {
- errno = EDOM;
+ errno = E2BIG;
break;
}
}
Modified: scripts/inncheck.in
===================================================================
--- scripts/inncheck.in 2011-07-17 19:08:12 UTC (rev 9272)
+++ scripts/inncheck.in 2011-07-17 19:08:34 UTC (rev 9273)
@@ -908,7 +908,7 @@
input: while ( <$IN> ) {
next input if &spacious($file, ++$line);
- unless ( ($name, $pass) = /[\w\-\.]+:(.*):(.*)(:authinfo)?$/ ) {
+ unless ( ($name, $pass) = /[\w\-\.]+:([^:]*):([^:]*)(:authinfo)?$/ ) {
eprint "$file:$line: malformed line.\n";
next input;
}
More information about the inn-committers
mailing list