Closed wietmann closed 2 years ago
@wietmann the restorecon command will reset the SELinux context on a file or dir. Unfortunately we appear to be using a "common" config module for every distro. So we either need to make that script smarter (like using timedatectl
if avail, and/or detect if SELinux is enabled and use chcon
. But that would mean adding a context string, which might be different across distros. And not all distros come with restorecon
by default.
Creating distro specific localtime.sh
is another option but also a pain. I'll add it to the list, but you if your good at bash scripting your welcome to submit a PR with the changes.
On Rocky linux /etc/localtime symlink is created by common script https://github.com/lavabit/robox/blob/master/scripts/common/localtime.sh with SELinux type
etc_t
. However, the correct type islocale_t
. This causes timedatectl to fail when changing timezone:Possibly, there should be additional step to restore default security context on SELinux-enabled distros.