Skip to content

Commit

Permalink
add allow_mount_linsysfs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgeo committed Jun 14, 2024
1 parent 93779af commit 531f4e9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
10 changes: 10 additions & 0 deletions iocage.8
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,16 @@ Default: 0
.Pp
Source:
.Xr jail 8
.It Pf allow_mount_linsysfs= Op 1 | 0
Privileged users inside the jail will be able to mount and
unmount the linsysfs file system. This permission is effective
only together with allow.mount and only when enforce_statfs is
set to a value lower than 2.
.Pp
Default: 0
.Pp
Source:
.Xr jail 8
.It Pf allow_mount_tmpfs= Op 1 | 0
Allow privileged users inside the jail to mount and unmount the tmpfs
file system.
Expand Down
9 changes: 8 additions & 1 deletion iocage_lib/ioc_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def __init__(self, location, checking_datasets, silent, callback):
@staticmethod
def get_version():
"""Sets the iocage configuration version."""
version = '31'
version = '32'

return version

Expand Down Expand Up @@ -920,6 +920,10 @@ def check_config(self, conf, default=False):
if not conf.get('allow_nfsd'):
conf['allow_nfsd'] = 0

# Version 32 key
if not conf.get('allow_mount_linsysfs'):
conf['allow_mount_linsysfs'] = 0

if not default:
conf.update(jail_conf)

Expand Down Expand Up @@ -1181,6 +1185,7 @@ def retrieve_default_props():
'allow_mount_nullfs': 0,
'allow_mount_procfs': 0,
'allow_mount_linprocfs': 0,
'allow_mount_linsysfs': 0,
'allow_mount_tmpfs': 0,
'allow_mount_zfs': 0,
'allow_quotas': 0,
Expand Down Expand Up @@ -1353,6 +1358,7 @@ class IOCJson(IOCConfiguration):
'allow_mount_devfs',
'allow_mount_fdescfs',
'allow_mount_linprocfs',
'allow_mount_linsysfs',
'allow_mount',
'allow_mlock',
'allow_chflags',
Expand Down Expand Up @@ -2106,6 +2112,7 @@ def json_check_prop(self, key, value, conf, default=False):
"allow_mount_nullfs": truth_variations,
"allow_mount_procfs": truth_variations,
"allow_mount_linprocfs": truth_variations,
"allow_mount_linsysfs": truth_variations,
"allow_mount_tmpfs": truth_variations,
"allow_mount_zfs": truth_variations,
"allow_quotas": truth_variations,
Expand Down
2 changes: 2 additions & 0 deletions iocage_lib/ioc_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def __start_jail__(self):
allow_mount_nullfs = self.conf["allow_mount_nullfs"]
allow_mount_procfs = self.conf["allow_mount_procfs"]
allow_mount_linprocfs = self.conf["allow_mount_linprocfs"]
allow_mount_linsysfs = self.conf["allow_mount_linsysfs"]
allow_mount_tmpfs = self.conf["allow_mount_tmpfs"]
allow_mount_zfs = self.conf["allow_mount_zfs"]
allow_quotas = self.conf["allow_quotas"]
Expand Down Expand Up @@ -565,6 +566,7 @@ def __start_jail__(self):
f"allow.mount.nullfs={allow_mount_nullfs}",
f"allow.mount.procfs={allow_mount_procfs}",
f"allow.mount.linprocfs={allow_mount_linprocfs}",
f"allow.mount.linsysfs={allow_mount_linsysfs}",
f"allow.mount.zfs={allow_mount_zfs}"
]

Expand Down

0 comments on commit 531f4e9

Please sign in to comment.