Grant all privileges to programs with "User" and "System" Smack labels 48/36348/3
authorRafal Krypa <r.krypa@samsung.com>
Thu, 5 Mar 2015 11:46:04 +0000 (12:46 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 5 Mar 2015 12:11:06 +0000 (13:11 +0100)
Now with application labels no longer hardcoded to "User", it's time to
work on actual policy enforcment in services. Platform components that are
not downloadabla applications will run with "User" and "System" labels (for
User and System domains). They should not be restricted by Cynara.

Change-Id: I62ea8295804f3ad04b1a538642d2098aab45cb48
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
policy/security-manager-policy-reload

index 807daf3..d15cec5 100755 (executable)
@@ -5,7 +5,7 @@ USERTYPE_POLICY_PATH=/usr/share/security-manager/policy
 # Create default buckets
 while read bucket default_policy
 do
-    # Reuse the main bucket for PRIVACY_MANAGER bucket
+    # Reuse the primary bucket for PRIVACY_MANAGER bucket
     [ "$bucket" = "PRIVACY_MANAGER" ] && bucket=""
     cyad --set-bucket="$bucket" --type="$default_policy"
 done <<END
@@ -50,3 +50,9 @@ do
     done |
     cyad --set-policy --bulk=-
 done
+
+# Non-application programs get access to all privileges
+for client in User System
+do
+    cyad --set-policy --bucket=MAIN --client="$client" --user="*" --privilege="*" --type=ALLOW
+done