From e69677aa39bb8e6c988ab0bde8e6b498a174c533 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Mon, 27 Jul 2015 13:13:38 +0900 Subject: [PATCH] Fix manifest installation for global app root user is also for installation of global app Change-Id: I4b231eb34623b0c4c65ff57e5542c8721fca5327 Signed-off-by: Sangyoon Jang --- tool/pkg_info.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tool/pkg_info.c b/tool/pkg_info.c index ef51682..0c09f41 100644 --- a/tool/pkg_info.c +++ b/tool/pkg_info.c @@ -37,6 +37,8 @@ #include "pkgmgr-dbinfo.h" #include "pkgmgr_installer.h" +#define OWNER_ROOT 0 + static void __print_usage(); static int __get_pkg_info(char *pkgid, uid_t uid); static int __get_app_info(char *appid); @@ -1572,10 +1574,10 @@ static int __insert_manifest_in_db(char *manifest, uid_t uid) printf("Manifest file is NULL\n"); return -1; } - if (uid != GLOBAL_USER) - ret = pkgmgr_parser_parse_usr_manifest_for_installation(manifest, uid, NULL); - else + if (uid == GLOBAL_USER || uid == OWNER_ROOT) ret = pkgmgr_parser_parse_manifest_for_installation(manifest, NULL); + else + ret = pkgmgr_parser_parse_usr_manifest_for_installation(manifest, uid, NULL); if (ret < 0) { printf("insert in db failed\n"); return -1; -- 2.7.4