#949075 Sample configuration file auto.smb cannot work; misuses $UID

Package:
autofs
Source:
autofs
Description:
kernel-based automounter for Linux
Submitter:
"D.J.S. Damerell"
Date:
2025-12-06 19:51:01 UTC
Severity:
normal
Tags:
#949075#5
Date:
2020-01-16 17:17:50 UTC
From:
To:
autofs includes a configuration file, /etc/auto.smb, which is intended to
be used for SMB/CIFS shares.

This confile makes use of $UID and $GID. Ordinarily in autofs these are
expanded to the UID and GID of the user who has caused a mount to be
attempted.

However, per "man 5 autofs":
       If a program map is used these standard environment variables will
have
       a prefix of "AUTOFS_" to prevent interpreted languages like python
from
       being able to load and execute arbitray code from a user home direc‐
       tory.

Since auto.smb is a program map, it should instead refer to $AUTOFS_UID
and $AUTOFS_GID.