7f93bc2
From 579be607d6f4081b29af978c0a5529e18e6b8baf Mon Sep 17 00:00:00 2001
a59965a
From: Lennart Poettering <lennart@poettering.net>
a59965a
Date: Mon, 16 Jun 2014 13:20:38 +0200
a59965a
Subject: [PATCH] tmpfiles: set up selinux label proeprly when creating fifos
a59965a
a59965a
(cherry picked from commit 45c196a76b2d883552c90807386d9bed40da822b)
a59965a
a59965a
Conflicts:
a59965a
	src/shared/util.c
a59965a
a59965a
(cherry picked from commit 1762262e61d16e77a9446b7588f7828f70cd9cbb)
a59965a
---
a59965a
 src/tmpfiles/tmpfiles.c | 2 ++
a59965a
 1 file changed, 2 insertions(+)
a59965a
a59965a
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
a59965a
index be2115c..6b0dfaf 100644
a59965a
--- a/src/tmpfiles/tmpfiles.c
a59965a
+++ b/src/tmpfiles/tmpfiles.c
a59965a
@@ -699,9 +699,11 @@ static int create_item(Item *i) {
a59965a
 
a59965a
         case CREATE_FIFO:
a59965a
 
a59965a
+                label_context_set(i->path, S_IFIFO);
a59965a
                 RUN_WITH_UMASK(0000) {
a59965a
                         r = mkfifo(i->path, i->mode);
a59965a
                 }
a59965a
+                label_context_clear();
a59965a
 
a59965a
                 if (r < 0 && errno != EEXIST) {
a59965a
                         log_error("Failed to create fifo %s: %m", i->path);