Fix smack labeling for preload apps 79/38979/2 accepted/tizen/common/20150506.091512 accepted/tizen/mobile/20150506.234703 accepted/tizen/tv/20150506.095556 accepted/tizen/wearable/20150506.095712 submit/tizen/20150506.051257
authorSangyoon Jang <s89.jang@samsung.com>
Wed, 6 May 2015 03:32:18 +0000 (12:32 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Wed, 6 May 2015 03:39:41 +0000 (20:39 -0700)
Change-Id: I87b7df7c94c673f37c6adde7f4fdde637738a06c
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
tool/pkg_privilege.c

index f34ce0d..e6d7030 100644 (file)
 #define OWNER_ROOT 0
 #define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
 
-static const char *__get_path(char *pkgid, char *appid, uid_t uid)
+static const char *__get_path(const char *pkgid, const char *appid, uid_t uid)
 {
        char buf[BUFSIZE];
-       char *path;
+       const char *path;
 
        /* TODO: unify application directory layout */
        if (uid == OWNER_ROOT || uid == GLOBAL_USER)
@@ -58,7 +58,7 @@ static int __insert_privilege(char *manifest, uid_t uid)
                security_manager_app_inst_req_set_app_id(req, uiapp->appid);
                path = __get_path(mfx->package, uiapp->appid, uid);
                security_manager_app_inst_req_add_path(req, path,
-                               SECURITY_MANAGER_PATH_PUBLIC_RO);
+                               SECURITY_MANAGER_PATH_PRIVATE);
                uiapp = uiapp->next;
        }
 
@@ -67,7 +67,7 @@ static int __insert_privilege(char *manifest, uid_t uid)
                security_manager_app_inst_req_set_app_id(req, svcapp->appid);
                path = __get_path(mfx->package, svcapp->appid, uid);
                security_manager_app_inst_req_add_path(req, path,
-                               SECURITY_MANAGER_PATH_PUBLIC_RO);
+                               SECURITY_MANAGER_PATH_PRIVATE);
                svcapp = svcapp->next;
        }