Debian Bug report logs -
#454759
courier-imap: Useless use of errno value
Reported by: Joseph <debbugs@digitasaru.net>
Date: Fri, 7 Dec 2007 16:30:03 UTC
Severity: minor
Tags: patch
Found in version courier/0.58.0-1
Fixed in version 0.58.0.20080127
Done: Stefan Hornburg <racke@linuxia.de>
Bug is archived. No further changes may be made.
Forwarded to courier-imap@lists.sourceforge.net
Toggle useless messages
Report forwarded to
debian-bugs-dist@lists.debian.org, Stefan Hornburg (Racke) <racke@linuxia.de>:
Bug#454759; Package
courier-imap.
Full text and
rfc822 format available.
Acknowledgement sent to
Joseph <debbugs@digitasaru.net>:
New Bug report received and forwarded. Copy sent to
Stefan Hornburg (Racke) <racke@linuxia.de>.
Full text and
rfc822 format available.
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: courier-imap
Version: 4.3.0-1.
Severity: minor
Tags: patch
The error string presented when the uid and/or gid of a maildir is
incorrectly set includes the string for errno. Because the check is
performed after stat'ing <maildir>/loginexec, it retains the errno value
from that check. When printing the error message, the string from errno
is (incorrectly) appended:
/usr/bin/imapd .maildir
* BYE [ALERT] Fatal error: Account's mailbox directory is not owned by
* the correct uid or gid: No such file or directory
strace output:
chdir("/home/<user>/.maildir") = 0
stat64("loginexec", 0xbfd35804) = -1 ENOENT (No such file or
directory)
stat64(".", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
geteuid32() = 1000
getegid32() = 1000
time(NULL) = 1197041165
write(1, "* BYE [ALERT] Fatal error: Accou"..., 122* BYE [ALERT] Fatal
error: Account's mailbox directory is not owned by the correct uid or
gid: No such file or directory
) = 122
The errno output originates in write_error_exit function in
imap/imapwrite.c. In it, if errno is nonzero, errno is translated to a
string and appended (or, if no strerror is present on the system, just
the errno value).
Thefore, a simple one-line patch is sufficient to stop the incorrect
errno appending. One need only set errno to 0 before calling
write_error_exit:
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.23.8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages courier-imap depends on:
ii courier-authlib 0.60.1-1 Courier authentication library
ii courier-base 0.58.0-1 Courier mail server - base system
ii exim4-daemon-heavy [mail-tran 4.68-2 Exim MTA (v4) daemon with extended
ii libc6 2.7-3 GNU C Library: Shared libraries
ii libfam0 2.7.0-13 Client library to control the FAM
ii libgdbm3 1.8.3-3 GNU dbm database routines (runtime
courier-imap recommends no packages.
-- debconf information:
courier-imap/moveconfig: true
[courier-patch.diff (text/plain, attachment)]
Noted your statement that Bug has been forwarded to courier-imap@lists.sourceforge.net.
Request was from
"Stefan Hornburg (Racke)" <racke@linuxia.de>
to
control@bugs.debian.org.
(Thu, 13 Dec 2007 22:24:08 GMT)
Full text and
rfc822 format available.
Reply sent to
Stefan Hornburg <racke@linuxia.de>:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Joseph <debbugs@digitasaru.net>:
Bug acknowledged by developer.
Full text and
rfc822 format available.
Message #12 received at 454759-done@bugs.debian.org (full text, mbox, reply):
version: 0.58.0.20080127
Patch has been applied upstream.
Regards
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
Bug archived.
Request was from
Debbugs Internal Request <owner@bugs.debian.org>
to
internal_control@bugs.debian.org.
(Fri, 11 Sep 2009 08:03:28 GMT)
Full text and
rfc822 format available.
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Jan 6 00:29:39 2016;
Machine Name:
beach
Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.