Skip to content

Commit

Permalink
mount: allow mount with options behind permissions
Browse files Browse the repository at this point in the history
Allow mounting with permissions like “rw,other,options” that are needed for tmpfs mounting.
  • Loading branch information
tschettervictor authored Jan 10, 2025
1 parent 22c3455 commit fb71f0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/local/share/bastille/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ elif [ ! -e "${_hostpath}" ] || [ "${_type}" != "nullfs" ]; then
usage
fi

# Mount permissions need to be "ro" or "rw"
if [ "${_perms}" != "ro" ] && [ "${_perms}" != "rw" ]; then
# Mount permissions,options need to start with "ro" or "rw"
if ! echo "${_perms}" | grep -Eq 'r[w|o],.*$'; then
error_notify "Detected invalid mount permissions in FSTAB."
warn "Format: /host/path /jail/path nullfs ro 0 0"
warn "Read: ${_fstab}"
Expand Down

0 comments on commit fb71f0d

Please sign in to comment.