Merge branch 'freebsd/current/main' into hardened/current/master

This commit is contained in:
HardenedBSD Sync Services 2023-11-24 06:01:37 -07:00
commit 0ad10210a7
No known key found for this signature in database
6 changed files with 19 additions and 14 deletions

View File

@ -11,6 +11,11 @@ DEVDDIR= /etc/devd
DEVD+= asus.conf
.endif
CONFGROUPS+= AUTOFS
AUTOFSDIR= ${DEVDDIR}
AUTOFS+= autofs.conf
AUTOFSPACKAGE= autofs
CONFGROUPS+= DHCLIENT
DHCLIENTDIR= ${DEVDDIR}
DHCLIENT+= dhclient.conf

9
sbin/devd/autofs.conf Normal file
View File

@ -0,0 +1,9 @@
#
# autofs(5) specific devd events
# Discard autofs caches, useful for the -media special map.
notify 100 {
match "system" "GEOM";
match "subsystem" "DEV";
action "/usr/sbin/automount -c";
};

View File

@ -136,13 +136,6 @@ notify 0 {
action "service postgresql restart";
};
# Discard autofs caches, useful for the -media special map.
notify 100 {
match "system" "GEOM";
match "subsystem" "DEV";
action "/usr/sbin/automount -c";
};
# Handle userland coredumps.
# This commented out handler makes it possible to run an
# automated debugging session after the core dump is generated.

View File

@ -34,7 +34,7 @@
#define _SYS_MUTEX_H_
#include <sys/queue.h>
#include <sys/_lock.h>
#include <sys/lock.h>
#include <sys/_mutex.h>
#ifdef _KERNEL

View File

@ -2,7 +2,5 @@
# Automounter master map, see auto_master(5) for details.
#
/net -hosts -nobrowse,nosuid,intr
# When using the -media special map, make sure to edit devd.conf(5)
# to move the call to "automount -c" out of the comments section.
#/media -media -nosuid,noatime,autoro
#/- -noauto

View File

@ -40,7 +40,7 @@ print_map_entry() {
case "${_fstype}" in
"exfat")
if [ -f "/usr/local/sbin/mount.exfat" ]; then
echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}"
echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype} :/dev/${_p}"
else
/usr/bin/logger -p info -t "special_media[$$]" \
"Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first"
@ -49,7 +49,7 @@ print_map_entry() {
;;
"ntfs")
if [ -f "/usr/local/bin/ntfs-3g" ]; then
echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}"
echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype} :/dev/${_p}"
else
/usr/bin/logger -p info -t "special_media[$$]" \
"Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first"
@ -57,10 +57,10 @@ print_map_entry() {
fi
;;
"ext2fs" | "msdosfs")
echo "-fstype=${_fstype},nosuid,async :/dev/${_p}"
echo "-fstype=${_fstype},async :/dev/${_p}"
;;
*)
echo "-fstype=${_fstype},nosuid :/dev/${_p}"
echo "-fstype=${_fstype} :/dev/${_p}"
;;
esac
}