image: add LUKS support and --[no-]encryption CLI flag to build & inspect subcommands
This commit is contained in:
parent
6de8137c90
commit
a9cd8178c8
5 changed files with 236 additions and 49 deletions
|
@ -171,9 +171,9 @@ def symlink(source, target):
|
|||
raise Exception(f'Symlink creation of {target} pointing at {source} failed')
|
||||
|
||||
|
||||
def get_temp_dir(register_cleanup=True, mode: int = 0o0755):
|
||||
def get_temp_dir(register_cleanup=True, mode: int = 0o0755, prefix='kupfertmp_'):
|
||||
"create a new tempdir and sanitize ownership so root can access user files as god intended"
|
||||
t = mkdtemp()
|
||||
t = mkdtemp(prefix=prefix)
|
||||
chmod(t, mode, privileged=False)
|
||||
if register_cleanup:
|
||||
atexit.register(remove_file, t, recursive=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue