innernet/docker-tests
refi64 dbac0dc530
hostsfile: Copy the SELinux context to the temp file before overwrite (#273)
* hostsfile: Copy the SELinux context to the temp file before overwrite

On SELinux-enabled systems, /etc/hosts has a different type `net_conf_t`
than the other files in /etc, so the temporary file that overwrites it
ends up with the wrong context, resulting in many system services
becoming unable to access the file. To fix this, manually look up the
context /etc/hosts has and copy it to the temporary file before
the rename.

In order to avoid depending on libselinux on systems that don't use it,
this support is gated behind the new "selinux" feature. It *is*
installed and enabled in the Dockerfile, however, in order to ensure
that it still builds.

* Appease clippy

* Add info about selinux feature to README.md

* Remove unused ClientError struct

* Reformatted & repositioned and improved doc about selinux

---------

Co-authored-by: Brian Schwind <brianmschwind@gmail.com>
Co-authored-by: Jürgen Botz <jurgen@botz.org>
2024-07-01 10:16:43 +09:00
..
build-docker-images.sh Make docker-tests less verbose and easier to add new tests (#311) 2024-04-22 21:10:57 +09:00
Dockerfile.innernet hostsfile: Copy the SELinux context to the temp file before overwrite (#273) 2024-07-01 10:16:43 +09:00
run-docker-tests.sh Add --interactive mode to docker-tests for testing of interactive commands (#312) 2024-04-23 18:05:13 +09:00
start-client.sh Make docker-tests less verbose and easier to add new tests (#311) 2024-04-22 21:10:57 +09:00
start-server.sh docker-tests: support userspace and kernel backends 2021-05-21 14:22:43 +09:00