From 579be607d6f4081b29af978c0a5529e18e6b8baf 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
(cherry picked from commit 1762262e61d16e77a9446b7588f7828f70cd9cbb)
---
src/tmpfiles/tmpfiles.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index be2115c..6b0dfaf 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -699,9 +699,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);