[PATCH] make resetFileContext return the context set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch makes resetFileContext return the context (a string)
on success, and None on failure. This fixes the "set SELinux
context for newly mounted ..." log messages to actually show
the context set.
---
 isys/isys.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/isys/isys.py b/isys/isys.py
index 88bfaf1..0a3fe62 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -641,8 +641,9 @@ def setFileContext(fn, con, instroot = '/'):
 def resetFileContext(fn, instroot = '/'):
     con = matchPathContext(fn)
     if con:
-        return setFileContext(fn, con, instroot)
-    return False
+        if setFileContext(fn, con, instroot):
+            return con
+    return None
 
 def prefix2netmask(prefix):
     return _isys.prefix2netmask(prefix)
-- 
1.6.2.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux