Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount: allow [ro|rw|rq|sw|xx] as available mount options #802

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

tschettervictor
Copy link
Collaborator

@tschettervictor tschettervictor commented Jan 11, 2025

Allow and require at least on of the following strings inside the "options" string of mount.
rw
ro
rq
sw
xx
According to fstab documentation.

Testing
Mount files and directories into jail(s) with different combos of comma separated options, making sure one (and only one) of the above options are also present.

Example bastille mount jailname /host/path /jail/path nullfs rw,nosuid,mode=01777 0 0 or bastille mount jailname /host/path /jail/path nullfs nosuid,ro,mode=01777 0 0

@tschettervictor tschettervictor mentioned this pull request Jan 18, 2025
@bmac2
Copy link
Collaborator

bmac2 commented Jan 18, 2025

tested and worked for me. tried:

root@fbsd:/home/bmccormick/bastille # bastille mount static1 /etc/resolv.conf /usr/resolv.conf nullfs rw,nosuid,mode=01777 0 0
[static1]:
Added: /etc/resolv.conf /usr/local/bastille/jails/static1/root/usr/resolv.conf nullfs rw,nosuid,mode=01777 0 0
root@fbsd:/home/bmccormick/bastille # bastille mount static1 /etc/resolv.conf /usr/local/resolv.conf nullfs rw 0 0
[static1]:
Added: /etc/resolv.conf /usr/local/bastille/jails/static1/root/usr/local/resolv.conf nullfs rw 0 0
root@fbsd:/home/bmccormick/bastille #

@yaazkal @tschettervictor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants