mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
Fix copyUIDGID parameter inversion in Docker compat API
Docker API's copyUIDGID=true means "preserve UID/GID from archive" but Podman's internal Chown=true means "chown to container user". This caused Docker SDK clients to have files incorrectly chowned to root:root instead of preserving the archive's UID/GID. Fixes: https://github.com/containers/podman/issues/27332 Fixes: https://issues.redhat.com/browse/RUN-3643 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This commit is contained in:
@@ -191,7 +191,8 @@ class TestContainers(common.DockerTestCase):
|
||||
ret, out = ctr.exec_run(["stat", "-c", "%u:%g", "/tmp/a.txt"])
|
||||
|
||||
self.assertEqual(ret, 0)
|
||||
self.assertEqual(out.rstrip(), b"1042:1043", "UID/GID of copied file")
|
||||
# Docker-py implementation of put_archive dont do request with copyUIDGID=true
|
||||
self.assertEqual(out.rstrip(), b"0:0", "UID/GID of copied file")
|
||||
|
||||
ret, out = ctr.exec_run(["cat", "/tmp/a.txt"])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
Reference in New Issue
Block a user