Skip to content

Commit

Permalink
UserNS should default to '' rather then host
Browse files Browse the repository at this point in the history
If you use this field in rootless mode, it will blow up,
since rootless mode can not use the host user namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Sep 18, 2021
1 parent 8c42ef4 commit 16b7b7a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ image_copy_tmp_dir="storage"`
gomega.Expect(config.Containers.ApparmorProfile).To(gomega.Equal(apparmor.Profile))
gomega.Expect(config.Containers.PidsLimit).To(gomega.BeEquivalentTo(2048))
gomega.Expect(config.Containers.Env).To(gomega.BeEquivalentTo(envs))
gomega.Expect(config.Containers.UserNS).To(gomega.BeEquivalentTo(""))
gomega.Expect(config.Network.CNIPluginDirs).To(gomega.Equal(DefaultCNIPluginDirs))
gomega.Expect(config.Engine.NumLocks).To(gomega.BeEquivalentTo(2048))
gomega.Expect(config.Engine.OCIRuntimes["runc"]).To(gomega.Equal(OCIRuntimeMap["runc"]))
Expand Down
1 change: 0 additions & 1 deletion pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func DefaultConfig() (*Config, error) {
TZ: "",
Umask: "0022",
UTSNS: "private",
UserNS: "host",
UserNSSize: DefaultUserNSSize,
},
Network: NetworkConfig{
Expand Down

0 comments on commit 16b7b7a

Please sign in to comment.