ports/61872: [PATCH] mail/akpop3d fails to authenticate when using an authfile
David P. Reese Jr.
daver at solidcore.com
Sun Jan 25 07:40:18 UTC 2004
>Number: 61872
>Category: ports
>Synopsis: [PATCH] mail/akpop3d fails to authenticate when using an authfile
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 24 23:40:07 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: David P. Reese Jr.
>Release: FreeBSD 4.9-RELEASE i386
>Organization:
Solidcore Systems
>Environment:
System: FreeBSD keen.paloalto.solidcore.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Sat Jan 24 08:44:54 PST 2004 daver at keen.paloalto.solidcore.com:/usr/src/sys/compile/KEEN i386
>Description:
akpop3d fails to authenticate when using an external authfile.
>How-To-Repeat:
Install mail/akpop3d.
Create the authfile /tmp/authfile with the following contents:
--- begin authfile ---
daver:foobar:daver:/var/mail/daver
--- end authfile ---
Start akpop3d:
# akpop3d -a /tmp/authfile
Telnet to the pop3 server and try to authenticate:
$ telnet localhost pop3
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK
USER daver
+OK
PASS foobar
-ERR authentication failed
Connection closed by foreign host.
>Fix:
There is a bug in the loop that reads in the authfile line by line.
--- authenticate.c.orig 2004-01-24 22:19:02.000000000 -0800
+++ authenticate.c 2004-01-24 22:19:11.000000000 -0800
@@ -195,7 +195,7 @@
syslog(LOG_ERR,"%s: %s: %s","failed to read auth file",authfile,strerror(errno));
return 0;
}
- while ((0!=ferror(fptr)) && (0!=feof(fptr))) {
+ while ((!ferror(fptr)) && (!feof(fptr))) {
linebuf[0] = '\0';
if (fgets(linebuf, sizeof(linebuf), fptr) == NULL) {
fclose(fptr);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list