Sutherland, James <jsutherl@...> wrote:
> Oct 27 19:42:37 hns1 milter-greylist: [ID 799890 mail.info] dumpfd = 144
> Oct 27 19:47:47 hns1 milter-greylist: [ID 799890 mail.info] dumpfd = 91
> Oct 27 19:52:56 hns1 milter-greylist: [ID 799890 mail.info] dumpfd = 65
> Oct 27 19:58:01 hns1 milter-greylist: [ID 799890 mail.info] dumpfd = 87
> Oct 27 20:03:06 hns1 milter-greylist: [ID 799890 mail.info] dumpfd = 154
> Oct 27 20:08:12 hns1 milter-greylist: [ID 799890 mail.info] dumpfd = 280
> Oct 27 20:08:12 hns1 milter-greylist: [ID 525239 mail.error] cannot write
> dumpfile "/var/milter-greylist/greylist.db-XXYsayUQ": Error 0
Here is the code that causes this failure:
if ((dump = fdopen(dumpfd, "w")) == NULL) {
syslog(LOG_ERR, "cannot write dumpfile \"%s\": %s",
newdumpfile, strerror(errno));
exit(EX_OSERR);
}
So your OS was not able to open that file, but doesn't tell us why
(errno says no error occured). You can add this before the syslog call:
syslog(LOG_ERR, "dumpfd = %d, dump = %p, errno = %d\n",
dumpfd, dump, errno);
to check that it's not strerror() that is misbehaving.
According to the X/Open spec:
http://www.opengroup.org/onlinepubs/007908799/xsh/fdopen.html
"Upon successful completion, fdopen() returns a pointer to a stream.
Otherwise, a null pointer is returned and errno is set to indicate the
error. "
So I'd say fdopen() does not behaves as expected. Is this a bug in your
OS?
--
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent
le binaire et ceux qui ne le comprennent pas.
manu@...Message
Re: [milter-greylist] Volume 2
2004-10-28 by manu@netbsd.org
Attachments
- No local attachments were found for this message.