Bug#189920: marked as done (ssh: MAIL not set according to /etc/login.defs)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug#189920: marked as done (ssh: MAIL not set according to /etc/login.defs)

Debian Bug Tracking System
Your message dated Mon, 08 Jul 2019 16:49:16 +0000
with message-id <[hidden email]>
and subject line Bug#189920: fixed in openssh 1:8.0p1-3
has caused the Debian Bug report #189920,
regarding ssh: MAIL not set according to /etc/login.defs
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [hidden email]

189920: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=189920
Debian Bug Tracking System
Contact [hidden email] with problems

Package: ssh
Version: 1:3.4p1-4
Severity: normal

When I login through SSH my MAIL environment variable is set to
"/var/mail/uid0", which is not how it's supposed to be set.  It's
supposed to be set to "/home/uid0/Maildir/".

Here is me logging in and showing the variable:
uid0@nova:~$ ssh geek
Linux geek 2.4.20-1-586tsc #1 Sat Mar 22 12:35:27 EST 2003 i586 unknown unknown GNU/Linux
No mail.
uid0@geek:~$ echo $MAIL

Here is the relevant line from my /etc/login.defs file:
MAIL_FILE      Maildir/

Here is the environment variable working correctly after I use the su
command (I don't know why it works in su but not ssh):
uid0@geek:~$ su -
root@geek:~# su - uid0
uid0@geek:~$ echo $MAIL

SSH should use the /etc/login.defs file to determine how to set the MAIL
variable instead of using what appears to be the hardcoded
$maildir/$username idea.  The code that sets the MAIL environment
variable is in the session.c file starting at line 1000.

A workaround is to change a line in the /etc/pam.d/ssh file from:
session    optional     pam_mail.so standard noenv # [1]
session    optional     pam_mail.so standard dir=~/Maildir/ # [1]

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux geek 2.4.20-1-586tsc #1 Sat Mar 22 12:35:27 EST 2003 i586

Versions of packages ssh depends on:
ii  adduser                     3.49         Add and remove users and groups
ii  debconf                     1.2.34       Debian configuration management sy
ii  libc6                       2.3.1-16     GNU C Library: Shared libraries an
ii  libpam-modules              0.76-9       Pluggable Authentication Modules f
ii  libpam0g                    0.76-9       Pluggable Authentication Modules l
ii  libssl0.9.6                 0.9.6i-1     SSL shared libraries (old version)
ii  libwrap0                    7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii  zlib1g                      1:1.1.4-11   compression library - runtime

Source: openssh
Source-Version: 1:8.0p1-3

We believe that the bug you reported is fixed in the latest version of
openssh, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [hidden email],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Colin Watson <[hidden email]> (supplier of updated openssh package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [hidden email])

Hash: SHA256

Format: 1.8
Date: Mon, 08 Jul 2019 17:19:37 +0100
Source: openssh
Architecture: source
Version: 1:8.0p1-3
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenSSH Maintainers <[hidden email]>
Changed-By: Colin Watson <[hidden email]>
Closes: 189920 374980 532754 927792
 openssh (1:8.0p1-3) unstable; urgency=medium
   * Upload to unstable.
 openssh (1:8.0p1-2) experimental; urgency=medium
   * Fix interop tests for recent regress changes.
 openssh (1:8.0p1-1) experimental; urgency=medium
   * New upstream release (https://www.openssh.com/txt/release-8.0, closes:
     - ssh(1), ssh-agent(1), ssh-add(1): Add support for ECDSA keys in
       PKCS#11 tokens (LP: #1665695).
     - ssh(1), sshd(8): Add experimental quantum-computing resistant key
       exchange method, based on a combination of Streamlined NTRU Prime
       4591^761 and X25519.
     - ssh-keygen(1): Increase the default RSA key size to 3072 bits,
       following NIST Special Publication 800-57's guidance for a 128-bit
       equivalent symmetric security level (LP: #1445625).
     - ssh(1): Allow "PKCS11Provider=none" to override later instances of the
       PKCS11Provider directive in ssh_config.
     - sshd(8): Add a log message for situations where a connection is
       dropped for attempting to run a command but a sshd_config
       ForceCommand=internal-sftp restriction is in effect.
     - ssh(1): When prompting whether to record a new host key, accept the
       key fingerprint as a synonym for "yes".  This allows the user to paste
       a fingerprint obtained out of band at the prompt and have the client
       do the comparison for you.
     - ssh-keygen(1): When signing multiple certificates on a single
       command-line invocation, allow automatically incrementing the
       certificate serial number.
     - scp(1), sftp(1): Accept -J option as an alias to ProxyJump on the scp
       and sftp command-lines.
     - ssh-agent(1), ssh-pkcs11-helper(8), ssh-add(1): Accept "-v"
       command-line flags to increase the verbosity of output; pass verbose
       flags though to subprocesses, such as ssh-pkcs11-helper started from
     - ssh-add(1): Add a "-T" option to allowing testing whether keys in an
       agent are usable by performing a signature and a verification.
     - sftp-server(8): Add a "[hidden email]" protocol extension that
       replicates the functionality of the existing SSH2_FXP_SETSTAT
       operation but does not follow symlinks.
     - sftp(1): Add "-h" flag to chown/chgrp/chmod commands to request they
       do not follow symlinks.
     - sshd(8): Expose $SSH_CONNECTION in the PAM environment.  This makes
       the connection 4-tuple available to PAM modules that wish to use it in
     - sshd(8): Add a ssh_config "Match final" predicate.  Matches in same
       pass as "Match canonical" but doesn't require hostname
       canonicalisation be enabled.
     - sftp(1): Support a prefix of '@' to suppress echo of sftp batch
     - ssh-keygen(1): When printing certificate contents using "ssh-keygen
       -Lf /path/certificate", include the algorithm that the CA used to sign
       the cert.
     - sshd(8): Fix authentication failures when sshd_config contains
       "AuthenticationMethods any" inside a Match block that overrides a more
       restrictive default.
     - sshd(8): Avoid sending duplicate keepalives when ClientAliveCount is
     - sshd(8): Fix two race conditions related to SIGHUP daemon restart.
       Remnant file descriptors in recently-forked child processes could
       block the parent sshd's attempt to listen(2) to the configured
       addresses.  Also, the restarting parent sshd could exit before any
       child processes that were awaiting their re-execution state had
       completed reading it, leaving them in a fallback path.
     - ssh(1): Fix stdout potentially being redirected to /dev/null when
       ProxyCommand=- was in use.
     - sshd(8): Avoid sending SIGPIPE to child processes if they attempt to
       write to stderr after their parent processes have exited.
     - ssh(1): Fix bad interaction between the ssh_config ConnectTimeout and
       ConnectionAttempts directives - connection attempts after the first
       were ignoring the requested timeout (LP: #1798049).
     - ssh-keyscan(1): Return a non-zero exit status if no keys were found
       (closes: #374980, LP: #1661745).
     - scp(1): Sanitize scp filenames to allow UTF-8 characters without
       terminal control sequences.
     - sshd(8): Fix confusion between ClientAliveInterval and time-based
       RekeyLimit that could cause connections to be incorrectly closed.
     - ssh(1), ssh-add(1): Correct some bugs in PKCS#11 token PIN handling at
       initial token login.  The attempt to read the PIN could be skipped in
       some cases, particularly on devices with integrated PIN readers.  This
       would lead to an inability to retrieve keys from these tokens.
     - ssh(1), ssh-add(1): Support keys on PKCS#11 tokens that set the
       CKA_ALWAYS_AUTHENTICATE flag by requring a fresh login after the
       C_SignInit operation.
     - ssh(1): Improve documentation for ProxyJump/-J, clarifying that local
       configuration does not apply to jump hosts.
     - ssh-keygen(1): Clarify manual - ssh-keygen -e only writes public keys,
       not private.
     - ssh(1), sshd(8): be more strict in processing protocol banners,
       allowing \r characters only immediately before \n.
     - Various: fix a number of memory leaks.
     - scp(1), sftp(1): fix calculation of initial bandwidth limits.  Account
       for bytes written before the timer starts and adjust the schedule on
       which recalculations are performed.  Avoids an initial burst of
       traffic and yields more accurate bandwidth limits.
     - sshd(8): Only consider the ext-info-c extension during the initial key
       eschange.  It shouldn't be sent in subsequent ones, but if it is
       present we should ignore it.  This prevents sshd from sending a
       SSH_MSG_EXT_INFO for REKEX for these buggy clients.
     - ssh-keygen(1): Clarify manual that ssh-keygen -F (find host in
       authorized_keys) and -R (remove host from authorized_keys) options may
       accept either a bare hostname or a [hostname]:port combo.
     - ssh(1): Don't attempt to connect to empty SSH_AUTH_SOCK.
     - sshd(8): Silence error messages when sshd fails to load some of the
       default host keys.  Failure to load an explicitly-configured hostkey
       is still an error, and failure to load any host key is still fatal.
     - ssh(1): Redirect stderr of ProxyCommands to /dev/null when ssh is
       started with ControlPersist; prevents random ProxyCommand output from
       interfering with session output.
     - ssh(1): The ssh client was keeping a redundant ssh-agent socket
       (leftover from authentication) around for the life of the connection.
     - sshd(8): Fix bug in HostbasedAcceptedKeyTypes and
       PubkeyAcceptedKeyTypes options.  If only RSA-SHA2 signature types were
       specified, then authentication would always fail for RSA keys as the
       monitor checks only the base key (not the signature algorithm) type
       against *AcceptedKeyTypes.
     - ssh(1): Request correct signature types from ssh-agent when
       certificate keys and RSA-SHA2 signatures are in use.
     - sshd(8): Don't set $MAIL if UsePAM=yes as PAM typically specifies the
       user environment if it's enabled (closes: #189920, #532754).
   * Mostly resynced GSSAPI key exchange patch with Fedora.  Major changes:
     - Support selection of GSSAPI key exchange algorithms.
     - Support GSSAPI key exchange methods with DH and SHA2.
     - Support GSSAPI key exchange using ECDH and SHA2.
     - Make sure the Kerberos tickets are cleaned up with the user context.
     - Enable gssapi-keyex authentication without gssapi-with-mic.
     - Allow querying for GSSAPI key exchange algorithms from ssh (-Q
   * Apply upstream patch to fix the utimensat regression tests when not
     using the compatibility implementation.
 14036aa8fc98107e51086b5f50a97c397b7e9e69 3276 openssh_8.0p1-3.dsc
 0fc865a1c75e164a362549a68e872faf58d0c1c2 171024 openssh_8.0p1-3.debian.tar.xz
 77065cc948b4984a828a16173bfb8f085f6d7afaed936652a31257aa32bc4887 3276 openssh_8.0p1-3.dsc
 7e1f34adbc3d75847edc5f9ce11a7a9f8257c8926f00545cc188bd6433214fe5 171024 openssh_8.0p1-3.debian.tar.xz
 dc309d7f172333965b52cf10c94102f0 3276 net standard openssh_8.0p1-3.dsc
 52e90cfce82725c5e79bdea9513040ca 171024 net standard openssh_8.0p1-3.debian.tar.xz