aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs/autounmountd.c
Commit message (Collapse)AuthorAgeFilesLines
* autofs: best effort to maintain mounttab and mountdtabRobert Wing2021-03-121-1/+2
| | | | | | | | | | | | 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
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-281-1/+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
* 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
* Add SPDX tags for automount(8) et al.Edward Tomasz Napierala2018-01-241-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=328338
* 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-141-1/+1
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=305805
* 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
* The <libutil.h> is an ordinary header file; should sort just like any other.Edward Tomasz Napierala2016-01-241-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=294670
* 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
* Use __FBSDID() properly.Edward Tomasz Napierala2014-08-211-1/+3
| | | | | | | | | Suggested by: pluknet@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270276
* Remove useless - and buggy, it resulted in spurious warnings in logs - code.Edward Tomasz Napierala2014-08-201-12/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270210
* Bring in the new automounter, similar to what's provided in most otherEdward Tomasz Napierala2014-08-171-0/+351
UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270096