Package: autofs
Version: 5.1.2-3
Severity: normal

Bug filed against Ubuntu, also affects Debian:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1754506

Upstream patch:
https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git/commit/?id=37dd05dd1bccdedc4157902420e1da506b2bf35f

A trailing slash in /etc/auto.master causes the mounted share to always
appear busy and never be unmounted.

To reproduce:

apt install cifs-utils smbclient autofs

Add this to /etc/auto.master:

# trailing slash in /cifs is what triggers the bug
/cifs/ /etc/auto.smb --timeout=30

Restart autofs:
sudo systemctl restart autofs

Assuming "cifs-server" is a valid CIFS server dns name, and "pub" is a
valid share, navigate to it:

cd /cifs/cifs-server/pub
ls

Navigate away:
cd /

Confirm cifs is mounted:
mount -t cifs

After 30s pass, it will still be mounted.

If instead you use "/cifs /etc/auto.smb --timeout=30" (without the ending
slash in /cifs) in /etc/auto.master, then it works.

The upstream patch fixes this issue.

Reply via email to