autofs: Port autofs from FreeBSD
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 18 May 2016 08:01:32 +0000 (17:01 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 2 Jun 2016 23:30:56 +0000 (08:30 +0900)
commite2950f411cf734644d0586c7ed409af918988d76
treeee5b3ccae6ac04cb65cfef30173ba77c8296063f
parent551c4c362a7f8c4ae74e04ff6405c1b9eea40751
autofs: Port autofs from FreeBSD

Brought in basically from
FreeBSD@GitHub cac9beab7d53f0c37ce2a2a1b893be59028928f4
with lots of changes.
Note that this commit isn't necessarily 1:1 with above commit.

Kernel code is basically a rewrite based on the FreeBSD code.
Userspace is basically 1:1 with FreeBSD except that lots of small
changes (including related commits listed below) were necessary.
This is due to autofs being dependent on FreeBSD specific interface,
command options and such.

For userspace, note that non-functional stuff (e.g. whitespace
warnings via git am) are intentionally left to be 1:1 with FreeBSD.
Userspace is basically portable, so don't try to obfuscate the real
changes made for DragonFly by fixing these for now till things are
considered stable unless it's a bug from FreeBSD.

Summary of newly added or modified files.
- sys/vfs/autofs - autofs filesystem
- usr.sbin/autofs - autofs userspace command and daemons
- etc/ - configuration files and manpages
- others - changes in misc subsystems (not independent of autofs)

Related DragonFly commits.
- usr.sbin/autofs: Workaround namecache bug after unmount
- sys/kern: Don't implement .vfs_sync unless sync is supported
- user.sbin/fstyp: Port fstyp from FreeBSD
- sys/kern: Retry nlookup if nresolve returned ESTALE
- sys/sys: Fix IOCPARM_MAX
- sys/sys: Extend IOCPARM_MAX
- usr.bin/showmount: Add -E option
- sbin/mount_nfs: Add -o retrycnt= option
- sys/kern: Add kqueue EVFILT_FS
- sys/kern: Add kstrndup()

Related DragonFly PRs.
- https://bugs.dragonflybsd.org/issues/2900
- https://bugs.dragonflybsd.org/issues/2901
- https://bugs.dragonflybsd.org/issues/2905
- https://bugs.dragonflybsd.org/issues/2907
- https://bugs.dragonflybsd.org/issues/2908
- https://bugs.dragonflybsd.org/issues/2909
- https://bugs.dragonflybsd.org/issues/2912
- https://bugs.dragonflybsd.org/issues/2913
- https://bugs.dragonflybsd.org/issues/2914

Other related resource.
- http://lists.dragonflybsd.org/pipermail/users/2016-May/thread.html#249556
- http://lists.dragonflybsd.org/pipermail/users/2016-June/thread.html#249680
- https://www.dragonflydigest.com/2016/05/06/18066.html
51 files changed:
etc/Makefile
etc/auto_master [new file with mode: 0644]
etc/autofs/Makefile [new file with mode: 0644]
etc/autofs/include_ldap [new file with mode: 0644]
etc/autofs/special_hosts [new file with mode: 0644]
etc/autofs/special_media [new file with mode: 0755]
etc/autofs/special_noauto [new file with mode: 0755]
etc/autofs/special_null [new file with mode: 0644]
etc/defaults/rc.conf
etc/mtree/BSD.include.dist
etc/rc.d/Makefile
etc/rc.d/automount [new file with mode: 0644]
etc/rc.d/automountd [new file with mode: 0644]
etc/rc.d/autounmountd [new file with mode: 0644]
include/Makefile
include/mntopts.h
sbin/mount/mount.8
sbin/mountd/mountd.c
share/man/man5/Makefile
share/man/man5/autofs.5 [new file with mode: 0644]
share/man/man5/rc.conf.5
share/man/man7/hier.7
sys/conf/files
sys/conf/options
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/sys/mount.h
sys/sys/vfscache.h
sys/vfs/Makefile
sys/vfs/autofs/Makefile [new file with mode: 0644]
sys/vfs/autofs/autofs.c [new file with mode: 0644]
sys/vfs/autofs/autofs.h [new file with mode: 0644]
sys/vfs/autofs/autofs_ioctl.h [new file with mode: 0644]
sys/vfs/autofs/autofs_mount.h [new file with mode: 0644]
sys/vfs/autofs/autofs_vfsops.c [new file with mode: 0644]
sys/vfs/autofs/autofs_vnops.c [new file with mode: 0644]
usr.sbin/Makefile
usr.sbin/autofs/Makefile [new file with mode: 0644]
usr.sbin/autofs/auto_master.5 [new file with mode: 0644]
usr.sbin/autofs/automount.8 [new file with mode: 0644]
usr.sbin/autofs/automount.c [new file with mode: 0644]
usr.sbin/autofs/automountd.8 [new file with mode: 0644]
usr.sbin/autofs/automountd.c [new file with mode: 0644]
usr.sbin/autofs/autounmountd.8 [new file with mode: 0644]
usr.sbin/autofs/autounmountd.c [new file with mode: 0644]
usr.sbin/autofs/common.c [new file with mode: 0644]
usr.sbin/autofs/common.h [new file with mode: 0644]
usr.sbin/autofs/defined.c [new file with mode: 0644]
usr.sbin/autofs/log.c [new file with mode: 0644]
usr.sbin/autofs/popen.c [new file with mode: 0644]
usr.sbin/autofs/token.l [new file with mode: 0644]