summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiwoong Im <jiwoong.im@samsung.com>2016-10-14 15:38:13 +0900
committerJiwoong Im <jiwoong.im@samsung.com>2016-11-01 15:31:02 +0900
commit69f061998f939a18243b67ba1b596cf77a7e1acd (patch)
treefc6e08083a4cad03973e57356bcd6e52fdac9c95
parent49c2e62468d47e7b30877f24cf20a3df226687f2 (diff)
downloadlaunchpad-69f061998f939a18243b67ba1b596cf77a7e1acd.tar.gz
launchpad-69f061998f939a18243b67ba1b596cf77a7e1acd.tar.bz2
launchpad-69f061998f939a18243b67ba1b596cf77a7e1acd.zip
- launchpad should request to update buxton client label after change smack label Change-Id: I139d7cfdb0f77d852e16c4f4b5fd6888dd5c3390 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
-rwxr-xr-xCMakeLists.txt1
-rw-r--r--packaging/launchpad.spec1
-rw-r--r--src/launchpad_lib.c21
3 files changed, 23 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 561895b..2989bb8 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,6 +28,7 @@ PKG_CHECK_MODULES(${this_target_loader} REQUIRED
bundle
aul
vconf
+ buxton2
)
FOREACH(flag ${${this_target_loader}_CFLAGS})
diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec
index 06b6eb3..7c50db3 100644
--- a/packaging/launchpad.spec
+++ b/packaging/launchpad.spec
@@ -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)
diff --git a/src/launchpad_lib.c b/src/launchpad_lib.c
index 42c8b28..633ec5b 100644
--- a/src/launchpad_lib.c
+++ b/src/launchpad_lib.c
@@ -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