-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Podman run --passwd #12664
Podman run --passwd #12664
Conversation
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.
Other than the nit, LGTM
a147298
to
99d8639
Compare
@containers/podman-maintainers PTAL |
/approve |
99d8639
to
ac5df80
Compare
libpod/container_config.go
Outdated
@@ -163,6 +163,8 @@ type ContainerRootFSConfig struct { | |||
// Volatile specifies whether the container storage can be optimized | |||
// at the cost of not syncing all the dirty files in memory. | |||
Volatile bool `json:"volatile,omitempty"` | |||
// ManagePasswd allows to user to override podman's passwd/group file setup | |||
ManagePasswd bool `json:"manage_password,omitempty"` |
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.
Why ManagePasswd as opposed to Passwd?
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.
I thought it was more descriptive than just passwrd especially in the config, I can change it back if you disagree.
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.
You mean for podman inspect?
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.
yep, just realized I did not add a way to see this in inspect, I will add that now
Tests are very red. A couple of small man page nits. |
ac5df80
to
78b2882
Compare
I think it would be better all throughout to just call it passwd. I think the manage_passwd, ManagePasswd ... just confuses the PR. |
added support for a new flag --passwd which, when false prohibits podman from creating entries in /etc/passwd and /etc/groups allowing users to modify those files in the container entrypoint resolves containers#11805 Signed-off-by: cdoern <[email protected]>
78b2882
to
20ce6e5
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, rhatdan 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 |
/hold cancel |
// If it already exists, delete so we can recreate | ||
delete(c.state.BindMounts, "/etc/group") | ||
c.state.BindMounts["/etc/group"] = newGroup | ||
if c.config.Passwd != nil && *c.config.Passwd { |
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.
Nit: this is going to break existing containers - if it is nil we have to run this code.
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.
I'll open a PR to fix
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.
Thanks, sorry I missed that.
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.
#12685 to fix
added support for a new flag --passwd which, when false, prohibits podman from creating entries in
/etc/passwd and /etc/groups allowing users to modify those files in the container entrypoint
resolves #11805
Signed-off-by: cdoern [email protected]