Bug 74061 - imapd has hardcoded /etc/nologin test -- does not use pam_nologin
imapd has hardcoded /etc/nologin test -- does not use pam_nologin
Product: Red Hat Linux
Classification: Retired
Component: imap (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: John Dennis
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-09-13 22:56 EDT by Matthew West
Modified: 2007-04-18 12:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-05 13:30:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew West 2002-09-13 22:56:58 EDT
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:

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 00:05:38 EDT
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

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 13:30:22 EDT
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.