#define _MAX_PACKAGEID_LENGTH 10
#define _MAX_APIVERSION_LENGTH 3
+#ifdef _SECURE_LOG
+#define _SECURE_LOGI LOGI
+#define _SECURE_LOGE LOGE
+#else
+#define _SECURE_LOGI(...)
+#define _SECURE_LOGE(...)
+#endif
+
static const char* _OSP_HOME_PATH = "/opt/osp/\0"; // /opt/apps/com.samsung.osp
static const char* _OSP_COMPAT_SHARED_PATH = "/opt/usr/share/.osp-compat/\0";
static const char* _EXT_OSP_HOME_PATH = "/opt/storage/sdcard/osp/\0";
memset(app_rootpath, '\0', length + 1);
strncpy(app_rootpath, bin_path, length);
-#ifdef _SECURE_LOG
- LOGI("input bin_path: %s", app_rootpath);
-#endif
+ _SECURE_LOGI("input bin_path: %s", app_rootpath);
delimiter = strrchr(app_rootpath, '/');
*delimiter = '\0';
}
strncpy(package_id, p, _MAX_PACKAGEID_LENGTH);
package_id[_MAX_PACKAGEID_LENGTH] = '\0';
-#ifdef _SECURE_LOG
- LOGI("package id: %s", package_id);
-#endif
+
+ _SECURE_LOGI("package id: %s", package_id);
}
static void
}
package_id[_MAX_PACKAGEID_LENGTH] = '\0';
-#ifdef _SECURE_LOG
- LOGI("package_id: %s", package_id);
-#endif
+
+ _SECURE_LOGI("package_id: %s", package_id);
}
static int
/* e.g., app_rootdir is "/opt/apps/com.samsung.basicapp or /opt/osp/applications/[appId] */
app_rootpath = get_app_rootpath_from_path(bin_path);
- LOGI("[data_caging] do_pre_exe() was called, package: %s (%s), binary: %s, app root: %s",
- package_name, package_id, bin_path, app_rootpath);
+ _SECURE_LOGI("[data_caging] do_pre_exe() was called, package name: %s, package id: %s, binary: %s, app root: %s",
+ package_name, package_id, bin_path, app_rootpath);
umask(0000);
char osp_app_data_path[PATH_MAX] = { 0, };
int osp_compat = 0;
-#ifdef _SECURE_LOG
- LOGI("do_pre_exec() is called, package name: %s, binary path: %s", package_name, bin_path);
-#endif
+ _SECURE_LOGI("do_pre_exec() is called, package name: %s, binary path: %s", package_name, bin_path);
app_rootpath = get_app_rootpath_from_path(bin_path);
#endif
// XXX-end
- LOGI("package: %s (%s), binary: %s, OSP compat: %d", package_name, package_id, bin_path, osp_compat);
+ _SECURE_LOGI("package: %s (%s), binary: %s, OSP compat: %d", package_name, package_id, bin_path, osp_compat);
// FIXME: Temporary code with security risk
prctl(PR_SET_KEEPCAPS, 1);