Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are uname/gname handled? #1210

Open
aconz2 opened this issue Oct 21, 2024 · 1 comment
Open

How are uname/gname handled? #1210

aconz2 opened this issue Oct 21, 2024 · 1 comment

Comments

@aconz2
Copy link

aconz2 commented Oct 21, 2024

In layer.md, it states that uname is secondary to uid and likewise for gname/gid. So far I've only run into tar layers which have empty uname/gname, but the spec seemingly supports it. I'm writing a tool that consumes layers and am wondering what you're supposed to do if you get a uname? And what exactly does it mean to be "secondary" to uid? AFAIK the tar header doesn't have a null/none/missing/blank value for uid, so it would always take precedence. And even if you wanted to use the uname, which /etc/passwd do you look it up in?

@sudo-bmitch
Copy link
Contributor

Personally I avoid anything other than numeric uid/gid for portability and reproducibility (https://reproducible-builds.org/docs/archives/). I'll delegate to the major implementations for how uname and gname can be used. It could be that those fields are only valid on platforms that do not support a uid/gid (I'm not sure how Windows handles this), and otherwise uid/gid are only used.

Feedback from @stevvooe, @vbatts, or @mikebrow would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants