diff options
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 34c06cc5d..ffd0e6037 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -2075,3 +2075,16 @@ func WithChrootDirs(dirs []string) CtrCreateOption { return nil } } + +// WithPasswdEntry sets the entry to write to the /etc/passwd file. +func WithPasswdEntry(passwdEntry string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + + ctr.config.PasswdEntry = passwdEntry + + return nil + } +} |