diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-23 19:28:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 19:28:08 +0100 |
commit | 73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37 (patch) | |
tree | 98bbc1c08061cde903f5b1aef21790d66e8e742e /libpod/options.go | |
parent | 5570b5b9751894d509be2b478685097cf8fde923 (diff) | |
parent | e8c06fac97f56ccc710584731d8b52ed58fbd2dd (diff) | |
download | podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.tar.gz podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.tar.bz2 podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.zip |
Merge pull request #12627 from rhatdan/passwd
Allow users to add host user accounts to /etc/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 85d7b4689..204f2a457 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1768,6 +1768,17 @@ func WithPidFile(pidFile string) CtrCreateOption { } } +// WithHostUsers indicates host users to add to /etc/passwd +func WithHostUsers(hostUsers []string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + ctr.config.HostUsers = hostUsers + return nil + } +} + // WithInitCtrType indicates the container is a initcontainer func WithInitCtrType(containerType string) CtrCreateOption { return func(ctr *Container) error { |