add setting directory privilege for ui-gadget client submit/tizen_2.2/20130714.153410
authorHyungdeuk Kim <hd3.kim@samsung.com>
Wed, 10 Jul 2013 08:10:51 +0000 (17:10 +0900)
committerHyungdeuk Kim <hd3.kim@samsung.com>
Wed, 10 Jul 2013 08:10:51 +0000 (17:10 +0900)
packaging/pkgmgr.spec
tool/pkg_smack.c [changed mode: 0644->0755]

index 16a030a..b95363e 100755 (executable)
@@ -1,7 +1,7 @@
 #sbs-git:slp/pkgs/s/slp-pkgmgr pkgmgr 0.1.103 29b53909a5d6e8728429f0a188177eac691cb6ce
 Name:       pkgmgr
 Summary:    Packager Manager client library package
-Version:    0.2.103
+Version:    0.2.104
 Release:    1
 Group:      System/Libraries
 License:    Apache License, Version 2.0
old mode 100644 (file)
new mode 100755 (executable)
index 7fe3073..7afdb0d
@@ -309,7 +309,7 @@ static void __apply_shared_privileges(char *pkgname, int flag)
        /*execute privilege APIs. The APIs should not fail*/
        __pkg_smack_register_package(pkgname);
 
-#if 0
+#if 1
        /*home dir. Dont setup path but change smack access to "_" */
        snprintf(dirpath, BUFF_SIZE, "/usr/apps/%s", pkgname);
        if (__is_dir(dirpath))
@@ -389,8 +389,11 @@ static int __pkg_list_cb (const pkgmgrinfo_pkginfo_h handle, void *user_data)
 static int __additional_rpm_for_smack()
 {
        char *pkgid = "ui-gadget::client";
-
+       char *perm[] = {"http://tizen.org/privilege/appsetting", NULL};
+       
        __apply_shared_privileges(pkgid, 0);
+
+       __pkg_smack_enable_permissions(pkgid, 1, perm, 1);
        return 0;
 }