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 /cmd | |
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 'cmd')
-rw-r--r-- | cmd/podman/containers/run.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go index cfb89ce57..b9a2c3bb5 100644 --- a/cmd/podman/containers/run.go +++ b/cmd/podman/containers/run.go @@ -83,6 +83,9 @@ func runFlags(cmd *cobra.Command) { _ = cmd.RegisterFlagCompletionFunc(gpuFlagName, completion.AutocompleteNone) _ = flags.MarkHidden("gpus") + passwdFlagName := "passwd" + flags.BoolVar(&runOpts.Passwd, passwdFlagName, true, "add entries to /etc/passwd and /etc/group") + if registry.IsRemote() { _ = flags.MarkHidden("preserve-fds") _ = flags.MarkHidden("conmon-pidfile") @@ -191,6 +194,7 @@ func run(cmd *cobra.Command, args []string) error { return err } s.RawImageName = rawImageName + s.Passwd = &runOpts.Passwd runOpts.Spec = s if _, err := createPodIfNecessary(cmd, s, cliVals.Net); err != nil { |