pmt_already_mounted() broken when server="nfs"
Brought to you by:
jengelh
I reported this issue to Debian, but because pam_mount is unmaintained there,
nobody forwarded it on to you. So I'm doing so now.
https://bugs.debian.org/799752
Full details are on that page, but the key point is this:
If pam_mount.conf.xml has
<volume fstype="nfs" server="nfs" path="~" mountpoint="~" options="...">
then "already mounted?" fails because it compares nfs:/home/prisoners/p to /home/prisoners/p.
pmt_already_mounted() is also broken for fuse file systems.
Compares e.g. "sshfs#username@server" to "username@server"
Wonder if it wouldn't be better to simplify the check to only check if "mountpoint" is mounted, and not compare "path".
I can extend this comment today that the same problem exists for
bindmounts: since the entry includes the block device and not the source path, the comparison fails and pam_mount will end up over-mounting the bind mount.