Remove security-server dependence 30/41730/1
authorLi Zhang <li2012.zhang@samsung.com>
Tue, 16 Jun 2015 08:45:22 +0000 (16:45 +0800)
committerLi Zhang <li2012.zhang@samsung.com>
Wed, 17 Jun 2015 09:20:58 +0000 (17:20 +0800)
Change-Id: I4ffbbd959491b9153e53fbe98e62cdf58cc8949d

configure.ac
ism/src/Makefile.am
ism/src/scim_panel_agent.cpp
packaging/isf.spec

index 82531c4..1e429d0 100755 (executable)
@@ -290,9 +290,6 @@ if test "$ISF_HAS_TTS" = "yes"; then
   AC_DEFINE(HAVE_TTS,1,[Have TTS functions.])
 fi
 
-# Check security server
-PKG_CHECK_MODULES(SECURITY_SERVER, [security-server])
-
 # Check vconf library
 PKG_CHECK_MODULES(VCONF, [vconf],
                   [ISF_HAS_VCONF=yes],
index 73ddf9a..67e7fa4 100644 (file)
@@ -144,7 +144,6 @@ libscim@SCIM_EPOCH@_la_SOURCES = \
 
 libscim@SCIM_EPOCH@_la_CXXFLAGS = @EFL_CFLAGS@  @TZPLATFORM_CONFIG_CFLAGS@\
                          @DLOG_CFLAGS@ \
-                         @SECURITY_SERVER_CFLAGS@ \
                          @VCONF_CFLAGS@ \
                          @PKGMGR_INFO_CFLAGS@
 
@@ -156,7 +155,6 @@ libscim@SCIM_EPOCH@_la_LDFLAGS  = -version-info $(SCIM_CURRENT):$(SCIM_REVISION)
                          @LIBTOOL_EXPORT_OPTIONS@ \
                          @LIBICONV@ \
                          @LTLIBINTL@ \
-                         @SECURITY_SERVER_LIBS@ \
                          @EFL_LIBS@ \
                          @VCONF_LIBS@ \
                          @PKGMGR_INFO_LIBS@ \
index fc77e74..5aa436f 100644 (file)
@@ -65,7 +65,6 @@
 #include "scim_private.h"
 #include "scim.h"
 #include "scim_stl_map.h"
-#include "security-server.h"
 
 
 EAPI scim::CommonLookupTable g_isf_candidate_table;
@@ -3457,21 +3456,6 @@ private:
         unlock ();
     }
 
-    static bool _check_privilege_by_sockfd (int client_id, const char *mode, bool need_failed_reply, int cmd)
-    {
-        int priv_ret = security_server_check_privilege_by_sockfd (client_id, "isf::manager", mode);
-        if (priv_ret != SECURITY_SERVER_API_SUCCESS && need_failed_reply) {
-            Socket client_socket (client_id);
-            Transaction trans;
-            trans.clear ();
-            trans.put_command (SCIM_TRANS_CMD_REPLY);
-            trans.put_command (SCIM_TRANS_CMD_FAIL);
-            trans.write_to_socket (client_socket);
-            ISF_SAVE_LOG ("Failed to deal with cmd(%d) due to privilege check failed, error code(%d)\n", cmd, priv_ret);
-        }
-        return priv_ret == SECURITY_SERVER_API_SUCCESS;
-    }
-
     void socket_receive_callback                (SocketServer   *server,
                                                  const Socket   &client)
     {
@@ -3963,11 +3947,9 @@ private:
                 if (cmd == ISM_TRANS_CMD_GET_ACTIVE_ISE)
                     get_active_ise (client_id);
                 else if (cmd == ISM_TRANS_CMD_SET_ACTIVE_ISE_BY_UUID) {
-                    ISF_SAVE_LOG ("setting active ise\n");
                     set_active_ise_by_uuid (client_id);
                 }
                 else if (cmd == ISM_TRANS_CMD_SET_INITIAL_ISE_BY_UUID) {
-                    ISF_SAVE_LOG ("setting initial ise\n");
                     set_initial_ise_by_uuid (client_id);
                 }
                 else if (cmd == ISM_TRANS_CMD_GET_ISE_LIST)
@@ -3975,14 +3957,6 @@ private:
                 else if (cmd == ISM_TRANS_CMD_GET_ALL_HELPER_ISE_INFO)
                     get_all_helper_ise_info (client_id);
                 else if (cmd == ISM_TRANS_CMD_SET_ENABLE_HELPER_ISE_INFO) {
-                    ISF_SAVE_LOG ("checking sockfd privilege...\n");
-                    int ret = security_server_check_privilege_by_sockfd (client_id, "isf::manager", "w");
-                    if (ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED) {
-                        SCIM_DEBUG_MAIN (2) <<"Security server api error. Access denied\n";
-                    } else {
-                        SCIM_DEBUG_MAIN (2) <<"Security server api success\n";
-                    }
-                    ISF_SAVE_LOG ("enable helper ise\n");
                     set_enable_helper_ise_info (client_id);
                 }
                 else if (cmd == ISM_TRANS_CMD_GET_ISE_INFORMATION)
@@ -3996,14 +3970,10 @@ private:
                 else if (cmd == ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW)
                     show_ise_option_window (client_id);
                 else if (cmd == ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST) {
-                    if (_check_privilege_by_sockfd (client_id, "x", false, cmd)) {
-                        show_helper_ise_list (client_id);
-                    }
+                    show_helper_ise_list (client_id);
                 }
                 else if (cmd == ISM_TRANS_CMD_SHOW_HELPER_ISE_SELECTOR) {
-                    if (_check_privilege_by_sockfd (client_id, "x", false, cmd)) {
-                        show_helper_ise_selector (client_id);
-                    }
+                    show_helper_ise_selector (client_id);
                 }
             }
 
index 6e51081..15df794 100644 (file)
@@ -29,7 +29,6 @@ BuildRequires:  pkgconfig(edje)
 BuildRequires:  pkgconfig(notification)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(tts)
-BuildRequires:  pkgconfig(security-server)
 BuildRequires:  pkgconfig(edbus)
 BuildRequires:  pkgconfig(capi-network-bluetooth)
 BuildRequires:  pkgconfig(feedback)