If users of seobject set serange or seuser to "", we need to override.

Do not want bad data getting into the system
This commit is contained in:
Dan Walsh 2013-10-11 09:10:31 -04:00 committed by Stephen Smalley
parent 417fc54d78
commit 5102ed4cb8

View File

@ -1788,9 +1788,15 @@ class fcontextRecords(semanageRecords):
raise ValueError(_("File spec %s conflicts with equivalency rule '%s %s'; Try adding '%s' instead") % (target, i, fdict[i], t))
def __add(self, target, type, ftype = "", serange = "", seuser = "system_u"):
def __add(self, target, type, ftype = "", serange = "s0", seuser = "system_u"):
self.validate(target)
if seuser == "":
seuser = "system_u"
if serange == "":
serange = "s0"
if is_mls_enabled == 1:
serange = untranslate(serange)