]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix selinux context after intitial OSD mount.
authorMilan Broz <mbroz@redhat.com>
Fri, 12 Jun 2015 11:07:05 +0000 (13:07 +0200)
committerBoris Ranto <branto@redhat.com>
Wed, 5 Aug 2015 13:21:47 +0000 (15:21 +0200)
The SELinux context is not preserved across file-systems, we need to
manually set the context of the root of the file-system in order to
preserve SELinux context inheritence rules.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
src/ceph-disk

index 5c0e1ba65e95b3fb6146bc3ffdffa40f64f96042..fc7949f71b72b7bed1c2e834f9b37add324ed55a 100755 (executable)
@@ -953,6 +953,12 @@ def mount(
                 path,
                 ],
             )
+        command(
+           [
+                'restorecon',
+                path,
+                ],
+           )
     except subprocess.CalledProcessError as e:
         try:
             os.rmdir(path)