systemd/0010-tmpfiles-set-up-selinux-label-proeprly-when-creating.patch

30 lines
984 B
Diff
Raw Normal View History

2014-06-23 04:30:03 +00:00
From 5aef99701f6e9504750adf906160ce23cb9851e4 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 16 Jun 2014 13:20:38 +0200
Subject: [PATCH] tmpfiles: set up selinux label proeprly when creating fifos
(cherry picked from commit 45c196a76b2d883552c90807386d9bed40da822b)
Conflicts:
src/shared/util.c
---
src/tmpfiles/tmpfiles.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index bb12dd0b..3e817cca 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -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);