mount: fix perms check

This commit is contained in:
tschettervictor
2025-01-17 08:11:58 -07:00
committed by GitHub
parent e33dd04ad1
commit ee0b8b8f96

View File

@@ -89,8 +89,8 @@ elif [ ! -e "${_hostpath}" ] || [ "${_type}" != "nullfs" ]; then
usage
fi
# Mount permissions,options need to include at least one of "ro, rw, rq, sw, xx"
if ! echo "${_perms}" | grep -Eq '[ro|rw|rq|sw|xx]'; then
# Mount permissions,options must start with one of "ro, rw, rq, sw, xx"
if ! echo "${_perms}" | grep -Eq '(ro|rw|rq|sw|xx)(,.*)?$'; then
error_notify "Detected invalid mount permissions in FSTAB."
warn "Format: /host/path /jail/path nullfs ro 0 0"
warn "Read: ${_fstab}"