Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSELinux label for /etc/udev/hwdb.bin is etc_t instead of systemd_hwdb_etc_t after "#systemd-hwdb update" #3458
Comments
wrabcak
changed the title from
SELinux label for /etc/udev/hwdb.bin is etc_t insted systemd_hwdb_etc_t after "#systemd-hwdb update"
to
SELinux label for /etc/udev/hwdb.bin is etc_t instead of systemd_hwdb_etc_t after "#systemd-hwdb update"
Jun 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evverx
Jun 7, 2016
Member
Is it possible ti have always same name of ".#hwdb.binXXXXXX"
I think systemd-hwdb should use label_fix or so
I think |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
poettering
Jun 7, 2016
Member
yeah, label_fix appears to be the answer here. Happy to take a patch for that.
|
yeah, label_fix appears to be the answer here. Happy to take a patch for that. |
poettering
added
udev
selinux
labels
Jun 7, 2016
added a commit
to evverx/systemd
that referenced
this issue
Jun 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
fix waiting in #3460 |
poettering
closed this
in
#3460
Jun 7, 2016
added a commit
that referenced
this issue
Jun 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sourcejedi
Aug 15, 2017
Contributor
Surely the approach with label_fix() races with hotplug, so we accept potential spurious SELinux denial pop-ups. Following the original suggestion (like passwd) would still have allowed preventing write conflicts, using whatever unix locking construct is considered least horrifying.
Locking would also make it possible to guarantee that if two hwdb updates are running at the same time, the one with the older view of the conf files is not overwritten by the one with the more recent view.
|
Surely the approach with Locking would also make it possible to guarantee that if two |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sourcejedi
Aug 15, 2017
Contributor
... or move After=systemd-hwdb.service from systemd-udev-trigger.service to systemd-udev.service. I'll send a PR.
|
... or move |
wrabcak commentedJun 7, 2016
Submission type
systemd version the issue has been seen with
Used distribution
In case of bug report: Expected behaviour you didn't see
In case of bug report: Unexpected behaviour you saw
In case of bug report: Steps to reproduce the problem
systemd-hwdb update doing:
Deleting /etc/udev/hwdb.bin file, then file "/etc/udev/.#hwdb.binXXXXXX" is created and after then renamed to /etc/udev/hwdb.bin
This is problem from SELinux policy point of view. I cannot create filename transtion rule for file ".#hwdb.binXXXXXX" due to non-constant name. Is it possible ti have always same name of ".#hwdb.binXXXXXX"?