[Pkg-shadow-devel] Bug#157372: marked as done ([TO CLOSE 20050407] login: does weird things with $MAIL if comment lines in login.defs contain MAIL_FILE)

Debian Bug Tracking System owner@bugs.debian.org
Thu, 14 Apr 2005 10:18:38 -0700


Your message dated Thu, 14 Apr 2005 18:34:53 +0200
with message-id <20050414163453.GG10252@mykerinos.kheops.frmug.org>
and subject line Closing this bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Aug 2002 09:56:18 +0000
>From mh@bofh.de Tue Aug 20 04:56:18 2002
Return-path: <mh@bofh.de>
Received: from q.bofh.de [212.126.200.160] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17h5kH-0000Sn-00; Tue, 20 Aug 2002 04:56:17 -0500
Received: from mh by q.bofh.de with local (Exim 3.35 #1)
	id 17h5kF-0007fl-00; Tue, 20 Aug 2002 11:56:15 +0200
From: Marc Haber <mh+debian-bugs@zugschlus.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: login: does weird things with $MAIL if comment lines in login.defs contain MAIL_FILE
X-Mailer: reportbug 1.50
Date: Tue, 20 Aug 2002 11:56:15 +0200
Message-Id: <E17h5kF-0007fl-00@q.bofh.de>
Delivered-To: submit@bugs.debian.org

Package: login
Version: 20000902-12
Severity: normal

Hi!

Machine in question is Debian slink install from 1999, upgraded to
potato in 2000, and recently upgraded to woody. Now see:

[2/502]haber@paola:~$ ssh q
Linux q 2.4.19-coreserver #1 SMP Mon Aug 19 14:33:07 UTC 2002 i586 unknown
[1/500]mh@q:~$ echo $MAIL
~/below. ~/directory ~/.mail/mailbox
[2/500]mh@q:~$ grep MAIL /etc/login.defs
# Three items must be defined:  MAIL_DIR, ENV_SUPATH, and ENV_PATH.
#   home directory.  If you _do_ define both, MAIL_DIR takes precedence.
#   QMAIL_DIR is for Qmail (or any maildir-compatible MTA, such as Exim or
#   Essentially, MAIL_DIR defines the $MAIL environmental variable
#   (for mbox use) by appending the username to MAIL_DIR as defined
#   below. MAIL_FILE defines the $MA IL environment variable as the
#   directory before $MAIL_FILE, and QMAIL_DIR defines the MAIL
#   obtained by prepending the user home directory before $QMAIL_DIR.
# NOTE: This is used to setup your MAIL environment variable, and also
# in determining the $MAIL environmental variable.
#QMAIL_DIR      Maildir/
#MAIL_DIR        /var/mail
MAIL_FILE      .mail/mailbox
#MAIL_CHECK_ENAB
[3/501]mh@q:~$ logout
Connection to q.bofh.de closed.

Looks like the code that builds the MAIL environment variable does
indeed care about comment lines, using the second word in every line
containing the string MAIL_FILE to build the string assigned to the
environment variable MAIL.

For reference, with a modified /etc/login.defs - two strategically
placed spaces:
[3/502]haber@paola:~$ ssh q
Linux q 2.4.19-coreserver #1 SMP Mon Aug 19 14:33:07 UTC 2002 i586 unknown
[1/500]mh@q:~$ echo $MAIL
~/.mail/mailbox
[2/501]mh@q:~$ grep MAIL /etc/login.defs
# Three items must be defined:  MAIL_DIR, ENV_SUPATH, and ENV_PATH.
#   home directory.  If you _do_ define both, MAIL_DIR takes precedence.
#   QMAIL_DIR is for Qmail (or any maildir-compatible MTA, such as Exim or
#   Essentially, MAIL_DIR defines the $MAIL environmental variable
#   (for mbox use) by appending the username to MAIL_DIR as defined
#   below. MAIL_ FILE defines the $MAIL environment variable as the
#   directory before $MAIL_ FILE, and QMAIL_DIR defines the MAIL
#   obtained by prepending the user home directory before $QMAIL_DIR.
# NOTE: This is used to setup your MAIL environment variable, and also
# in determining the $MAIL environmental variable.
#QMAIL_DIR      Maildir/
#MAIL_DIR        /var/mail
MAIL_FILE      .mail/mailbox
#MAIL_CHECK_ENAB
[3/502]mh@q:~$ exit
logout
Connection to q.bofh.de closed.
[4/502]haber@paola:~$

This time, $MAIL is OK.

Please look into this really weird behavior.

On a fresh woody install, or on a potato installed, woody updated
machine, the setting of MAIL_FILE seems to be ignored, MAIL pointing
to /var/mail/$USER regardless of the settings in login.defs.

Greetings
Marc

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux q 2.4.19-coreserver #1 SMP Mon Aug 19 14:33:07 UTC 2002 i586
Locale: LANG=C, LC_CTYPE=de_DE

Versions of packages login depends on:
ii  libc6                         2.2.5-11.1 GNU C Library: Shared libraries an
ii  libpam-modules                0.72-35    Pluggable Authentication Modules f
ii  libpam0g                      0.72-35    Pluggable Authentication Modules l


---------------------------------------
Received: (at 157372-done) by bugs.debian.org; 14 Apr 2005 17:16:21 +0000
>From bubulle@kheops.frmug.org Thu Apr 14 10:16:21 2005
Return-path: <bubulle@kheops.frmug.org>
Received: from perrier.eu.org (kheops.perrier.eu.org) [81.56.227.253] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DM7wy-0006bC-00; Thu, 14 Apr 2005 10:16:21 -0700
Received: from localhost (localhost [127.0.0.1])
	by kheops.perrier.eu.org (Postfix) with ESMTP id 77A154F971
	for <157372-done@bugs.debian.org>; Thu, 14 Apr 2005 19:15:49 +0200 (CEST)
Received: from kheops.perrier.eu.org ([127.0.0.1])
	by localhost (kheops [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 31688-03 for <157372-done@bugs.debian.org>;
	Thu, 14 Apr 2005 19:15:48 +0200 (CEST)
Received: from mykerinos.kheops.frmug.org (mykerinos.kheops.frmug.org [192.168.1.3])
	by kheops.perrier.eu.org (Postfix) with ESMTP id 81CB64F89C
	for <157372-done@bugs.debian.org>; Thu, 14 Apr 2005 19:15:48 +0200 (CEST)
Received: by mykerinos.kheops.frmug.org (Postfix, from userid 7426)
	id 347A2232A1; Thu, 14 Apr 2005 18:34:53 +0200 (CEST)
Date: Thu, 14 Apr 2005 18:34:53 +0200
From: Christian Perrier <bubulle@debian.org>
To: 157372-done@bugs.debian.org
Subject: Closing this bug
Message-ID: <20050414163453.GG10252@mykerinos.kheops.frmug.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at kheops.frmug.org
Delivered-To: 157372-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

As announced one week ago, I find no real reason to keep this bug
report opened. If the issue comes up again, we prefer seeing another
bug opened.


--