aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs
Commit message (Collapse)AuthorAgeFilesLines
* autofs: best effort to maintain mounttab and mountdtabRobert Wing2021-03-124-1/+18
| | | | | | | | | | | | When an automounted filesystem is successfully unmounted, call rpc.umntall(8) with the -k flag. rpc.umntall(8) is used to clean up /var/db/mounttab on the client and /var/db/mountdtab on the server. This is only useful for NFSv3. PR: 251906 Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D27801
* autounmountd: set filter-specific flags for the EVFILT_FS filterRobert Wing2021-03-021-1/+1
| | | | | | | | | | | Set the filter-specific flags VQ_MOUNT and VQ_UNMOUNT for the EVFILT_FS filter. The filter-specific flags for the EVFILT_FS filter are undocumented, but their usage can be found by looking up vfs_event_signal(). Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D28975
* automount(8): fix absolute path when creating a mountpointRobert Wing2021-02-171-1/+1
| | | | | | | | | | | | | | | When executing automount(8), it will attempt to create the directory where an autofs filesystem is to be mounted. Explicity set the root path for this directory to "/". This fixes the issue where the directory being created was being treated as a relative path instead of an absolute path (as expected). PR: 224601 Reported by: kusumi.tomohiro@gmail.com Reviewed by: trasz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27832
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-2812-12/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Deduplicate fsid comparisonsRyan Moeller2020-05-211-2/+1
| | | | | | | | | | | | | | | | Comparing fsid_t objects requires internal knowledge of the fsid structure and yet this is duplicated across a number of places in the code. Simplify by creating a fsidcmp function (macro). Reviewed by: mjg, rmacklem Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D24749 Notes: svn path=/head/; revision=361313
* Stop hardcoding WARNS in automount(8) et al.Edward Tomasz Napierala2020-04-011-2/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA Notes: svn path=/head/; revision=359507
* autofs: Fix autounmountd's printing of mount time.Justin Hibbits2019-08-091-2/+2
| | | | | | | | | | time_t should be printed as intmax_t. Even though duration should be short, the correct way to print is intmax_t, not long. Reported by: ian,imp Notes: svn path=/head/; revision=350814
* Change autounmountd(8) to use time_t for duration instead of doubleJustin Hibbits2019-08-081-17/+18
| | | | | | | | | | | | | | | | | | | | | | Summary: autounmountd(8) uses doubles to handle mount time durations. However, it must convert to integer types, time_t in particular, to do anything meaningful. Additionally, even though it's a floating-point value in seconds, the sub-seconds component is never used, so it's unnecessary. Switching type to time_t fixes an assertion on powerpc64, which checks that a sleep value that's not -1.0 is greater than 0. On powerpc64, it happens that the value of -1.0 gets loaded as a float (perhaps a bug in gcc), but gets compared to a double. This compares as false, so follows through the 'sleep != -1.0' path, and fails the assert. Since the sub-second component isn't used in the double, just drop it and deal with whole-integer seconds. Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D21109 Notes: svn path=/head/; revision=350737
* Fix segfault that could occur on "automount -LL".Edward Tomasz Napierala2019-04-101-1/+3
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=346086
* There is no way of escaping literal $ signs in auto_master(5), whichChris Rees2018-12-282-1/+4
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=342573
* Add the "autoro" flag to /media. This makes it attempt to mountEdward Tomasz Napierala2018-08-141-1/+1
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=337749
* Move autofs related configs to usr.sbin/autofs/Brad Davis2018-08-0410-0/+462
| | | | | | | | | | This is prep for pkgbase to have config files tagged as such. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16492 Notes: svn path=/head/; revision=337340
* Add SPDX tags for automount(8) et al.Edward Tomasz Napierala2018-01-249-0/+18
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=328338
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Fix mdoc typo in auto_master.5Benjamin Kaduk2017-09-011-1/+1
| | | | | | | | | | | 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> Notes: svn path=/head/; revision=323122
* Revert r317804; apparently I forgot the auto_master syntax.Edward Tomasz Napierala2017-05-041-5/+0
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=317805
* Make automount(8) error out when the map name is missing.Edward Tomasz Napierala2017-05-041-0/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=317804
* usr.sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-2/+2
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314659
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=314436
* Make autounmountd(8) not die when traced with "truss -p".Edward Tomasz Napierala2016-11-021-1/+4
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=308206
* Use proper argument order for calloc(3).Edward Tomasz Napierala2016-09-143-3/+3
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=305805
* Remove usage of _WITH_GETLINE from usr.sbinBaptiste Daroussin2016-07-301-1/+0
| | | | Notes: svn path=/head/; revision=303527
* Add new unmount(2) flag, MNT_NONBUSY, to check whether there areEdward Tomasz Napierala2016-07-071-1/+1
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=302388
* MFHGlen Barber2016-04-041-6/+9
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297567
| * Use the log_errno value passed to the function instead of the errno globalEdward Tomasz Napierala2016-03-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | variable. Suggested by: Daniel Braniss MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296897
* | MFHGlen Barber2016-03-022-3/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * Autofs is section 5, not 4.Edward Tomasz Napierala2016-02-291-1/+1
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296197
| * DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=295989
* | Create a package for autofs(5)Glen Barber2016-02-021-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295156
* The <libutil.h> is an ordinary header file; should sort just like any other.Edward Tomasz Napierala2016-01-245-9/+5
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=294670
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-011-0/+21
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=291563
* Add -noauto autofs map, for automatic handling of fstab entriesEdward Tomasz Napierala2015-03-131-1/+6
| | | | | | | | | | marked "noauto". MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279955
* Get executable direct maps to work.Edward Tomasz Napierala2015-03-131-10/+23
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279954
* Rework the concat() algorithm to be correct in all cases.Edward Tomasz Napierala2015-03-131-7/+16
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279953
* Make "automount -LL -o whatever" present options in the same orderEdward Tomasz Napierala2015-03-123-9/+16
| | | | | | | | | | as used by automountd(8). MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279916
* Make concat() accept NULL arguments.Edward Tomasz Napierala2015-03-123-17/+8
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279915
* Options from auto_master must be appended to options from maps,Edward Tomasz Napierala2015-03-121-1/+5
| | | | | | | | | | not prepended. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279914
* Fix typo.Edward Tomasz Napierala2015-03-101-2/+2
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279851
* Properly pass options for direct maps.Edward Tomasz Napierala2015-03-102-27/+18
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279846
* Fix handling of direct maps, broken in r275756. Previously, runningEdward Tomasz Napierala2015-03-101-17/+25
| | | | | | | | | | automount(8) would unmount direct map trigger nodes every second time. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279845
* Refactor.Edward Tomasz Napierala2015-03-101-9/+14
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279843
* Erm, revert chunk committed by mistake.Edward Tomasz Napierala2015-03-091-5/+0
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279815
* Make things more readable; no functional changes.Edward Tomasz Napierala2015-03-095-22/+16
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279813
* Remove some particularly bad code; no functional changes.Edward Tomasz Napierala2015-03-092-43/+11
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279812
* Fix memory leak.Edward Tomasz Napierala2015-03-091-2/+4
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279808
* Improve separated_concat() to properly handle the case of concatenatingEdward Tomasz Napierala2015-03-091-2/+8
| | | | | | | | | | "/" and "/foo". MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279807
* Minor optimization/cleanup in node_path(); no functional changes.Edward Tomasz Napierala2015-03-091-10/+12
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279806
* When there are no automounted filesystems, autounmountd(8) should waitEdward Tomasz Napierala2015-01-281-13/+23
| | | | | | | | | | for filesystem event, instead of looping on a timeout. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=277834
* Improve documentation for autofs variables and executable maps;Edward Tomasz Napierala2015-01-091-3/+58
| | | | | | | | | | | also some markup fixes. Differential Revision: https://reviews.freebsd.org/D1447 MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=276883
* Fix bug that made automount(8) never unmount stale autofs(5) mounts,Edward Tomasz Napierala2014-12-141-3/+14
| | | | | | | | | | | ie mounts for entries that were there in auto_master(5), and then got removed. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=275756