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

[PATCH] make resetFileContext return the context set



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


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