summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/gofer.go
diff options
context:
space:
mode:
authorRobert Tonic <btonic@users.noreply.github.com>2019-09-24 18:24:10 -0400
committerRobert Tonic <btonic@users.noreply.github.com>2019-09-24 18:24:10 -0400
commit7810b30983ec4d3a706df01163c29814cd21d6ca (patch)
tree1019008f5c8cc637dd764cd2b4f072e1b5d15e4e /runsc/cmd/gofer.go
parente975184bc50944e82a6bf5f4c57bbe970933fdc5 (diff)
Refactor command line options and remove the allowed terminology for uds
Diffstat (limited to 'runsc/cmd/gofer.go')
-rw-r--r--runsc/cmd/gofer.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/runsc/cmd/gofer.go b/runsc/cmd/gofer.go
index fa4f0034d..fbd579fb8 100644
--- a/runsc/cmd/gofer.go
+++ b/runsc/cmd/gofer.go
@@ -56,11 +56,10 @@ var goferCaps = &specs.LinuxCapabilities{
// Gofer implements subcommands.Command for the "gofer" command, which starts a
// filesystem gofer. This command should not be called directly.
type Gofer struct {
- bundleDir string
- ioFDs intFlags
- applyCaps bool
- hostUDSAllowed bool
- setUpRoot bool
+ bundleDir string
+ ioFDs intFlags
+ applyCaps bool
+ setUpRoot bool
panicOnWrite bool
specFD int
@@ -87,7 +86,6 @@ func (g *Gofer) SetFlags(f *flag.FlagSet) {
f.StringVar(&g.bundleDir, "bundle", "", "path to the root of the bundle directory, defaults to the current directory")
f.Var(&g.ioFDs, "io-fds", "list of FDs to connect 9P servers. They must follow this order: root first, then mounts as defined in the spec")
f.BoolVar(&g.applyCaps, "apply-caps", true, "if true, apply capabilities to restrict what the Gofer process can do")
- f.BoolVar(&g.hostUDSAllowed, "host-uds-allowed", false, "if true, allow the Gofer to mount a host UDS")
f.BoolVar(&g.panicOnWrite, "panic-on-write", false, "if true, panics on attempts to write to RO mounts. RW mounts are unnaffected")
f.BoolVar(&g.setUpRoot, "setup-root", true, "if true, set up an empty root for the process")
f.IntVar(&g.specFD, "spec-fd", -1, "required fd with the container spec")
@@ -182,9 +180,9 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
for _, m := range spec.Mounts {
if specutils.Is9PMount(m) {
cfg := fsgofer.Config{
- ROMount: isReadonlyMount(m.Options),
- PanicOnWrite: g.panicOnWrite,
- HostUDSAllowed: g.hostUDSAllowed,
+ ROMount: isReadonlyMount(m.Options),
+ PanicOnWrite: g.panicOnWrite,
+ HostUDS: conf.FSGoferHostUDS,
}
ap, err := fsgofer.NewAttachPoint(m.Destination, cfg)
if err != nil {
@@ -203,7 +201,7 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
Fatalf("too many FDs passed for mounts. mounts: %d, FDs: %d", mountIdx, len(g.ioFDs))
}
- if g.hostUDSAllowed {
+ if conf.FSGoferHostUDS {
filter.InstallUDSFilters()
}