Bug 1879 - libspamc is closing file descriptors it didn't open
Summary: libspamc is closing file descriptors it didn't open
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 major
Target Milestone: 2.54
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords: backport
Depends on:
Blocks:
 
Reported: 2003-05-08 14:01 UTC by John Morrissey
Modified: 2003-05-08 12:59 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
patch for 2.53 patch None John Morrissey [NoCLA]
patch for HEAD patch None John Morrissey [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description John Morrissey 2003-05-08 14:01:22 UTC
libspamc can potentially close file descriptors it didn't open. This is
especially critical because I use libspamc in qmail-smtpd to do spam checking in
the SMTP conversation. libspamc does a:

close(0)

and my SMTP connection goes away. :-)

Attached is are patches for 2.53 (fd.patch) and HEAD (fd-head.patch).
Comment 1 John Morrissey 2003-05-08 14:01:47 UTC
Created attachment 948 [details]
patch for 2.53
Comment 2 John Morrissey 2003-05-08 14:02:03 UTC
Created attachment 949 [details]
patch for HEAD
Comment 3 Justin Mason 2003-05-08 18:56:32 UTC
doh!   definitely needs to go in :(

OKAY: approved for 2.54 imo
Comment 4 Duncan Findlay 2003-05-08 19:31:21 UTC
OKAY: as long as you tested it, jm :-)
Comment 5 John Morrissey 2003-05-08 19:38:45 UTC
Those patches compile and seem logically correct, but I haven't tried them in a
production environment yet. If you want to wait a few days, I'll have this fix
rolled out to a dozen production machines.
Comment 6 Theo Van Dinter 2003-05-08 20:16:55 UTC
OKAY: ditto quinlan's note
Comment 7 Justin Mason 2003-05-08 20:59:33 UTC
I've just gone through it and it all makes sense; also make test passes fine ;).
 applied to 2.54 and HEAD