Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containers.conf man page lists wrong capabilities #1234

Closed
vrothberg opened this issue Nov 17, 2022 · 5 comments
Closed

containers.conf man page lists wrong capabilities #1234

vrothberg opened this issue Nov 17, 2022 · 5 comments

Comments

@vrothberg
Copy link
Member

Noticed during a presentation yesterday, so I want to create the issue before I forget about it.

man containers.conf does not list the same capabilities as are actually used (e.g., mknod is listed in the man page but not used anymore). I did not take a look; maybe the man pages diverged from the code?

Cc: @rhatdan

@rhatdan
Copy link
Member

rhatdan commented Nov 18, 2022

Currently the default capabilities in the Red Hat Distros are overridden in containers.conf

default_capabilities = [
  "CHOWN",
  "DAC_OVERRIDE",
  "FOWNER",
  "FSETID",
  "KILL",
  "NET_BIND_SERVICE",
  "SETFCAP",
  "SETGID",
  "SETPCAP",
  "SETUID",
  "SYS_CHROOT"
]

But in containers/common/pkg/default.go they match Docker

	DefaultCapabilities = []string{
		"CAP_AUDIT_WRITE",
		"CAP_CHOWN",
		"CAP_DAC_OVERRIDE",
		"CAP_FOWNER",
		"CAP_FSETID",
		"CAP_KILL",
		"CAP_MKNOD",
		"CAP_NET_BIND_SERVICE",
		"CAP_NET_RAW",
		"CAP_SETFCAP",
		"CAP_SETGID",
		"CAP_SETPCAP",
		"CAP_SETUID",
		"CAP_SYS_CHROOT",
	}

Since we have released for several os versions like this we should probably change containers/common's default going forward. Then we can make the man page match.

@vrothberg
Copy link
Member Author

That explains it. Thanks, @rhatdan!

@rhatdan
Copy link
Member

rhatdan commented Nov 22, 2022

What do you think about changing the defaults in common? And then distros that want the Docker defaults can ship their own containers.conf.

@vrothberg
Copy link
Member Author

I am very supportive of the idea. Given we shipped it in Fedora and RHEL for a long while now, we can be confident to not break many users if at all.

@vrothberg
Copy link
Member Author

If we do it, let's drop a message in the Podman changelog. Maybe in the commit vendoring the changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants