Skip to content

Commit 8cc9ba7

Browse files
committed
Jail params allow.* have internal type str (not int)
1 parent 987ad24 commit 8cc9ba7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libioc/Jail.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,16 +1983,16 @@ def _clear_resource_limits(self) -> typing.List[str]:
19831983
return [f"/usr/bin/rctl -r jail:{self.identifier} 2>/dev/null || true"]
19841984

19851985
@property
1986-
def _allow_mount(self) -> str:
1987-
if self._allow_mount_zfs == "1":
1988-
return "1"
1989-
return self._get_value("allow_mount")
1986+
def _allow_mount(self) -> int:
1987+
if self._allow_mount_zfs == 1:
1988+
return 1
1989+
return int(self._get_value("allow_mount"))
19901990

19911991
@property
1992-
def _allow_mount_zfs(self) -> str:
1992+
def _allow_mount_zfs(self) -> int:
19931993
if self.config["jail_zfs"] is True:
1994-
return "1"
1995-
return self._get_value("allow_mount_zfs")
1994+
return 1
1995+
return int(self._get_value("allow_mount_zfs"))
19961996

19971997
def _configure_routes_commands(self) -> typing.List[str]:
19981998

0 commit comments

Comments
 (0)