diff options
author | Peter Jones <pjones@redhat.com> | 2007-10-18 20:27:32 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2007-10-18 20:27:32 +0000 |
commit | d32c58af29e8ca27fa53726b9e37ba664d44d225 (patch) | |
tree | d4756b19b26f55764e020b58a64d881f000d78df /fsset.py | |
parent | cfa0b4b12266e8e44f13bc458204b3a11abd9a80 (diff) | |
download | anaconda-d32c58af29e8ca27fa53726b9e37ba664d44d225.tar.gz anaconda-d32c58af29e8ca27fa53726b9e37ba664d44d225.tar.xz anaconda-d32c58af29e8ca27fa53726b9e37ba664d44d225.zip |
- fix selinux labels on $MOUNTPOINT/ and $MOUNTPOINT/lost+found (#335621)
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -160,6 +160,8 @@ labelFactory = LabelFactory() class FileSystemType: kernelFilesystems = {} + lostAndFoundContext = None + def __init__(self): self.deviceArguments = {} self.formattable = 0 @@ -192,6 +194,15 @@ class FileSystemType: fstype = self.getName(), readOnly = readOnly, bindMount = bindMount) + if flags.selinux: + ret = isys.resetFileContext(mountpoint, instroot) + log.info("set SELinux context for newly mounted filesystem root at %s to %s" %(mountpoint, ret)) + if FileSystemType.lostAndFoundContext is None: + FileSystemType.lostAndFoundContext = \ + isys.matchPathContext("/lost+found") + isys.setFileContext("%s/lost+found" % (mountpoint,), + FileSystemType.lostAndFoundContext, instroot) + def umount(self, device, path): isys.umount(path, removeDir = 0) |