Bug 74061 - imapd has hardcoded /etc/nologin test -- does not use pam_nologin
Summary: imapd has hardcoded /etc/nologin test -- does not use pam_nologin
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: imap
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John Dennis
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-14 02:56 UTC by Matthew West
Modified: 2007-04-18 16:46 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-08-05 17:30:22 UTC
Embargoed:


Attachments (Terms of Use)

Description Matthew West 2002-09-14 02:56:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
imapd has a hardcoded test for the presence of the /etc/nologin file, and it 
denies all client connections if this file exists. This is incorrect behavior, 
as the test for /etc/nologin should be done using the pam_nologin module.

Our problem is that we want a machine which our users cannot log in to, but 
which will still run an imap server using regular unix accounts and regular 
home directories. The default settings in /etc/pam.d on 7.3 have pam_nologin 
in "interactive" style services (such as ssh), but not in /etc/pam.d/system-
auth, which is all that /etc/pam.d/imap uses. This is exactly what we want 
(imap does not use pam_nologin), but we do not obtain the desired behavior 
because imapd checks itself for the presence of the /etc/nologin file and 
denies user access if it is found.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. touch /etc/nologin
2. chkconfig imap on
3. Use an imap client to try and read mail.
	

Actual Results:  The imap client will not be able to connect. It receives 
a "BYE" disconnect message from the server.


Expected Results:  The imap client should still be able to connect and read 
mail, as pam_nologin is not in the /etc/pam.d/imap configuration file.


Additional info:

The required change appears to be removing the stat at line 256 of 
src/imapd/imapd.c in the imap-2001a package. The name "/etc/nologin" is 
hardcoded in src/imapd/Makefile.

Comment 1 Bill Nottingham 2006-08-05 04:05:38 UTC
Red Hat apologizes that these issues have not been resolved yet. We do want to
make sure that no important bugs slip through the cracks.

Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/)
for security updates only. If this is a security issue, please reassign to the
'Fedora Legacy' product in bugzilla. Please note that Legacy security update
support for these products will stop on December 31st, 2006.

If this is not a security issue, please check if this issue is still present
in a current Fedora Core release. If so, please change the product and version
to match, and check the box indicating that the requested information has been
provided.

If you are currently still running Red Hat Linux 7.3 or 9, please note that
Fedora Legacy security update support for these products will stop on December
31st, 2006. You are strongly advised to upgrade to a current Fedora Core release
or Red Hat Enterprise Linux or comparable. Some information on which option may
be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be
closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a
security issue, please change the product as necessary. We thank you for your
help, and apologize again that we haven't handled these issues to this point.


Comment 2 Matthew West 2006-08-05 17:30:22 UTC
This problem is still present in Fedora Extras 5 in the package uw-imap-2004g-4.fc5.2, but I guess it's 
really an upstream problem. With the introduction of Dovecot as a replacement IMAP server it's no longer 
very important.


Note You need to log in before you can comment on or make changes to this bug.