diff options
author | Matthew Heon <mheon@redhat.com> | 2021-12-22 11:39:52 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-12-22 11:39:52 -0500 |
commit | af1dbbfb75851ce58dc59104fed2854bf0d9d171 (patch) | |
tree | 57ade448b681b1ef3427ea19171c70bcc18f268b | |
parent | 2aea0a5e9beb251dc1e8a0ab67fa1460c54194b9 (diff) | |
download | podman-af1dbbfb75851ce58dc59104fed2854bf0d9d171.tar.gz podman-af1dbbfb75851ce58dc59104fed2854bf0d9d171.tar.bz2 podman-af1dbbfb75851ce58dc59104fed2854bf0d9d171.zip |
Always run passwd management code when DB value is nil
This ensures that existing containers will still manage
`/etc/passwd` by default, as they have been doing until now. New
containers that explicitly set `false` will still have passwd
management disabled, but otherwise the code will run.
[NO NEW TESTS NEEDED] This will only be caught on upgrade and I
don't really know how to write update tests - and Ed is on PTO.
Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r-- | libpod/container_internal_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index edebe2393..0226f30c7 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1763,7 +1763,7 @@ func (c *Container) makeBindMounts() error { // SHM is always added when we mount the container c.state.BindMounts["/dev/shm"] = c.config.ShmDir - if c.config.Passwd != nil && *c.config.Passwd { + if c.config.Passwd == nil || *c.config.Passwd { newPasswd, newGroup, err := c.generatePasswdAndGroup() if err != nil { return errors.Wrapf(err, "error creating temporary passwd file for container %s", c.ID()) |