37ebaba7a1
This solves a bug where /etc may have pre-existing permissions from build time, but init layer setup (reworked for user namespaces) was assuming root ownership. Adds a test as well to catch this situation in the future. Minor fix to wrong ordering of chown/close on files created during the same initlayer setup. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp) Upstream-commit: 23b771782ab7236ce5024ac5773a6ded9a2af753 Component: engine