From 3f2939c2ef6d9867862f597751c12b14c74440a3 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 21 Mar 2022 16:43:14 +0100 Subject: run, create: add --passwd-entry It allows to customize the entry that is written to the `/etc/passwd` file when --passwd is used. Closes: https://github.com/containers/podman/issues/13185 Signed-off-by: Giuseppe Scrivano --- cmd/podman/common/create.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd') diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 8a3f02036..309bbda59 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -630,6 +630,10 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, ) _ = cmd.RegisterFlagCompletionFunc(chrootDirsFlagName, completion.AutocompleteDefault) + passwdEntryName := "passwd-entry" + createFlags.StringVar(&cf.PasswdEntry, passwdEntryName, "", "Entry to write to /etc/passwd") + _ = cmd.RegisterFlagCompletionFunc(passwdEntryName, completion.AutocompleteNone) + if registry.IsRemote() { _ = createFlags.MarkHidden("env-host") _ = createFlags.MarkHidden("http-proxy") -- cgit v1.2.3-54-g00ecf