summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeho Lee <jaeho81.lee@samsung.com>2013-03-15 19:38:20 +0900
committerJaeho Lee <jaeho81.lee@samsung.com>2013-03-15 19:38:20 +0900
commit36056ebbb4b4bf61ad02544a5ab6c25ef0dd160b (patch)
tree5809d5293c06a040bbc9cc43494eae5ac6b03b90
parentaaa1092460ed53f71f831585dfcb34b9f7a02612 (diff)
downloadaul-1-36056ebbb4b4bf61ad02544a5ab6c25ef0dd160b.tar.gz
aul-1-36056ebbb4b4bf61ad02544a5ab6c25ef0dd160b.tar.bz2
aul-1-36056ebbb4b4bf61ad02544a5ab6c25ef0dd160b.zip
added caller appid bundle key
Signed-off-by: Jaeho Lee <jaeho81.lee@samsung.com>
-rwxr-xr-xam_daemon/amd_launch.c7
-rwxr-xr-xinclude/aul.h3
-rw-r--r--packaging/aul.spec2
3 files changed, 9 insertions, 3 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/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..66af222b 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.258
Release: 1
Group: System/Libraries
License: Apache License, Version 2.0