|
|
7a3408 |
From 71c76c2375fc782a613f0e1154b76be084c8cea2 Mon Sep 17 00:00:00 2001
|
|
|
7a3408 |
Message-Id: <71c76c2375fc782a613f0e1154b76be084c8cea2@dist-git>
|
|
|
7a3408 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
7a3408 |
Date: Tue, 15 Sep 2015 11:51:21 +0200
|
|
|
7a3408 |
Subject: [PATCH] virSecuritySELinuxSetSecurityAllLabel: drop useless
|
|
|
7a3408 |
virFileIsSharedFSType
|
|
|
7a3408 |
|
|
|
7a3408 |
https://bugzilla.redhat.com/show_bug.cgi?id=1124841
|
|
|
7a3408 |
|
|
|
7a3408 |
The check is done in virSecuritySELinuxSetFilecon itself. There's
|
|
|
7a3408 |
no need to check it again.
|
|
|
7a3408 |
|
|
|
7a3408 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
7a3408 |
(cherry picked from commit 370461d1dbcdcf63fbe6c34d188c28cf11488845)
|
|
|
7a3408 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
7a3408 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
7a3408 |
---
|
|
|
7a3408 |
src/security/security_selinux.c | 10 ++++------
|
|
|
7a3408 |
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
|
7a3408 |
|
|
|
7a3408 |
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
|
|
|
7a3408 |
index d2e5aa2..46080bf 100644
|
|
|
7a3408 |
--- a/src/security/security_selinux.c
|
|
|
7a3408 |
+++ b/src/security/security_selinux.c
|
|
|
7a3408 |
@@ -2306,7 +2306,7 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
|
|
|
7a3408 |
continue;
|
|
|
7a3408 |
}
|
|
|
7a3408 |
if (virSecuritySELinuxSetSecurityDiskLabel(mgr,
|
|
|
7a3408 |
- def, def->disks[i]) < 0)
|
|
|
7a3408 |
+ def, def->disks[i]) < 0)
|
|
|
7a3408 |
return -1;
|
|
|
7a3408 |
}
|
|
|
7a3408 |
/* XXX fixme process def->fss if relabel == true */
|
|
|
7a3408 |
@@ -2355,11 +2355,9 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
|
|
|
7a3408 |
virSecuritySELinuxSetFilecon(def->os.dtb, data->content_context) < 0)
|
|
|
7a3408 |
return -1;
|
|
|
7a3408 |
|
|
|
7a3408 |
- if (stdin_path) {
|
|
|
7a3408 |
- if (virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0 &&
|
|
|
7a3408 |
- virFileIsSharedFSType(stdin_path, VIR_FILE_SHFS_NFS) != 1)
|
|
|
7a3408 |
- return -1;
|
|
|
7a3408 |
- }
|
|
|
7a3408 |
+ if (stdin_path &&
|
|
|
7a3408 |
+ virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0)
|
|
|
7a3408 |
+ return -1;
|
|
|
7a3408 |
|
|
|
7a3408 |
return 0;
|
|
|
7a3408 |
}
|
|
|
7a3408 |
--
|
|
|
7a3408 |
2.5.3
|
|
|
7a3408 |
|