From: Kyoungyong Lee Date: Wed, 25 May 2016 07:23:12 +0000 (+0900) Subject: changed the smack rule of .privacy-guard.db-journal to System AND added PKGMGR Plugin... X-Git-Tag: accepted/tizen/common/20160525.160213^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c369dbaee503271594ae4951aa90133a10bfccd2;p=platform%2Fcore%2Fsecurity%2Fprivacy-guard.git changed the smack rule of .privacy-guard.db-journal to System AND added PKGMGR Plugin Interfaces Change-Id: Id60304c07e0f41fc0186f3770246ec05061ec18c --- diff --git a/packaging/privacy-guard.spec b/packaging/privacy-guard.spec index 879923b..6745c47 100755 --- a/packaging/privacy-guard.spec +++ b/packaging/privacy-guard.spec @@ -97,6 +97,7 @@ then %{_bindir}/privacy_guard_create_clean_db.sh fi chsmack -a System %{TZ_SYS_DB}/.privacy_guard.db +chsmack -a System %{TZ_SYS_DB}/.privacy_guard.db-journal %postun -p /sbin/ldconfig diff --git a/pkgmgr_plugin/privileges.cpp b/pkgmgr_plugin/privileges.cpp index 3810651..22faba3 100755 --- a/pkgmgr_plugin/privileges.cpp +++ b/pkgmgr_plugin/privileges.cpp @@ -45,6 +45,20 @@ void destroy_char_list(char** ppList, int size) extern "C" __attribute__ ((visibility("default"))) +int PKGMGR_PARSER_PLUGIN_PRE_INSTALL(const char *packageId) +{ + if (packageId == NULL) { + LOGE("Package ID is NULL"); + return -EINVAL; + } + + LOGD("PKGMGR_PARSER_PLUGIN_PRE_INSTALL() called with [%s].", packageId); + + return 0; +} + +extern "C" +__attribute__ ((visibility("default"))) int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr docPtr, const char* packageId) { if (packageId == NULL) { @@ -121,6 +135,35 @@ int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr docPtr, const char* packageId) extern "C" __attribute__ ((visibility("default"))) +int PKGMGR_PARSER_PLUGIN_POST_INSTALL(const char *packageId) +{ + if (packageId == NULL) { + LOGE("Package ID is NULL"); + return -EINVAL; + } + + LOGD("PKGMGR_PARSER_PLUGIN_POST_INSTALL() called with [%s].", packageId); + + return 0; + +} + +extern "C" +__attribute__ ((visibility("default"))) +int PKGMGR_PARSER_PLUGIN_PRE_UNINSTALL(const char *packageId) +{ + if (packageId == NULL) { + LOGE("Package ID is NULL"); + return -EINVAL; + } + + LOGD("PKGMGR_PARSER_PLUGIN_PRE_UNINSTALL() called with [%s].", packageId); + + return 0; +} + +extern "C" +__attribute__ ((visibility("default"))) int PKGMGR_PARSER_PLUGIN_UNINSTALL(xmlDocPtr docPtr, const char* packageId) { if (packageId == NULL) { @@ -151,6 +194,20 @@ int PKGMGR_PARSER_PLUGIN_UNINSTALL(xmlDocPtr docPtr, const char* packageId) extern "C" __attribute__ ((visibility("default"))) +int PKGMGR_PARSER_PLUGIN_POST_UNINSTALL(const char *packageId) +{ + if (packageId == NULL) { + LOGE("Package ID is NULL"); + return -EINVAL; + } + + LOGD("PKGMGR_PARSER_PLUGIN_POST_UNINSTALL() called with [%s].", packageId); + + return 0; +} + +extern "C" +__attribute__ ((visibility("default"))) int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr docPtr, const char* packageId) { if (packageId == NULL) {