Move data dir labeling & chowning to key-manager post 18/56618/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 11 Jan 2016 10:48:23 +0000 (11:48 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 11 Jan 2016 11:35:40 +0000 (12:35 +0100)
[Problem] Key-manager data dir was labeled and chowned in key-manager-listener
post install section.
[Solution] Moved to key-manager post section

[Verification] Install key-manager. Smack shouldn't report any denials to data
directory.

Change-Id: I345716a676f6abaa8670911e1ec7af3e57e9cb54

packaging/key-manager.spec

index 365d502..544ecf3 100644 (file)
@@ -203,6 +203,10 @@ fi
 
 if [ $1 = 2 ]; then
     # update
+
+    # In ckm version <= 0.1.18 all files were owned by root.
+    find /opt/data/ckm -exec chsmack -a %{smack_domain_name} {} \;
+    chown %{user_name}:%{group_name} -R /opt/data/ckm
     systemctl restart central-key-manager.service
 fi
 
@@ -232,10 +236,6 @@ if [ $1 = 1 ]; then
 fi
 if [ $1 = 2 ]; then
     # update
-
-    # In ckm version <= 0.1.18 all files were owned by root.
-    find /opt/data/ckm -exec chsmack -a %{smack_domain_name} {} \;
-    chown %{user_name}:%{group_name} -R /opt/data/ckm
     systemctl restart central-key-manager-listener.service
 fi