Set TZ_USER_APP directory permission in gumd script 69/99269/1
authorjooseong lee <jooseong.lee@samsung.com>
Tue, 22 Nov 2016 08:42:33 +0000 (17:42 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Tue, 22 Nov 2016 08:43:27 +0000 (17:43 +0900)
Some service daemons, non root, access to application data directory.
In case, they have cap_dac_override. We will change file permission
to access app data directory for service daemon and remove their
cap_dac_override.

Change-Id: I0d007f9277229b9be889d9cb01c3c79e82f8b1db
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
config/91_user-dbspace-permissions.post

index 055ebd826056f43367069763941c7e8088a7d2bd..eb5dcf29b64bd9972347ff94d8b879318585190d 100644 (file)
@@ -3,9 +3,16 @@
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 NEW_USER=$1
+export `tzplatform-get --user $NEW_USER TZ_USER_HOME`
+export `tzplatform-get --user $NEW_USER TZ_USER_APP`
 export `tzplatform-get --user $NEW_USER TZ_USER_APPROOT`
 export `tzplatform-get --user $NEW_USER TZ_USER_DB`
-export `tzplatform-get --user $NEW_USER TZ_USER_HOME`
+
+chown $NEW_USER:system_share $TZ_USER_HOME
+chmod 750 $TZ_USER_HOME
+
+chown $NEW_USER:system_share $TZ_USER_APP
+chmod 750 $TZ_USER_APP
 
 chown $NEW_USER:system_share $TZ_USER_APPROOT
 chmod 750 $TZ_USER_APPROOT
@@ -13,9 +20,6 @@ chmod 750 $TZ_USER_APPROOT
 chown $NEW_USER:system_share $TZ_USER_DB
 chmod 770 $TZ_USER_DB
 
-chown $NEW_USER:system_share $TZ_USER_HOME
-chmod 750 $TZ_USER_HOME
-
 if [ ! -d $TZ_USER_DB/privacy ]
 then
     mkdir -p $TZ_USER_DB/privacy