diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-22 12:09:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 12:09:56 +0100 |
commit | 85f21fb2bd39d76300ab61a1fb1207405e05f9d2 (patch) | |
tree | 342fb99e4c547e9818805bad80b8ccf58427c340 /libpod/options.go | |
parent | d2fcfef8b07532dc7418079160f0d6b989143c25 (diff) | |
parent | 20ce6e5c6031bd4180514ec412760a294f8a83a2 (diff) | |
download | podman-85f21fb2bd39d76300ab61a1fb1207405e05f9d2.tar.gz podman-85f21fb2bd39d76300ab61a1fb1207405e05f9d2.tar.bz2 podman-85f21fb2bd39d76300ab61a1fb1207405e05f9d2.zip |
Merge pull request #12664 from cdoern/noManagePasswd
Podman run --passwd
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index e6fa987a8..85d7b4689 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1794,6 +1794,17 @@ func WithHostDevice(dev []specs.LinuxDevice) CtrCreateOption { } } +// WithSelectedPasswordManagement makes it so that the container either does or does not setup /etc/passwd or /etc/group +func WithSelectedPasswordManagement(passwd *bool) CtrCreateOption { + return func(c *Container) error { + if c.valid { + return define.ErrCtrFinalized + } + c.config.Passwd = passwd + return nil + } +} + // Pod Creation Options // WithPodCreateCommand adds the full command plus arguments of the current |