mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
tmpfiles: set up selinux label proeprly when creating fifos
This commit is contained in:
parent
a01647e537
commit
45c196a76b
@ -6659,6 +6659,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
|
||||
}
|
||||
|
||||
int fflush_and_check(FILE *f) {
|
||||
assert(f);
|
||||
|
||||
errno = 0;
|
||||
fflush(f);
|
||||
|
@ -719,9 +719,11 @@ static int create_item(Item *i) {
|
||||
|
||||
case CREATE_FIFO:
|
||||
|
||||
label_context_set(i->path, S_IFIFO);
|
||||
RUN_WITH_UMASK(0000) {
|
||||
r = mkfifo(i->path, i->mode);
|
||||
}
|
||||
label_context_clear();
|
||||
|
||||
if (r < 0 && errno != EEXIST) {
|
||||
log_error("Failed to create fifo %s: %m", i->path);
|
||||
|
Loading…
Reference in New Issue
Block a user