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

build: add nsswitch.conf chroot #2104

Closed
wants to merge 1 commit into from

Conversation

disassembler
Copy link
Member

This adds nsswitch to chroot with only hosts mapping to files.

@edolstra
Copy link
Member

Seems fine, but what is the motivation/effect? Will looking up localhost still work?

@cleverca22
Copy link
Contributor

also, other tests fail due to a missing /etc/protocols leading to them not knowing what tcp is, so they cant create a tcp socket

@cleverca22
Copy link
Contributor

i also just had a thought, nix.conf can inject paths like /bin/sh into the sandbox, maybe it can get these files also?

@cleverca22
Copy link
Contributor

i can confirm that nix.sandboxPaths = [ "/etc/nsswitch.conf" "/etc/protocols" ]; fixes both issues, the PR is no longer required

@disassembler
Copy link
Member Author

Should I close this since nix.sandboxPaths solves the issue? The initial reason was running a multi-node cluster integration test, in which the application was dependent on nsswitch.conf to lookup localhost properly so the nodes would trust each other.

@edolstra
Copy link
Member

Adding /etc/protocols would be a fairly substantial impurity.

@domenkozar
Copy link
Member

see #1238

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants