FileContext.mkdir(): Fix missing _chroot() #130

Merged
Jan Lindemann merged 1 commit from jan/feature/20260929-filecontext-mkdir-fix-missing-chroot into master 2026-09-29 15:28:59 +02:00 AGit
Showing only changes of commit 120100c9cb - Show all commits

FileContext.mkdir(): Fix missing _chroot()
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m27s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m41s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m55s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m26s
CI / Packaging test (push) Successful in 0s

mkdir() passes its path to _mkdir() without chrooting it, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>

Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann 2026-09-29 15:17:37 +02:00
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -221,7 +221,7 @@ class FileContext(abc.ABC):
raise NotImplementedError(f'{self.log_name}: mkdir({path}) is not implemented') raise NotImplementedError(f'{self.log_name}: mkdir({path}) is not implemented')
async def mkdir(self, path: str, mode: int = 0o777) -> None: async def mkdir(self, path: str, mode: int = 0o777) -> None:
return await self._mkdir(path, mode) return await self._mkdir(self._chroot(path), mode)
async def _mktemp(self, tmpl: str, directory: bool) -> str: async def _mktemp(self, tmpl: str, directory: bool) -> str:
raise NotImplementedError( raise NotImplementedError(