Bug 246496 - automount: erroneously creates mount point hierarchy in current directory
Summary: automount: erroneously creates mount point hierarchy in current directory
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-16 08:07 UTC by Martin Birgmeier
Modified: 2020-05-19 18:51 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2020-05-16 08:07:54 UTC
Scenario:
- running FreeBSD 12.1-RELEASE-p5 #5 r361008M
- rc.conf contains autofs_enable="YES"
- automountd and autounmountd are running
- /etc/auto_master is changed to contain additional hierarchies to be added
- these hierarchies reference the same /etc/auto_* files as those enabled so far, albeit to be mounted at different locations
- Specifically:

/auto/backup                    auto_backup
/auto/multimedia                auto_multimedia
/auto/netspace                  auto_netspace
/auto/srcs                      auto_srcs
/auto/system                    auto_system
/auto/users                     auto_users
/auto/vdisks                    auto_vdisks
/auto/z                         auto_z

#C /d/rpi-b/auto/backup         auto_backup
#C /d/rpi-b/auto/multimedia     auto_multimedia
#C /d/rpi-b/auto/netspace               auto_netspace
#C /d/rpi-b/auto/srcs           auto_srcs
#C /d/rpi-b/auto/system         auto_system
#C /d/rpi-b/auto/users          auto_users
#C /d/rpi-b/auto/vdisks         auto_vdisks
#C /d/rpi-b/auto/z                      auto_z

- First, the leading '#C ' is removed, and then automount is called to re-scan the modified auto_master

Result:
- In the directory where automount is being run, the mount hierarchy is created
- Example (run in root's home dir):

[0]# du ~root
[...]
4       /root/d/rpi-b/auto/backup
4       /root/d/rpi-b/auto/multimedia
4       /root/d/rpi-b/auto/netspace
4       /root/d/rpi-b/auto/srcs
4       /root/d/rpi-b/auto/system
4       /root/d/rpi-b/auto/users
4       /root/d/rpi-b/auto/vdisks
4       /root/d/rpi-b/auto/z
36      /root/d/rpi-b/auto
40      /root/d/rpi-b
124     /root/d
[...]
[0]# 

Expected result:
- If at all, this hierarchy should be created in /d/rpi-b, not in /root/d/rpi-b. Note: the hierarchy in /d/rpi-b is created (later?) anyway (when directories are actually mounted?).

-- Martin