helper/bwrap: proc, dev and mqueue as string arguments
These flags do not support --chmod. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
a3aadd4146
commit
101e49a48b
|
@ -127,16 +127,16 @@ type Config struct {
|
||||||
|
|
||||||
// mount new procfs in sandbox
|
// mount new procfs in sandbox
|
||||||
// (--proc DEST)
|
// (--proc DEST)
|
||||||
Procfs []PermConfig[string] `json:"proc,omitempty"`
|
Procfs []string `json:"proc,omitempty"`
|
||||||
// mount new dev in sandbox
|
// mount new dev in sandbox
|
||||||
// (--dev DEST)
|
// (--dev DEST)
|
||||||
DevTmpfs []PermConfig[string] `json:"dev,omitempty"`
|
DevTmpfs []string `json:"dev,omitempty"`
|
||||||
// mount new tmpfs in sandbox
|
// mount new tmpfs in sandbox
|
||||||
// (--tmpfs DEST)
|
// (--tmpfs DEST)
|
||||||
Tmpfs []PermConfig[TmpfsConfig] `json:"tmpfs,omitempty"`
|
Tmpfs []PermConfig[TmpfsConfig] `json:"tmpfs,omitempty"`
|
||||||
// mount new mqueue in sandbox
|
// mount new mqueue in sandbox
|
||||||
// (--mqueue DEST)
|
// (--mqueue DEST)
|
||||||
Mqueue []PermConfig[string] `json:"mqueue,omitempty"`
|
Mqueue []string `json:"mqueue,omitempty"`
|
||||||
// create dir in sandbox
|
// create dir in sandbox
|
||||||
// (--dir DEST)
|
// (--dir DEST)
|
||||||
Dir []PermConfig[string] `json:"dir,omitempty"`
|
Dir []PermConfig[string] `json:"dir,omitempty"`
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package bwrap
|
package bwrap
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Procfs = iota
|
Tmpfs = iota
|
||||||
DevTmpfs
|
|
||||||
Tmpfs
|
|
||||||
Mqueue
|
|
||||||
Dir
|
Dir
|
||||||
Symlink
|
Symlink
|
||||||
|
|
||||||
|
@ -12,10 +9,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var interfaceArgs = func() (g [interfaceC]string) {
|
var interfaceArgs = func() (g [interfaceC]string) {
|
||||||
g[Procfs] = "--proc"
|
|
||||||
g[DevTmpfs] = "--dev"
|
|
||||||
g[Tmpfs] = "--tmpfs"
|
g[Tmpfs] = "--tmpfs"
|
||||||
g[Mqueue] = "--mqueue"
|
|
||||||
g[Dir] = "--dir"
|
g[Dir] = "--dir"
|
||||||
g[Symlink] = "--symlink"
|
g[Symlink] = "--symlink"
|
||||||
|
|
||||||
|
@ -23,10 +17,7 @@ var interfaceArgs = func() (g [interfaceC]string) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
func (c *Config) interfaceArgs() (g [interfaceC][]argOf) {
|
func (c *Config) interfaceArgs() (g [interfaceC][]argOf) {
|
||||||
g[Procfs] = copyToArgOfSlice(c.Procfs)
|
|
||||||
g[DevTmpfs] = copyToArgOfSlice(c.DevTmpfs)
|
|
||||||
g[Tmpfs] = copyToArgOfSlice(c.Tmpfs)
|
g[Tmpfs] = copyToArgOfSlice(c.Tmpfs)
|
||||||
g[Mqueue] = copyToArgOfSlice(c.Mqueue)
|
|
||||||
g[Dir] = copyToArgOfSlice(c.Dir)
|
g[Dir] = copyToArgOfSlice(c.Dir)
|
||||||
g[Symlink] = copyToArgOfSlice(c.Symlink)
|
g[Symlink] = copyToArgOfSlice(c.Symlink)
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,9 @@ const (
|
||||||
UnsetEnv
|
UnsetEnv
|
||||||
LockFile
|
LockFile
|
||||||
RemountRO
|
RemountRO
|
||||||
|
Procfs
|
||||||
|
DevTmpfs
|
||||||
|
Mqueue
|
||||||
|
|
||||||
stringC
|
stringC
|
||||||
)
|
)
|
||||||
|
@ -16,6 +19,9 @@ var stringArgs = func() (n [stringC]string) {
|
||||||
n[UnsetEnv] = "--unsetenv"
|
n[UnsetEnv] = "--unsetenv"
|
||||||
n[LockFile] = "--lock-file"
|
n[LockFile] = "--lock-file"
|
||||||
n[RemountRO] = "--remount-ro"
|
n[RemountRO] = "--remount-ro"
|
||||||
|
n[Procfs] = "--proc"
|
||||||
|
n[DevTmpfs] = "--dev"
|
||||||
|
n[Mqueue] = "--mqueue"
|
||||||
|
|
||||||
return
|
return
|
||||||
}()
|
}()
|
||||||
|
@ -30,6 +36,9 @@ func (c *Config) stringArgs() (n [stringC][]string) {
|
||||||
n[UnsetEnv] = c.UnsetEnv
|
n[UnsetEnv] = c.UnsetEnv
|
||||||
n[LockFile] = c.LockFile
|
n[LockFile] = c.LockFile
|
||||||
n[RemountRO] = c.RemountRO
|
n[RemountRO] = c.RemountRO
|
||||||
|
n[Procfs] = c.Procfs
|
||||||
|
n[DevTmpfs] = c.DevTmpfs
|
||||||
|
n[Mqueue] = c.Mqueue
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue