Print appid for debugging 30/286730/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 12 Jan 2023 06:47:20 +0000 (06:47 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 12 Jan 2023 06:47:20 +0000 (06:47 +0000)
To debug which the application is calling security_manager_prepare_app_v2(),
the launchpad prints the application ID.
This patch fixes the typo and removes build warning message.

Change-Id: I3c38ff369ab4cc01aac2c8fdfd3d1e74c3f490ee
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-parser/launchpad_parser_plugin.cc
src/launchpad-process-pool/src/launchpad.c
src/lib/launchpad/src/launchpad_lib.c

index 135a554..eacfbf2 100644 (file)
@@ -54,7 +54,7 @@ int LaunchpadParser::WriteToFile(std::string pkgid) {
     if (i->GetPreloadLib().size() > 0) {
       out_file << "EXTRA_ARRAY    preload \n";
       for (auto& lib : i->GetPreloadLib()) {
-        out_file << "EXTRA_ARRAY_VAL    "LIBDIR"/" + lib + "\n";
+        out_file << "EXTRA_ARRAY_VAL    " LIBDIR "/" + lib + "\n";
       }
     }
     out_file.close();
index 39c52f9..be6ab2a 100644 (file)
@@ -1338,9 +1338,9 @@ static int __prepare_exec(const char *appid, const char *app_path,
 
        /* SET PRIVILEGES*/
        enabled_light_user = bundle_get_val(kb, AUL_K_ENABLED_LIGHT_USER);
-       _W("security_manager_prepare_app2 ++");
+       _W("security_manager_prepare_app2 ++ %s", appid);
        ret = security_manager_prepare_app2(appid, enabled_light_user);
-       _W("security_manager_prepare_app2 --");
+       _W("security_manager_prepare_app2 -- %s", appid);
        if (ret != SECURITY_MANAGER_SUCCESS)
                return PAD_ERR_REJECTED;
 
index 7980efc..9bd3832 100644 (file)
@@ -77,7 +77,7 @@ static int __prepare_exec(const char *appid, const char *app_path,
                return -1;
 
        /* SET PRIVILEGES*/
-       SECURE_LOGD("[candidata] appid : %s / pkg_type : %s / app_path : %s",
+       SECURE_LOGD("[candidate] appid : %s / pkg_type : %s / app_path : %s",
                appid, pkg_type, app_path);
 
        if (global)
@@ -96,9 +96,9 @@ static int __prepare_exec(const char *appid, const char *app_path,
                return -1;
 
        enabled_light_user = bundle_get_val(kb, AUL_K_ENABLED_LIGHT_USER);
-       _W("security_manager_prepare_app2 ++");
+       _W("security_manager_prepare_app2 ++ %s", appid);
        ret = security_manager_prepare_app2(appid, enabled_light_user);
-       _W("security_manager_prepare_app2 --");
+       _W("security_manager_prepare_app2 -- %s", appid);
        if (ret != SECURITY_MANAGER_SUCCESS) {
                _E("Failed to set privileges %s:%d", appid, ret);
                return -1;