update label of buxton client in prepare exec step 50/92250/7 accepted/tizen/3.0/common/20161114.081513 accepted/tizen/3.0/ivi/20161103.131753 accepted/tizen/3.0/mobile/20161103.131701 accepted/tizen/3.0/tv/20161103.131715 accepted/tizen/3.0/wearable/20161103.131735 accepted/tizen/common/20161109.140344 accepted/tizen/ivi/20161110.000434 accepted/tizen/mobile/20161110.000334 accepted/tizen/tv/20161110.000400 accepted/tizen/wearable/20161110.000417 submit/tizen/20161101.112858 submit/tizen/20161108.071447 submit/tizen/20161109.002425 submit/tizen_3.0/20161102.064015 submit/tizen_3.0_common/20161110.084657
authorJiwoong Im <jiwoong.im@samsung.com>
Fri, 14 Oct 2016 06:38:13 +0000 (15:38 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Tue, 1 Nov 2016 06:31:02 +0000 (15:31 +0900)
- launchpad should request to update buxton client label after change smack label

Change-Id: I139d7cfdb0f77d852e16c4f4b5fd6888dd5c3390
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
CMakeLists.txt
packaging/launchpad.spec
src/launchpad_lib.c

index 561895b..2989bb8 100755 (executable)
@@ -28,6 +28,7 @@ PKG_CHECK_MODULES(${this_target_loader} REQUIRED
        bundle
        aul
        vconf
+       buxton2
        )
 
 FOREACH(flag ${${this_target_loader}_CFLAGS})
index 06b6eb3..7c50db3 100644 (file)
@@ -17,6 +17,7 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(libsystemd-daemon)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(buxton2)
 BuildRequires:  pkgconfig(security-manager)
 BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(ttrace)
index 42c8b28..633ec5b 100644 (file)
@@ -29,6 +29,7 @@
 #include <bundle_internal.h>
 #include <aul.h>
 #include <security-manager.h>
+#include <buxton2.h>
 
 #include "launchpad_common.h"
 #include "launchpad.h"
@@ -56,12 +57,20 @@ static void __at_exit_to_release_bundle(void)
                bundle_free(__bundle);
 }
 
+static void __buxton_cb(int status, const struct buxton_layer *layer,
+               const char *key, const struct buxton_value *val,
+               void *user_data)
+{
+       _D("buxton_update_client_label result : %d", status);
+}
+
 static int __prepare_exec(const char *appid, const char *app_path,
                        const char *pkg_type, int type)
 {
        const char *file_name = NULL;
        char process_name[AUL_PR_NAME] = { 0, };
        int ret;
+       struct buxton_client *bxt_cli;
 
        __preexec_run(pkg_type, appid, app_path);
 
@@ -75,6 +84,18 @@ static int __prepare_exec(const char *appid, const char *app_path,
                return -1;
        }
 
+       ret = buxton_open(&bxt_cli, NULL, NULL);
+       if (ret != 0) {
+               _E("buxton_open() failed");
+               return -1;
+       }
+       ret = buxton_update_client_label(bxt_cli, __buxton_cb, NULL);
+       if (ret != 0) {
+               _E("buxton_update_client_label() failed");
+               return -1;
+       }
+       buxton_close(bxt_cli);
+
        /*
         * SET DUMPABLE - for coredump
         * This dumpable flag should be set after