Commit Graph

62 Commits

Author SHA1 Message Date
crees
abc2058c60 There is no way of escaping literal $ signs in auto_master(5), which
makes for difficulty with hidden Samba shares; shares with $ at the end
of their name.  This enables the use of ${DOLLAR} to work around this.

Reviewed by:		bcr (man page)
Approved by:		trasz
Differential Revision:	https://reviews.freebsd.org/D7048
2018-12-28 15:11:22 +00:00
trasz
275a387bfc Add the "autoro" flag to /media. This makes it attempt to mount
it read-only instead of just failing if the media is write-protected.

The /net doesn't seem to require the flag.

MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	DARPA, AFRL
2018-08-14 13:52:08 +00:00
brd
b924490594 Move autofs related configs to usr.sbin/autofs/
This is prep for pkgbase to have config files tagged as such.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16492
2018-08-04 22:41:17 +00:00
trasz
eea3157fa4 Add SPDX tags for automount(8) et al.
MFC after:	2 weeks
2018-01-24 16:39:02 +00:00
bdrewery
a598c4b809 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
bjk
9dda002f3d Fix mdoc typo in auto_master.5
There needs to be a space after the no-space macro in order for it
to be interpreted.

PR:		221986
Submitted by:	Paul Townsend <pt@zendware.com>
2017-09-01 22:04:45 +00:00
trasz
74f4f2e99d Revert r317804; apparently I forgot the auto_master syntax.
MFC after:	2 weeks
2017-05-04 19:55:32 +00:00
trasz
9bc2b16cd9 Make automount(8) error out when the map name is missing.
MFC after:	2 weeks
2017-05-04 19:41:19 +00:00
ngie
ba4a75dd95 usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-04 11:38:03 +00:00
imp
7e6cabd06e Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
trasz
8381908c9b Make autounmountd(8) not die when traced with "truss -p".
MFC after:	1 month
2016-11-02 08:12:37 +00:00
trasz
6add75fee1 Use proper argument order for calloc(3).
MFC after:	1 month
2016-09-14 11:20:58 +00:00
bapt
8204e4e32a Remove usage of _WITH_GETLINE from usr.sbin 2016-07-30 01:10:05 +00:00
trasz
aea1562f16 Add new unmount(2) flag, MNT_NONBUSY, to check whether there are
any open vnodes before proceeding. Make autounmound(8) use this flag.
Without it, even an unsuccessfull unmount causes filesystem flush,
which interferes with normal operation.

Reviewed by:	kib@
Approved by:	re (gjb@)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D7047
2016-07-07 09:03:57 +00:00
gjb
1dc4c40e3b MFH
Sponsored by:	The FreeBSD Foundation
2016-04-04 23:55:32 +00:00
trasz
d59afb0080 Use the log_errno value passed to the function instead of the errno global
variable.

Suggested by:	Daniel Braniss
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-15 11:03:45 +00:00
gjb
955ce29ea3 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
trasz
2cc7057f61 Autofs is section 5, not 4.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-02-29 17:14:04 +00:00
bdrewery
2a891f1feb DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
gjb
e0804a8146 Create a package for autofs(5)
Sponsored by:	The FreeBSD Foundation
2016-02-02 17:33:37 +00:00
trasz
efed0a7377 The <libutil.h> is an ordinary header file; should sort just like any other.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-01-24 18:11:36 +00:00
bdrewery
fe1ef27d4a META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
trasz
7d384a730d Add -noauto autofs map, for automatic handling of fstab entries
marked "noauto".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:44:46 +00:00
trasz
712aeceb14 Get executable direct maps to work.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:27:59 +00:00
trasz
29dcbee988 Rework the concat() algorithm to be correct in all cases.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 11:26:02 +00:00
trasz
e2d017a584 Make "automount -LL -o whatever" present options in the same order
as used by automountd(8).

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-12 12:36:08 +00:00
trasz
e47fa13bc5 Make concat() accept NULL arguments.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-12 12:17:15 +00:00
trasz
724f53c3cf Options from auto_master must be appended to options from maps,
not prepended.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-12 12:14:11 +00:00
trasz
bf5182c099 Fix typo.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 14:43:07 +00:00
trasz
09be0092bd Properly pass options for direct maps.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 12:25:05 +00:00
trasz
6892ebe639 Fix handling of direct maps, broken in r275756. Previously, running
automount(8) would unmount direct map trigger nodes every second time.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 11:59:33 +00:00
trasz
1970982572 Refactor.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 09:53:15 +00:00
trasz
69b4b7af49 Erm, revert chunk committed by mistake.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:44:36 +00:00
trasz
155cef1fdb Make things more readable; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:31:33 +00:00
trasz
9d17bb3d2b Remove some particularly bad code; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:20:12 +00:00
trasz
558260a403 Fix memory leak.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:21:00 +00:00
trasz
622e1a5d99 Improve separated_concat() to properly handle the case of concatenating
"/" and "/foo".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:00:59 +00:00
trasz
8822ff21ce Minor optimization/cleanup in node_path(); no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 11:59:58 +00:00
trasz
b7bb1dabe4 When there are no automounted filesystems, autounmountd(8) should wait
for filesystem event, instead of looping on a timeout.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-28 15:46:11 +00:00
trasz
e237531c72 Improve documentation for autofs variables and executable maps;
also some markup fixes.

Differential Revision:	https://reviews.freebsd.org/D1447
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-09 10:59:49 +00:00
trasz
cb41c48320 Fix bug that made automount(8) never unmount stale autofs(5) mounts,
ie mounts for entries that were there in auto_master(5), and then
got removed.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-12-14 10:49:22 +00:00
trasz
1660bc111a Fix spurious "child process X terminated with exit status 1" messages
from automountd(8).

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-12-14 10:37:17 +00:00
trasz
f60a4eae82 Fix markup.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-12-13 17:14:35 +00:00
trasz
5a2f0c0e00 Add "-media" autofs map, to access data on removable media, such as CD
drives or flash keys.  It can be enabled by uncommenting a single entry
in default /etc/auto_master.  It can also be easily modified to use
fuse-based filesystems instead of in-kernel ones.

There is still one deficiency - the mountpoints are permanent, they
don't disappear when user removes the media.  Fixing it needs some
autofs changes.

Differential Revision:	https://reviews.freebsd.org/D1210
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-12-10 14:36:44 +00:00
bapt
a191ba5195 Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
trasz
4afc5ee040 Implement "automount -c".
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-22 16:48:29 +00:00
trasz
706c90c174 Document use of wildcards (*) and ampersands (&) in autofs map files.
Differential Revision:	https://reviews.freebsd.org/D1199
Reviewed by:	wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-21 15:49:41 +00:00
trasz
b7c06fbbb5 Make the auto_master(5) man page clearer on how auto_master
and map files work together, and add example for smbfs.

Differential Revision:	https://reviews.freebsd.org/D1184
Reviewed by:	wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-19 19:46:58 +00:00
trasz
e5d03fbe91 The "intr" option is NFS-specific; fix examples in auto_master(5).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-17 12:36:01 +00:00
trasz
8859689d4d Fix automountd(8) not to leave zombies.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-16 08:33:04 +00:00