  
  ###### lock ########
  
-@@ -841,12 +845,34 @@
+@@ -841,12 +845,38 @@
      return osd_id
  
  def get_ceph_user():

 
 def path_set_context(path):
     # restore selinux context to default policy values
@@ -1947,7 +1973,7 @@
             '--osd-uuid', fsid,
             '--keyring', os.path.join(path, 'keyring'),
             '--setuser', get_ceph_user(),

-        return 'ceph'
-    except KeyError:
-        return 'root'
+    global CEPH_PREF_USER
+
+    if CEPH_PREF_USER != None:
+        try:
+            pwd.getpwnam(CEPH_PREF_USER)
