summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeho Lee <jaeho81.lee@samsung.com>2013-03-19 14:18:46 +0900
committerJaeho Lee <jaeho81.lee@samsung.com>2013-03-19 14:18:46 +0900
commit68d661f7b823ecbd53f05b40408e10d187c94ea7 (patch)
tree439f6245a65ac6818114fc4603b41a2fcdd7de30
parent3499554788cb4e6ff7e1354a2caefaf350392f3d (diff)
parent8eab15fff0fbc4c07f5d1e11d276b331af940a3e (diff)
downloadaul-1-68d661f7b823ecbd53f05b40408e10d187c94ea7.tar.gz
aul-1-68d661f7b823ecbd53f05b40408e10d187c94ea7.tar.bz2
aul-1-68d661f7b823ecbd53f05b40408e10d187c94ea7.zip
Merge branch 'master' into tizen_2.1
fixed send_result bug Conflicts: am_daemon/amd_launch.c am_daemon/amd_request.c include/aul.h packaging/aul.spec src/launch.c Signed-off-by: Jaeho Lee <jaeho81.lee@samsung.com>
-rwxr-xr-xam_daemon/amd_launch.c7
-rwxr-xr-xam_daemon/amd_request.c2
-rwxr-xr-xinclude/aul.h3
-rw-r--r--packaging/aul.spec2
-rwxr-xr-xsrc/launch.c3
5 files changed, 12 insertions, 5 deletions
diff --git a/am_daemon/amd_launch.c b/am_daemon/amd_launch.c
index c69388e5..d0c119b5 100755
--- a/am_daemon/amd_launch.c
+++ b/am_daemon/amd_launch.c
@@ -632,16 +632,19 @@ int _start_app(char* appid, bundle* kb, int cmd, int caller_pid, uid_t caller_ui
if (cmd == APP_START_RES)
bundle_add(kb, AUL_K_WAIT_RESULT, "1");
+ ret = aul_app_get_appid_bypid(caller_pid, caller_appid, sizeof(caller_appid));
+ if(ret == 0) {
+ bundle_add(kb, AUL_K_CALLER_APPID, caller_appid);
+ }
+
ai = appinfo_find(_laf, appid);
componet = appinfo_get_value(ai, AIT_COMP);
app_path = appinfo_get_value(ai, AIT_EXEC);
pkg_type = appinfo_get_value(ai, AIT_TYPE);
permission = appinfo_get_value(ai, AIT_PERM);
-
if(permission && strncmp(permission, "signature", 9) == 0 ) {
if(caller_uid != 0 && (cmd == APP_START || cmd == APP_START_RES)){
- aul_app_get_appid_bypid(caller_pid, caller_appid, sizeof(caller_appid));
pkgmgrinfo_pkginfo_compare_app_cert_info(caller_appid, appid, &compare_result);
if(compare_result != PMINFO_CERT_COMPARE_MATCH) {
pid = -EILLEGALACCESS;
diff --git a/am_daemon/amd_request.c b/am_daemon/amd_request.c
index 89ab7c0c..9bc7b063 100755
--- a/am_daemon/amd_request.c
+++ b/am_daemon/amd_request.c
@@ -114,7 +114,7 @@ static int __foward_cmd(int cmd, bundle *kb, int cr_pid)
bundle_add(kb, AUL_K_CALLEE_PID, tmp_pid);
bundle_encode(kb, &kb_data, &datalen);
- if ((res = __app_send_raw(pid, cmd, kb_data, datalen)) < 0)
+ if ((res = __app_send_raw_with_noreply(pid, cmd, kb_data, datalen)) < 0)
res = AUL_R_ERROR;
free(kb_data);
diff --git a/include/aul.h b/include/aul.h
index 84ac783d..cd18f3ee 100755
--- a/include/aul.h
+++ b/include/aul.h
@@ -142,6 +142,9 @@ typedef enum _aul_type{
/** AUL public key - To check callee's secuirty */
#define AUL_K_CALLEE_PID "__AUL_CALLEE_PID__"
+/** AUL public key - To check caller's secuirty */
+#define AUL_K_CALLER_APPID "__AUL_CALLER_APPID__"
+
/** AUL public key - To find argv0 */
#define AUL_K_ARGV0 "__AUL_ARGV0__"
/** AUL public key - To measure launching time */
diff --git a/packaging/aul.spec b/packaging/aul.spec
index e224c3d9..9aeb442b 100644
--- a/packaging/aul.spec
+++ b/packaging/aul.spec
@@ -1,6 +1,6 @@
Name: aul
Summary: App utility library
-Version: 0.0.257
+Version: 0.0.259
Release: 1
Group: System/Libraries
License: Apache License, Version 2.0
diff --git a/src/launch.c b/src/launch.c
index 283ea8c0..9c618083 100755
--- a/src/launch.c
+++ b/src/launch.c
@@ -299,8 +299,9 @@ int aul_sock_handler(int fd)
return -1;
}
- if (pkt->cmd != APP_RESULT && pkt->cmd != APP_CANCEL)
+ if (pkt->cmd != APP_RESULT && pkt->cmd != APP_CANCEL) {
__send_result_to_launchpad(clifd, 0);
+ }
switch (pkt->cmd) {
case APP_START: /* run in callee */