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

Sockets created in /tmp cause issues with relays run in containers on systems with SELinux #218

Open
Wojtek242 opened this issue Mar 17, 2018 · 2 comments
Labels

Comments

@Wojtek242
Copy link

I'm trying to get ccn-lite running in docker containers in order to make it easier to spin up, manage, and orchestrate ccn-lite networks for testing. I noticed that relays will create temporary sockets in /tmp so to get ccn-lite-ctrl working I had to also share the host's /tmp with the container. However, access to this socket is blocked by SELinux. Disabling SELinux with setenforce 0 makes the problem go away, but that's obviously not ideal. Adding a policy for sockets created in /tmp also does not sound great.

Is there a simpler way around this? Is there a good reason for creating these temporary sockets? Why is the one socket created by the relay not enough?

@Wojtek242 Wojtek242 changed the title Temporary sockets created in /tmp cause issues with relays run in containers on systems with SELinux Sockets created in /tmp cause issues with relays run in containers on systems with SELinux Mar 17, 2018
@blacksheeep
Copy link
Contributor

I think there is only one reason for that is, that the unix socket is not only used for mgmt, but can also be used for communication, when having multiple nodes on the same machine.
To be able to accept requests from multiple clients at the same time, each request is handled by a temporary face/socket.
I see your point, that this does not work well for docker. I think we have that implementation to be able to handle all kind of interface the same way.
If we just use UDP sockets for communication it would be possible to send all replies using the same socket. But I do not think this is possible for Unix or maybe future TCP sockets, is it?

@Wojtek242
Copy link
Author

Hmm, wouldn't opening a UDP listening port not work? In that case you just communicate via the IP/UDP stack. Admittedly this does confine you to the UDP/IP implementation.

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

No branches or pull requests

2 participants