#980117 mounts to polydirs not working

Package:
libpam-mount
Source:
libpam-mount
Description:
PAM module that can mount volumes for a user session
Submitter:
"Linde, Evan"
Date:
2022-07-07 09:36:03 UTC
Severity:
normal
#980117#5
Date:
2021-01-14 17:36:06 UTC
From:
To:
Pam_mount is failing to mount filesystems when the mount point is a polyinstantiated directory.

The problem is only when the polydir itself is used as a mountpoint; there is no problem using a subdirectory inside the polydir. (e.g. If "/data2" is defined as a polydir in /etc/security/pam_namespace.conf, pam_mount succeeds when using /data2/subdir as a mount point, but fails when using /data2 as the mount point.)

When the mount fails, lines like the following are logged by both systemd and login (with debugging enabled in pam_mount.conf.xml):

(mount.c:250): Mount info: globalconf, user=elinde <volume fstype="cifs" server="stor1" path="data" mountpoint="/data2" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="multiuser,cruid=elinde,sec=krb5,cifsacl" /> fstab=0 ssh=0

(mount.c:622): data already seems to be mounted at /data2, skipping

This bug doesn't exist in the upstream pam-mount project, but was introduced with the patch 0014-Don-t-compare-source-when-checking-if-it-s-already-m.patch starting in Debian's 2.16-4 release (made to address https://bugs.debian.org/799752 and similar issues with encrypted volumes). This bug is also reported for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libpam-mount/+bug/1908638

Evan Linde
Research Cyberinfrastructure Analyst
Oklahoma State University
High Performance Computing Center
405-744-1455
http://hpcc.okstate.edu/

#980117#10
Date:
2022-07-07 09:34:23 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
libpam-mount, which is due to be installed in the Debian FTP archive.

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

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 980117@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jochen Sprickerhof <jspricke@debian.org> (supplier of updated libpam-mount 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 07 Jul 2022 09:10:56 +0200
Source: libpam-mount
Architecture: source
Version: 2.19-1
Distribution: unstable
Urgency: medium
Maintainer: Jochen Sprickerhof <jspricke@debian.org>
Changed-By: Jochen Sprickerhof <jspricke@debian.org>
Closes: 980117
Changes:
 libpam-mount (2.19-1) unstable; urgency=medium
 .
   * Update upstream signing key
   * New upstream version 2.19
   * Update d/copyright
   * news file was renamed
   * Rebase patch
   * Restrict source mount check to ignore NFS and crypt (Closes: #980117)
   * Bump policy version (no changes)
Checksums-Sha1:
 830f009c24a314663edfb53aee65190b25108750 2177 libpam-mount_2.19-1.dsc
 6847d7c25a27b5475eef9d3e25601a328d4077ca 325116 libpam-mount_2.19.orig.tar.xz
 c2927591dc5a630d4b329abee2a6bfda6ce1fd2e 28792 libpam-mount_2.19-1.debian.tar.xz
 28dc9de69b596e868176cc8cb7ab28206ecb801d 6755 libpam-mount_2.19-1_source.buildinfo
Checksums-Sha256:
 595d3d19f7da75df40ae4de1923e63d2c3397d160a6d2943af2c0c6d8d4dafec 2177 libpam-mount_2.19-1.dsc
 6b6362b2758628eba9768eee4d934ee36ac0e343f0769f4cf7623fd809e0a60a 325116 libpam-mount_2.19.orig.tar.xz
 125ad9815f00979de542289cabe85b06efcde00875b225808682ed8262ace0a2 28792 libpam-mount_2.19-1.debian.tar.xz
 46cc3563c15531ff71c2fb6c2a3d208b65b63b3387813752d358aa359b8ea154 6755 libpam-mount_2.19-1_source.buildinfo
Files:
 bbc5bee01c437042c361585f95eb3262 2177 admin optional libpam-mount_2.19-1.dsc
 a2cb6596b619a1353a7f56c1f937dbc2 325116 admin optional libpam-mount_2.19.orig.tar.xz
 c125ac855c40742e52a3acc26de07a5d 28792 admin optional libpam-mount_2.19-1.debian.tar.xz
 8f0f8953d7c15fa259ead358f7fa9846 6755 admin optional libpam-mount_2.19-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmLGpM4ACgkQW//cwljm
lDMUjA//dBMeTL7zMk/IN+QdxjrpUE5LhclO4sb64+cTkX9J4VZR6Vd81lOGgf6f
jpgd9uwPtlPefmYpRaUU2oCP4jUDrKjfUwFgEw5reG6yWBOf4c33QeaOaEq8XvAP
85D+6DcgGO3ja3axI0LveVF1J9AtMlSAZtdYblgme8fygqSMKMkwKeOvB4E92egb
MONFVs1jP2IFF7ARWoSlpz92pQ5uAwW7DzsNQSXPITxQ9wt/c8I5WfjwS+wLhG1y
Xc2nIntaE4w1mYlhkuU8ZYZxNJl6HiFw7DxHEbdpEY7YiEZQNHNBgmN9Q7/wWr/s
YD42Xkbx/lXtBCPaZghpsF71V3dY1+Ebt86Hmcp7O0QsR68oet+0Fzltk4N/CbXb
5fwQJDq5U91ASpLJBc0gmE1XKN2EHMIQklhqCasWczb2fKttI5I+GypgXgWoHstT
orBL0K19zgPKuXHdggfXAo+P2kdIvz7MN6ts68vQ2ey23VnpVnbn6YdMDX5BWASO
ippnRc6kV1ixlJIzWFZnKnZIL2U0qBuMlI4HS/w2rTUsK9c8WSxDlwMtVugN7Sle
LmStB7jLe9LPWy75k+JffNZhm8mIcd992og63lDWEt8BUIFiCIdivhtdWNZwtmtk
RpbHslc40djKhbIbqsMfP6m7jt+Irk/x0RP03sqCPDWUtzdtYmM=
=tctc
-----END PGP SIGNATURE-----