rollback rpm smack
authorjunsuk77.oh <junsuk77.oh@samsung.com>
Fri, 28 Jun 2013 04:54:47 +0000 (13:54 +0900)
committerjunsuk77.oh <junsuk77.oh@samsung.com>
Fri, 28 Jun 2013 04:54:47 +0000 (13:54 +0900)
Change-Id: I29da3cfa0c825df8ac3615d4b85e86c938689517
Signed-off-by: junsuk77.oh <junsuk77.oh@samsung.com>
CMakeLists.txt
packaging/pkgmgr-info.spec
parser/CMakeLists.txt
parser/pkgmgr_parser.c
parser/pkgmgr_parser_db.h
parser/pkgmgr_parser_privilege.c [deleted file]
pkgmgr_smack_list.txt.in [deleted file]

index 39e22b0..64c6a0c 100755 (executable)
@@ -57,11 +57,9 @@ configure_file(parser_path.conf.in parser_path.conf @ONLY)
 configure_file(pkgmgr-info.manifest.in pkgmgr-info.manifest @ONLY)
 configure_file(pkgmgr-parser.manifest.in pkgmgr-parser.manifest @ONLY)
 configure_file(mdparser_list.txt.in mdparser_list.txt @ONLY)
-configure_file(pkgmgr_smack_list.txt.in pkgmgr_smack_list.txt @ONLY)
 
 INSTALL(TARGETS pkgmgr-info DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-info.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/pkgmgr-info.h DESTINATION include)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/parser_path.conf DESTINATION ${PREFIX}/etc/package-manager/)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mdparser_list.txt DESTINATION ${PREFIX}/etc/package-manager/parserlib/metadata)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr_smack_list.txt DESTINATION ${PREFIX}/etc/package-manager/)
index 85ff1b6..f6ff9c8 100755 (executable)
@@ -85,7 +85,6 @@ chsmack -a '_' /usr/etc/package-manager
 %{_prefix}/etc/package-manager/preload/xml.xsd
 %{_prefix}/etc/package-manager/parser_path.conf
 %{_prefix}/etc/package-manager/parserlib/metadata/mdparser_list.txt
-%{_prefix}/etc/package-manager/pkgmgr_smack_list.txt
 
 %files parser-devel
 %defattr(-,root,root,-)
index e44b345..870973d 100755 (executable)
@@ -43,7 +43,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
 
 ## pkgmgr_parser object (by sewook.park)
 # This library is for installer backend
-add_library(pkgmgr_parser SHARED pkgmgr_parser.c pkgmgr_parser_db.c pkgmgr_parser_privilege.c)
+add_library(pkgmgr_parser SHARED pkgmgr_parser.c pkgmgr_parser_db.c)
 #add_library(pkgmgr_parser SHARED pkgmgr_parser.c)
 set_target_properties(pkgmgr_parser PROPERTIES SOVERSION ${VERSION_MAJOR})
 set_target_properties(pkgmgr_parser PROPERTIES VERSION ${VERSION})
index 6f2e712..27d1830 100755 (executable)
@@ -33,7 +33,6 @@
 #include <libxml/xmlschemas.h>
 #include <vconf.h>
 #include <glib.h>
-#include <sys/stat.h>
 
 #include "pkgmgr_parser.h"
 #include "pkgmgr_parser_internal.h"
 #define ASCII(s) (const char *)s
 #define XMLCHAR(s) (const xmlChar *)s
 
-#define PRELOAD_PACKAGE_LIST "/usr/etc/package-manager/preload/preload_list.txt"
-#define SCHEMA_FILE "/usr/etc/package-manager/preload/manifest.xsd"
-
 #define MDPARSER_LIST "/usr/etc/package-manager/parserlib/metadata/mdparser_list.txt"
 #define MDPARSER_NAME  "mdparser:"
 
-#define SMACK_LIST "/usr/etc/package-manager/pkgmgr_smack_list.txt"
-
-#define BUFMAX 1024*128
-
-#define BUFF_SIZE                      256
-#define APP_OWNER_ID           5000
-#define APP_GROUP_ID           5000
-
-#define LIBAPPSVC_PATH "/usr/lib/libappsvc.so.0"
-#define LIBAIL_PATH "/usr/lib/libail.so.0"
-#define DESKTOP_RW_PATH "/opt/share/applications/"
-#define DESKTOP_RO_PATH "/usr/share/applications/"
-#define MANIFEST_RO_PREFIX "/usr/share/packages/"
-
-/* operation_type */
-typedef enum {
-       AIL_INSTALL = 0,
-       AIL_UPDATE,
-       AIL_REMOVE,
-       AIL_CLEAN,
-       AIL_MAX
-} AIL_TYPE;
-
-enum rpm_path_type {
-       RPM_PATH_PRIVATE,
-       RPM_PATH_GROUP_RW,
-       RPM_PATH_PUBLIC_RO,
-       RPM_PATH_SETTINGS_RW,
-       RPM_PATH_ANY_LABEL
-};
-
 /* operation_type */
 typedef enum {
        ACTION_INSTALL = 0,
@@ -177,73 +142,6 @@ static void __processNode(xmlTextReaderPtr reader, ACTION_TYPE action, char *con
 static void __streamFile(const char *filename, ACTION_TYPE action, char *const tagv[], const char *pkgid);
 static int __validate_appid(const char *pkgid, const char *appid, char **newappid);
 
-static int __is_dir(char *dirname)
-{
-       struct stat stFileInfo;
-       stat(dirname, &stFileInfo);
-       if (S_ISDIR(stFileInfo.st_mode)) {
-               return 1;
-       }
-       return 0;
-}
-
-static void __apply_shared_privileges(char *pkgname, int flag)
-{
-       char dirpath[BUFF_SIZE] = {'\0'};
-       /*execute privilege APIs. The APIs should not fail*/
-       pkgmgr_parser_privilege_register_package(pkgname);
-
-#if 0
-       /*home dir. Dont setup path but change smack access to "_" */
-       snprintf(dirpath, BUFF_SIZE, "/usr/apps/%s", pkgname);
-       if (__is_dir(dirpath))
-               pkgmgr_parser_privilege_change_smack_label(dirpath, "_", 0);/*0 is SMACK_LABEL_ACCESS*/
-       memset(dirpath, '\0', BUFF_SIZE);
-       snprintf(dirpath, BUFF_SIZE, "/opt/usr/apps/%s", pkgname);
-       if (__is_dir(dirpath))
-               pkgmgr_parser_privilege_change_smack_label(dirpath, "_", 0);/*0 is SMACK_LABEL_ACCESS*/
-       memset(dirpath, '\0', BUFF_SIZE);
-
-       /*/shared dir. Dont setup path but change smack access to "_" */
-       snprintf(dirpath, BUFF_SIZE, "/usr/apps/%s/shared", pkgname);
-       if (__is_dir(dirpath))
-               pkgmgr_parser_privilege_change_smack_label(dirpath, "_", 0);/*0 is SMACK_LABEL_ACCESS*/
-       memset(dirpath, '\0', BUFF_SIZE);
-       snprintf(dirpath, BUFF_SIZE, "/opt/usr/apps/%s/shared", pkgname);
-       if (__is_dir(dirpath))
-               pkgmgr_parser_privilege_change_smack_label(dirpath, "_", 0);/*0 is SMACK_LABEL_ACCESS*/
-       memset(dirpath, '\0', BUFF_SIZE);
-
-       /*/shared/res dir. setup path */
-       if (flag == 0)
-               snprintf(dirpath, BUFF_SIZE, "/usr/apps/%s/shared/res", pkgname);
-       else
-               snprintf(dirpath, BUFF_SIZE, "/opt/usr/apps/%s/shared/res", pkgname);
-       if (__is_dir(dirpath))
-               pkgmgr_parser_privilege_setup_path(pkgname, dirpath, RPM_PATH_PUBLIC_RO, NULL);
-       memset(dirpath, '\0', BUFF_SIZE);
-
-       /*/shared/data dir. setup path and change group to 'app'*/
-       if (flag == 0)
-               snprintf(dirpath, BUFF_SIZE, "/usr/apps/%s/shared/data", pkgname);
-       else
-               snprintf(dirpath, BUFF_SIZE, "/opt/usr/apps/%s/shared/data", pkgname);
-       if (__is_dir(dirpath)) {
-               chown(dirpath, APP_OWNER_ID, APP_GROUP_ID);
-               pkgmgr_parser_privilege_setup_path(pkgname, dirpath, RPM_PATH_PUBLIC_RO, NULL);
-       } else {
-               memset(dirpath, '\0', BUFF_SIZE);
-               if (flag == 0)
-                       snprintf(dirpath, BUFF_SIZE, "/opt/usr/apps/%s/shared/data", pkgname);
-               else
-                       snprintf(dirpath, BUFF_SIZE, "/usr/apps/%s/shared/data", pkgname);
-               if (__is_dir(dirpath))
-                       chown(dirpath, APP_OWNER_ID, APP_GROUP_ID);
-                       pkgmgr_parser_privilege_setup_path(pkgname, dirpath, RPM_PATH_PUBLIC_RO, NULL);
-       }
-#endif
-}
-
 static void __str_trim(char *input)
 {
        char *trim_str = input;
@@ -1929,47 +1827,6 @@ static void __ps_free_ime(ime_x *ime)
        ime = NULL;
 }
 
-static void __ps_apply_shared_privileges(manifest_x * mfx, const char *manifest)
-{
-       int home_dir = 0;
-
-       if(strstr(manifest, MANIFEST_RO_PREFIX))
-               home_dir = 0;
-       else
-               home_dir = 1;
-
-       if ((strcmp(mfx->type,"tpk")!=0) || (strcmp(mfx->type,"wgt")!=0)){
-               DBG("rpm pkg is detected, apply smack\n");
-               __apply_shared_privileges(mfx->package, home_dir);
-       }
-}
-
-static void  __ps_process_smack()
-{
-       FILE *fp = NULL;
-       char pkgid[PKG_STRING_LEN_MAX] = { 0 };
-
-       fp = fopen(SMACK_LIST, "r");
-       if (fp == NULL) {
-               DBG("no preload list\n");
-               return -1;
-       }
-
-       while (fgets(pkgid, sizeof(pkgid), fp) != NULL) {
-               __str_trim(pkgid);
-               DBG("pkgid = %s\n", pkgid);
-
-               __apply_shared_privileges(pkgid,0);
-
-               memset(pkgid, 0x00, sizeof(pkgid));
-       }
-
-       if (fp != NULL)
-               fclose(fp);
-
-       return 0;
-}
-
 int __ps_process_mdparser(manifest_x *mfx, ACTION_TYPE action)
 {
        int ret = -1;
@@ -3713,6 +3570,10 @@ static int __process_manifest(xmlTextReaderPtr reader, manifest_x * mfx)
        return ret;
 }
 
+#define DESKTOP_RW_PATH "/opt/share/applications/"
+#define DESKTOP_RO_PATH "/usr/share/applications/"
+#define MANIFEST_RO_PREFIX "/usr/share/packages/"
+
 static char* __convert_to_system_locale(const char *mlocale)
 {
        if (mlocale == NULL)
@@ -3731,6 +3592,17 @@ static char* __convert_to_system_locale(const char *mlocale)
        return locale;
 }
 
+#define LIBAIL_PATH "/usr/lib/libail.so.0"
+
+/* operation_type */
+typedef enum {
+       AIL_INSTALL = 0,
+       AIL_UPDATE,
+       AIL_REMOVE,
+       AIL_CLEAN,
+       AIL_MAX
+} AIL_TYPE;
+
 static int __ail_change_info(int op, const char *appid)
 {
        void *lib_handle = NULL;
@@ -3780,6 +3652,7 @@ END:
 
 /* desktop shoud be generated automatically based on manifest */
 /* Currently removable, taskmanage, etc fields are not considerd. it will be decided soon.*/
+#define BUFMAX 1024*128
 static int __ps_make_nativeapp_desktop(manifest_x * mfx, const char *manifest, bool is_update)
 {
         FILE* file = NULL;
@@ -4156,6 +4029,8 @@ static int __ps_remove_nativeapp_desktop(manifest_x *mfx)
         return 0;
 }
 
+#define LIBAPPSVC_PATH "/usr/lib/libappsvc.so.0"
+
 static int __ps_remove_appsvc_db(manifest_x *mfx)
 {
        void *lib_handle = NULL;
@@ -4187,6 +4062,7 @@ END:
        return ret;
 }
 
+#define PRELOAD_PACKAGE_LIST "/usr/etc/package-manager/preload/preload_list.txt"
 static int __add_preload_info(manifest_x * mfx, const char *manifest)
 {
        FILE *fp = NULL;
@@ -4583,8 +4459,6 @@ API int pkgmgr_parser_parse_manifest_for_installation(const char *manifest, char
        else
                DBG("Creating desktop file Success\n");
 
-       __ps_apply_shared_privileges(mfx, manifest);
-
        pkgmgr_parser_free_manifest_xml(mfx);
        DBG("Free Done\n");
        xmlCleanupParser();
@@ -4656,8 +4530,6 @@ API int pkgmgr_parser_parse_manifest_for_upgrade(const char *manifest, char *con
        else
                DBG("Creating desktop file Success\n");
 
-       __ps_apply_shared_privileges(mfx, manifest);
-
        pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
        pkgmgr_parser_free_manifest_xml(mfx);
        DBG("Free Done\n");
@@ -4717,8 +4589,6 @@ API int pkgmgr_parser_parse_manifest_for_uninstallation(const char *manifest, ch
 
 API int pkgmgr_parser_parse_manifest_for_preload()
 {
-       __ps_process_smack();
-
        return pkgmgr_parser_update_preload_info_in_db();
 }
 
@@ -4742,6 +4612,7 @@ API int pkgmgr_parser_run_parser_for_uninstallation(xmlDocPtr docPtr, const char
        return __ps_run_parser(docPtr, tag, ACTION_UNINSTALL, pkgid);
 }
 
+#define SCHEMA_FILE "/usr/etc/package-manager/preload/manifest.xsd"
 #if 1
 API int pkgmgr_parser_check_manifest_validation(const char *manifest)
 {
index 11400b0..7dd2975 100755 (executable)
@@ -128,19 +128,6 @@ int pkgmgr_parser_delete_manifest_info_from_db(manifest_x *mfx);
 int pkgmgr_parser_update_preload_info_in_db();
 int pkgmgr_parser_check_and_create_db();
 int pkgmgr_parser_initialize_db();
-
-/* libprivilege-control specific operations prototype*/
-int pkgmgr_parser_privilege_register_package(const char *pkgid);
-int pkgmgr_parser_privilege_unregister_package(const char *pkgid);
-int pkgmgr_parser_privilege_revoke_permissions(const char *pkgid);
-int pkgmgr_parser_privilege_enable_permissions(const char *pkgid, int apptype,
-                                       const char **perms, int persistent);
-int pkgmgr_parser_privilege_setup_path(const char *pkgid, const char *dirpath,
-                                       int apppathtype, const char *groupid);
-int pkgmgr_parser_privilege_add_friend(const char *pkgid1, const char *pkgid2);
-int pkgmgr_parser_privilege_change_smack_label(const char *path, const char *label,
-                                       int label_type);
-
 /** @} */
 #ifdef __cplusplus
 }
diff --git a/parser/pkgmgr_parser_privilege.c b/parser/pkgmgr_parser_privilege.c
deleted file mode 100644 (file)
index 5b32602..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * rpm-installer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
- * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#define __USE_GNU
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-#include <dlfcn.h>
-
-#include "pkgmgr_parser_internal.h"
-
-#define LIB_PRIVILEGE_CONTROL          "libprivilege-control.so.0"
-#define LIB_SMACK                                      "libsmack.so.1"
-
-int pkgmgr_parser_privilege_register_package(const char *pkgid)
-{
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*app_install)(const char*) = NULL;
-
-       if (pkgid == NULL)
-               return -1;
-
-       handle = dlopen(LIB_PRIVILEGE_CONTROL, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "register package: dlopen() failed. [%s]", dlerror());
-               return -1;
-       }
-
-       app_install = dlsym(handle, "app_install");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (app_install == NULL)) {
-               DBG( "register package: dlsym() failed. [%s]", errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       DBG( "[smack] app_install(%s)", pkgid);
-       ret = app_install(pkgid);
-       DBG( "[smack] app_install(%s), result = [%d]", pkgid, ret);
-
-       dlclose(handle);
-       return ret;
-}
-
-int pkgmgr_parser_privilege_unregister_package(const char *pkgid)
-{
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*app_uninstall)(const char*) = NULL;
-
-       if (pkgid == NULL)
-               return -1;
-
-       handle = dlopen(LIB_PRIVILEGE_CONTROL, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "unregister package: dlopen() failed. [%s]", dlerror());
-               return -1;
-       }
-
-       app_uninstall = dlsym(handle, "app_uninstall");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (app_uninstall == NULL)) {
-               DBG( "unregister package: dlsym() failed. [%s]", errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       DBG( "[smack] app_uninstall(%s)", pkgid);
-       ret = app_uninstall(pkgid);
-       DBG( "[smack] app_uninstall(%s), result = [%d]", pkgid, ret);
-
-       dlclose(handle);
-       return ret;
-}
-
-int pkgmgr_parser_privilege_revoke_permissions(const char *pkgid)
-{
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*app_revoke_permissions)(const char*) = NULL;
-
-       if (pkgid == NULL)
-               return -1;
-
-       handle = dlopen(LIB_PRIVILEGE_CONTROL, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "revoke permissions: dlopen() failed. [%s][%s]", pkgid, dlerror());
-               return -1;
-       }
-
-       app_revoke_permissions = dlsym(handle, "app_revoke_permissions");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (app_revoke_permissions == NULL)) {
-               DBG( "revoke permissions(): dlsym() failed. [%s][%s]", pkgid, errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       DBG( "[smack] app_revoke_permissions(%s)", pkgid);
-       ret = app_revoke_permissions(pkgid);
-       DBG( "[smack] app_revoke_permissions(%s), result = [%d]", pkgid, ret);
-
-       dlclose(handle);
-       return ret;
-}
-
-int pkgmgr_parser_privilege_enable_permissions(const char *pkgid, int apptype,
-                                               const char **perms, int persistent)
-{
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*app_enable_permissions)(const char*, int, const char**, bool) = NULL;
-
-       if (pkgid == NULL)
-               return -1;
-
-       handle = dlopen(LIB_PRIVILEGE_CONTROL, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "enable permissions(): dlopen() failed. [%s]", dlerror());
-               return -1;
-       }
-
-       app_enable_permissions = dlsym(handle, "app_enable_permissions");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (app_enable_permissions == NULL)) {
-               DBG( "enable permissions(): dlsym() failed. [%s]", errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       DBG( "[smack] app_enable_permissions(%s, %d)", pkgid, apptype);
-       ret = app_enable_permissions(pkgid, apptype, perms, persistent);
-       DBG( "[smack] app_enable_permissions(%s, %d), result = [%d]", pkgid, apptype, ret);
-
-       dlclose(handle);
-       return ret;
-}
-
-int pkgmgr_parser_privilege_setup_path(const char *pkgid, const char *dirpath,
-                                               int apppathtype, const char *groupid)
-{
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*app_setup_path)(const char*, const char*, int, ...) = NULL;
-
-       if (pkgid == NULL || dirpath == NULL)
-               return -1;
-
-       handle = dlopen(LIB_PRIVILEGE_CONTROL, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "setup path: dlopen() failed. [%s]", dlerror());
-               return -1;
-       }
-
-       app_setup_path = dlsym(handle, "app_setup_path");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (app_setup_path == NULL)) {
-               DBG( "setup path: dlsym() failed. [%s]", errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       if (groupid == NULL) {
-               DBG( "[smack] app_setup_path(%s, %s, %d)", pkgid, dirpath, apppathtype);
-               ret = app_setup_path(pkgid, dirpath, apppathtype);
-               DBG( "[smack] app_setup_path(), result = [%d]", ret);
-       } else {
-               DBG( "[smack] app_setup_path(%s, %s, %d, %s)", pkgid, dirpath, apppathtype, groupid);
-               ret = app_setup_path(pkgid, dirpath, apppathtype, groupid);
-               DBG( "[smack] app_setup_path(), result = [%d]", ret);
-       }
-
-       dlclose(handle);
-       return ret;
-}
-
-int pkgmgr_parser_privilege_add_friend(const char *pkgid1, const char *pkgid2)
-{
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*app_add_friend)(const char*, const char*) = NULL;
-
-       if (pkgid1 == NULL || pkgid2 == NULL)
-               return -1;
-
-       handle = dlopen(LIB_PRIVILEGE_CONTROL, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "add friend: dlopen() failed. [%s]", dlerror());
-               return -1;
-       }
-
-       app_add_friend = dlsym(handle, "app_add_friend");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (app_add_friend == NULL)) {
-               DBG( "add friend: dlsym() failed. [%s]", errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       DBG( "[smack] app_add_friend(%s, %s)", pkgid1, pkgid2);
-       ret = app_add_friend(pkgid1, pkgid2);
-       DBG( "[smack] app_add_friend(%s, %s), result = [%d]", pkgid1, pkgid2, ret);
-
-       dlclose(handle);
-       return ret;
-}
-
-int pkgmgr_parser_privilege_change_smack_label(const char *path, const char *label,
-                                               int label_type)
-{
-       if (path == NULL || label == NULL)
-               return -1;
-       int ret = 0;
-       void *handle = NULL;
-       char *errmsg = NULL;
-       int (*smack_lsetlabel)(const char*, const char*, int) = NULL;
-
-       handle = dlopen(LIB_SMACK, RTLD_LAZY | RTLD_GLOBAL);
-       if (!handle) {
-               DBG( "change smack label: dlopen() failed. [%s]", dlerror());
-               return -1;
-       }
-
-       smack_lsetlabel = dlsym(handle, "smack_lsetlabel");
-       errmsg = dlerror();
-       if ((errmsg != NULL) || (smack_lsetlabel == NULL)) {
-               DBG( "change smack label: dlsym() failed. [%s]", errmsg);
-               dlclose(handle);
-               return -1;
-       }
-
-       DBG( "[smack] smack_lsetlabel(%s, %s, %d)", path, label, label_type);
-       ret = smack_lsetlabel(path, label, label_type);
-       DBG( "[smack] smack_lsetlabel(%s, %s, %d), result = [%d]", path, label, label_type, ret);
-
-       dlclose(handle);
-       return ret;
-}
diff --git a/pkgmgr_smack_list.txt.in b/pkgmgr_smack_list.txt.in
deleted file mode 100644 (file)
index 5a2c6d9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ui-gadget::client
\ No newline at end of file