[prev in list] [next in list] [prev in thread] [next in thread]
List: openbsd-bugs
Subject: system/2286: [patch] smtpfwdd causes sendmail 8.12.1 to complain about missing file descriptors
From: marius () alchemy ! franken ! de
Date: 2001-12-29 23:45:09
[Download RAW message or body]
> Number: 2286
> Category: system
> Synopsis: [patch] smtpfwdd causes sendmail 8.12.1 to complain about missing \
> file descriptors
> Confidential: no
> Severity: non-critical
> Priority: medium
> Responsible: bugs
> State: open
> Class: sw-bug
> Submitter-Id: net
> Arrival-Date: Sat Dec 29 17:10:01 MST 2001
> Last-Modified:
> Originator: marius@alchemy.franken.de
> Organization:
net
> Release:
> Environment:
System : OpenBSD 3.0-stable (sources as of yesterday)
Architecture: OpenBSD.i386
Machine : i386
> Description:
since version 8.12.1 (8.12.0 ?) sendmail complains if a program piping
data to it doesn't have stdin, stdout and stderr opened; smtpfwdd(8)
doesn't open stdout and stderr when forwarding a mail to sendmail,
therefore an anoying system messages is generated for each incoming mail:
Dec 29 17:15:43 divinity sendmail[689]: SYSERR(uucp): File descriptors missing on \
startup: stdout, stderr: Bad file descriptor
> How-To-Repeat:
use sendmail 8.12.1 together with smtpd/smtpfwdd
> Fix:
just open /dev/null as stdout and stderr...
--- smtpfwdd.c.orig Thu Aug 23 16:17:08 2001
+++ smtpfwdd.c Sat Dec 29 22:39:27 2001
@@ -646,6 +646,19 @@
exit(EX_OSERR);
}
+ /*
+ * Open /dev/null as stdout and as stderr so sendmail 8.12.1 (and
+ * above ?) won't complain about missing file descriptors.
+ */
+ if (open ("/dev/null", O_WRONLY | O_APPEND) < 0) {
+ syslog(LOG_ERR, "Couldn't open /dev/null as stdout (%m)");
+ exit (EX_OSERR);
+ }
+ if (open ("/dev/null", O_RDWR | O_APPEND) < 0) {
+ syslog(LOG_ERR, "Couldn't open /dev/null as stderr (%m)");
+ exit (EX_OSERR);
+ }
+
fclose(f);
closelog();
if (lseek(0, body, SEEK_SET) < 0) {
> Audit-Trail:
> Unformatted:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic