-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
libpod: make hasCapSysResource platform-specific #25275
libpod: make hasCapSysResource platform-specific #25275
Conversation
libpod/container_internal_freebsd.go
Outdated
|
||
// hasCapSysResource returns whether the current process has CAP_SYS_RESOURCE. | ||
func hasCapSysResource() (bool, error) { | ||
return false, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extend the hard limits as root on freebsd? If so that should likely return true. Especially since the behavior before this new CAP_SYS_RESOURCE check was to behave like true does now.
The reason we added this check that on linux we need CAP_SYS_RESOURCE to raise the limit, default is 1048576 for NOFILE and NOFILE, so if a user has less we can not bump and instead just set it to the hard limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root can raise the hard limits on the host or (I think) inside a jail with the right privileges. I will change the stub to return true.
Cockpit tests failed for commit 61d76eb. @martinpitt, @jelly, @mvollmer please check. |
I'm not sure if there is an equivalent to CAP_SYS_RESOURCE on FreeBSD but for now, I have added a no-op stub which returns false. Signed-off-by: Doug Rabson <[email protected]>
61d76eb
to
ab04109
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dfr, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
I'm not sure if there is an equivalent to CAP_SYS_RESOURCE on FreeBSD but for now, I have added a no-op stub which returns false.
Does this PR introduce a user-facing change?