Bug 192862

Summary: automountd(8) doesn't create subdirectories when browsing a special map
Product: Base System Reporter: Jan Beich <jbeich>
Component: binAssignee: Edward Tomasz Napierala <trasz>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Jan Beich freebsd_committer freebsd_triage 2014-08-20 18:29:14 UTC
Trying to debug custom-created I've noticed that browsing /net to discover hosts with exports never works. One has to know hostnames beforehand. However, /etc/special_hosts when run without arguments enumerates available hosts.

$ cat /etc/auto_master
/net		-hosts		-nosuid

$ automountd -d
automountd: waiting for request from the kernel
automountd: not forking due to -d flag; will exit after servicing a single request
automountd: got request 2: from map -hosts, path /net/, prefix "/net", key "", options "nosuid"
automountd: parsing map "-hosts"
automountd: skipping map -hosts due to forced -nobrowse
automountd: found node defined at [kernel request]:0; not a mountpoint
automountd: creating subtree at /net
automountd: completing request 2 with error 0

$ ls /net
<EMPTY>

$ /etc/autofs/special_hosts
localhost

$ /etc/autofs/special_hosts localhost
/p      localhost:/p

$ ls /net/localhost
mydir

$ ls /net
localhost
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-08-23 12:01:47 UTC
A commit references this bug:

Author: trasz
Date: Sat Aug 23 12:00:46 UTC 2014
New revision: 270406
URL: http://svnweb.freebsd.org/changeset/base/270406

Log:
  Add "nobrowse" option.  Previously automountd(8) always behaved as if
  it was set, now it's conditional.

  PR:		192862
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/etc/auto_master
  head/usr.sbin/autofs/auto_master.5
  head/usr.sbin/autofs/automountd.c
  head/usr.sbin/autofs/common.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-08-31 21:56:08 UTC
A commit references this bug:

Author: trasz
Date: Sun Aug 31 21:55:09 UTC 2014
New revision: 270902
URL: http://svnweb.freebsd.org/changeset/base/270902

Log:
  MFC r270406:

  Add "nobrowse" option.  Previously automountd(8) always behaved as if
  it was set, now it's conditional.

  PR:		192862
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/10/
  stable/10/etc/auto_master
  stable/10/usr.sbin/autofs/auto_master.5
  stable/10/usr.sbin/autofs/automountd.c
  stable/10/usr.sbin/autofs/common.c