Skip to content

[24.0 backport] fix docker cp -a failing to access / in container (run getent with a noop stdin)#45748

Merged
neersighted merged 1 commit intomoby:24.0from
thaJeztah:24.0_backport_copy_uidgid
Jun 14, 2023
Merged

[24.0 backport] fix docker cp -a failing to access / in container (run getent with a noop stdin)#45748
neersighted merged 1 commit intomoby:24.0from
thaJeztah:24.0_backport_copy_uidgid

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

(cherry picked from commit 3cc5d62)


- What I did
configure command to run getent to use a noop readCloser as stdin to prevent ENOENT failure to open /dev/null

- How I did it

- How to verify it
test case included

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)
image

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
(cherry picked from commit 3cc5d62)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@neersighted
Copy link
Copy Markdown
Member

Since this comes from a Go runtime change, we'll have to remember to carry this back to any branches we bring Go 1.20 to (cc @cpuguy83 @corhere)

@neersighted neersighted merged commit 3d96894 into moby:24.0 Jun 14, 2023
@thaJeztah thaJeztah deleted the 24.0_backport_copy_uidgid branch June 14, 2023 17:47
@thaJeztah
Copy link
Copy Markdown
Member Author

@neersighted was it new though? As this already was there (but we may have changed how we use the code) https://github.com/golang/go/blame/5c5c2c8112f774b118b9251eb15c2df529ad454c/src/pkg/os/exec/exec.go#L145

@neersighted
Copy link
Copy Markdown
Member

Ah, that's a fair point -- I managed to misunderstand some of my own spelunking and was convinced that this was new in https://go-review.googlesource.com/c/go/+/401834.

I do wonder where the regression crept in then -- possibly the re-exec elimination work?

@thaJeztah
Copy link
Copy Markdown
Member Author

Yes, I suspect the latter indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants