Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23658 - qmail-1.03-r10 + smtp-auth-close3.patch - morercpthost != love
Summary: qmail-1.03-r10 + smtp-auth-close3.patch - morercpthost != love
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-28 15:53 UTC by Ilya Volynets (RETIRED)
Modified: 2003-08-11 21:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Volynets (RETIRED) gentoo-dev 2003-06-28 15:53:41 UTC
qmail-1.03-r10 has SMTP AUTH patch included by default. However, when attempting
to use SMTP AUTH feature (by adding three extra parameters to command line of
qmail-smtpd), I was faced with repeated failure. After some investigation, I
found that qmail-smtpd doesn't even start my checkpassword utility. After even
more investigation, I found that the culprit is smtp-auth-close3.patch.

It is designed to handle situation, where "morercpthosts.cdb" exists. I didn't
dig too deeply, but I guess that this file is constantly open on file describtor
3. However, when no morercpthosts exists, and no other weired stuff is going on,
fr 3 happens to be of descriptors open by pipe(). closing it, and then trying to
dup2 doesn't make qmail very happy, of course.

propper fix would be to test if pi[0]!=3, and only then to close 3 and use dup2. 

As temporary work-around, I created morercpthosts.
Comment 1 John Sutherland 2003-07-29 20:08:13 UTC
I tried this solution, but it didn't fix everything for me.. It would fix it for the server that qmail was living on (a webbased email), but didn't fix it for external clients... 

I figured out taht I needed to SUID on /bin/checkpassword..

chmod 4755 /bin/checkpassword

Probably not the safest thing in world, but it worked for me.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 21:38:47 UTC
Ilya: thanks, you had it right on.
I redid the smtp-auth-close3.patch based on your description here, and it works now. The new patch is applied on the new -r12 of qmail.

To easily enable SMTP AUTH now, look in control/conf-smtpd and uncomment the block for it there.