From 2faf510146733c28a5dbc3245175700abcf4f966 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Tue, 15 Oct 2024 02:15:55 +0900 Subject: helper/bwrap: ordered filesystem args The argument builder was written based on the incorrect assumption that bwrap arguments are unordered. The argument builder is replaced in this commit to correct that mistake. Signed-off-by: Ophestra Umiker --- helper/bwrap/config.string.go | 44 ------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 helper/bwrap/config.string.go (limited to 'helper/bwrap/config.string.go') diff --git a/helper/bwrap/config.string.go b/helper/bwrap/config.string.go deleted file mode 100644 index 2aa05bee..00000000 --- a/helper/bwrap/config.string.go +++ /dev/null @@ -1,44 +0,0 @@ -package bwrap - -const ( - Hostname = iota - Chdir - UnsetEnv - LockFile - RemountRO - Procfs - DevTmpfs - Mqueue - - stringC -) - -var stringArgs = func() (n [stringC]string) { - n[Hostname] = "--hostname" - n[Chdir] = "--chdir" - n[UnsetEnv] = "--unsetenv" - n[LockFile] = "--lock-file" - n[RemountRO] = "--remount-ro" - n[Procfs] = "--proc" - n[DevTmpfs] = "--dev" - n[Mqueue] = "--mqueue" - - return -}() - -func (c *Config) stringArgs() (n [stringC][]string) { - if c.Hostname != "" { - n[Hostname] = []string{c.Hostname} - } - if c.Chdir != "" { - n[Chdir] = []string{c.Chdir} - } - n[UnsetEnv] = c.UnsetEnv - n[LockFile] = c.LockFile - n[RemountRO] = c.RemountRO - n[Procfs] = c.Procfs - n[DevTmpfs] = c.DevTmpfs - n[Mqueue] = c.Mqueue - - return -} -- cgit v1.3.1