Remove Security server dependency 38/37738/1 tizen_3.0.2015.q2_common accepted/tizen/common/20150407.101752 accepted/tizen/mobile/20150405.124221 accepted/tizen/tv/20150405.122347 accepted/tizen/wearable/20150405.123523 submit/tizen/20150403.075732
authorJi-hoon Jung <jh8801.jung@samsung.com>
Fri, 3 Apr 2015 07:34:07 +0000 (16:34 +0900)
committerJi-hoon Jung <jh8801.jung@samsung.com>
Fri, 3 Apr 2015 07:35:05 +0000 (16:35 +0900)
Signed-off-by: Ji-hoon Jung <jh8801.jung@samsung.com>
Change-Id: I58b5e3fd41fa3b38279f656c02f9502ec96fcb47

12 files changed:
CMakeLists.txt
client/CMakeLists.txt
client/net_nfc_client.c
daemon/CMakeLists.txt
daemon/net_nfc_server_context.c
packaging/nfc-manager-neard.spec
src/clientlib/CMakeLists.txt
src/clientlib/net_nfc_client_ipc.c
src/commonlib/CMakeLists.txt
src/manager/CMakeLists.txt
src/manager/net_nfc_server_dispatcher.c
src/manager/net_nfc_server_ipc.c

index 8d334f1..f327206 100644 (file)
@@ -22,7 +22,6 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
 ADD_DEFINITIONS("-DNFC_MANAGER_MODULEDIR=\"${LIB_INSTALL_DIR}/nfc\"")
 
-#ADD_DEFINITIONS("-DSECURITY_SERVER")
 ADD_DEFINITIONS("-DUSE_FULL_URI")
 #ADD_DEFINITIONS("-DESE_ALWAYS_ON")
 
index dd5b708..57c5960 100644 (file)
@@ -15,7 +15,7 @@ IF(WAYLAND_SUPPORT)
        SET(WIN_PKG "${WIN_PKG} ecore-wayland")
 ENDIF(WAYLAND_SUPPORT)
 INCLUDE(FindPkgConfig)
-pkg_check_modules(client_pkgs REQUIRED security-server dlog vconf libtzplatform-config neardal
+pkg_check_modules(client_pkgs REQUIRED dlog vconf libtzplatform-config neardal
                        libssl appsvc svi capi-media-wav-player ${WIN_PKG})
 
 IF(WAYLAND_SUPPORT)
index 605bf77..c89772e 100644 (file)
 
 #include <glib.h>
 
-#ifdef SECURITY_SERVER
-#include "security-server.h"
-#endif
-
 #include "net_nfc_typedef.h"
 #include "net_nfc_util_gdbus_internal.h"
 #include "net_nfc_client_se.h"
 #include "net_nfc_client_system_handler.h"
 #include "net_nfc_client_handover.h"
 
-#ifdef SECURITY_SERVER
-static uint8_t *cookie;
-static size_t cookie_len;
-
-static void _init_smack()
-{
-       if (cookie == NULL) {
-               cookie_len = security_server_get_cookie_size();
-               if (cookie_len > 0) {
-                       cookie = g_new0(uint8_t, cookie_len);
-                       if (cookie != NULL) {
-                               if (security_server_request_cookie((char*)cookie, cookie_len) < 0) {
-                                       g_free(cookie);
-                                       cookie = NULL;
-                               }
-                       }
-               }
-       }
-}
-
-static void _deinit_smack()
-{
-       if (cookie != NULL) {
-               g_free(cookie);
-               cookie = NULL;
-       }
-}
-#endif
-
 GVariant *net_nfc_client_gdbus_get_privilege()
 {
-#ifdef SECURITY_SERVER
-       return net_nfc_util_gdbus_buffer_to_variant(cookie, cookie_len);
-#else
        return net_nfc_util_gdbus_buffer_to_variant(NULL, 0);
-#endif
 }
 
 void net_nfc_client_gdbus_init(void)
 {
-#ifdef SECURITY_SERVER
-       _init_smack();
-#endif
        if (net_nfc_client_manager_init() != NET_NFC_OK)
                return;
        if (net_nfc_client_tag_init() != NET_NFC_OK)
@@ -115,7 +75,4 @@ void net_nfc_client_gdbus_deinit(void)
        net_nfc_client_tag_deinit();
        net_nfc_client_phdc_deinit();
        net_nfc_client_manager_deinit();
-#ifdef SECURITY_SERVER
-       _deinit_smack();
-#endif
 }
index 7ddb3d0..d99d0e2 100755 (executable)
@@ -16,12 +16,12 @@ IF(WAYLAND_SUPPORT)
 ENDIF(WAYLAND_SUPPORT)
 INCLUDE(FindPkgConfig)
 IF(ARM_TARGET)
-       pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0 security-server
+       pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0
                vconf dlog tapi appsvc libcurl libssl svi capi-media-wav-player
                pkgmgr pkgmgr-info capi-network-wifi pmapi wifi-direct
                libtzplatform-config neardal ${WIN_PKG})
 ELSE(ARM_TARGET)
-       pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0 security-server
+       pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0
                vconf dlog tapi appsvc libcurl libssl svi capi-media-wav-player
                pkgmgr pkgmgr-info capi-network-wifi pmapi libtzplatform-config neardal
                ${WIN_PKG})
index 9766406..2c564ce 100644 (file)
@@ -19,9 +19,6 @@
 #include <glib.h>
 
 #include "vconf.h"
-#ifdef SECURITY_SERVER
-#include "security-server.h"
-#endif
 
 #include "net_nfc_server.h"
 #include "net_nfc_debug_internal.h"
@@ -71,30 +68,6 @@ void net_nfc_server_gdbus_deinit_client_context()
 bool net_nfc_server_gdbus_check_privilege(GDBusMethodInvocation *invocation,
                GVariant *privilege, const char *object, const char *right)
 {
-#ifdef SECURITY_SERVER
-       int result;
-       data_s priv = { NULL, 0 };
-
-       RETV_IF(NULL == right, false);
-       RETV_IF(NULL == object, false);
-       RETV_IF(NULL == privilege, false);
-
-       net_nfc_util_gdbus_variant_to_data_s(privilege, &priv);
-
-       result = security_server_check_privilege_by_cookie((char *)priv.buffer, object, right);
-
-       net_nfc_util_free_data(&priv);
-
-       if (result < 0)
-       {
-               NFC_ERR("permission denied : \"%s\", \"%s\"", object, right);
-               g_dbus_method_invocation_return_dbus_error(invocation,
-                               "org.tizen.NetNfcService.Privilege",
-                               "Permission denied");
-
-               return false;
-       }
-#endif
        const char *id = g_dbus_method_invocation_get_sender(invocation);
 
        net_nfc_server_gdbus_add_client_context(id, NET_NFC_CLIENT_ACTIVE_STATE);
index 075d45c..e89de93 100755 (executable)
@@ -16,7 +16,6 @@ BuildRequires:  cmake
 BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gobject-2.0)
-BuildRequires:  pkgconfig(security-server)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(tapi)
index 0488ff3..06e12fd 100644 (file)
@@ -18,7 +18,7 @@ IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(clientlib_pkges REQUIRED security-server dbus-glib-1 dlog ecore vconf)
+pkg_check_modules(clientlib_pkges REQUIRED dbus-glib-1 dlog ecore vconf)
 
 FOREACH(flag ${clientlib_pkges_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
@@ -55,7 +55,6 @@ ADD_DEFINITIONS("-DUSE_IPC_EPOLL -DUSE_EPOLL_TIMEOUT")
 ADD_DEFINITIONS("-DLLCP_MODE")
 ADD_DEFINITIONS("-DNFC_APP_SUPPORTED")
 ADD_DEFINITIONS("-DSAVE_TARGET_INFO_IN_CC")
-#ADD_DEFINITIONS("-DSECURITY_SERVER")
 #ADD_DEFINITIONS("-DG_MAIN_LOOP")
 #ADD_DEFINITIONS("-DUSE_ECORE_MAIN_LOOP")
 ADD_DEFINITIONS("-DUSE_GLIB_MAIN_LOOP")
index 31ccf64..c92be91 100755 (executable)
@@ -1647,9 +1647,6 @@ static net_nfc_error_e _send_request(net_nfc_request_msg_t *msg, va_list list)
        int written_size = 0;
 
        /* calc message length */
-#ifdef SECURITY_SERVER
-       total_size += (sizeof(cookies_size) + cookies_size);
-#endif
        total_size += msg->length;
        total_size += net_nfc_util_get_va_list_length(list);
 
@@ -1664,15 +1661,6 @@ static net_nfc_error_e _send_request(net_nfc_request_msg_t *msg, va_list list)
        memcpy(send_buffer + written_size, &total_size, sizeof(total_size));
        written_size += sizeof(total_size);
 
-#ifdef SECURITY_SERVER
-       /*  -- security server cookie */
-       memcpy(send_buffer + written_size, &cookies_size, sizeof(cookies_size));
-       written_size += sizeof(cookies_size);
-
-       memcpy(send_buffer + written_size, cookies, cookies_size);
-       written_size += cookies_size;
-#endif
-
        /*  -- request message struct */
        memcpy(send_buffer + written_size, msg, msg->length);
        written_size += msg->length;
index d77aab2..08d1722 100644 (file)
@@ -44,7 +44,6 @@ ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 #ADD_DEFINITIONS("-DSLP_DEBUG")
 ADD_DEFINITIONS("-DNFC_DEBUG_USE_DLOG -D_GNU_SOURCE")
 #ADD_DEFINITIONS("-DUSE_UNIX_DOMAIN")
-#ADD_DEFINITIONS("-DSECURITY_SERVER")
 
 ADD_LIBRARY(${NFC_COMMON_LIB} SHARED ${COMMON_LIB_SRCS})
 SET_TARGET_PROPERTIES(${NFC_COMMON_LIB} PROPERTIES SOVERSION ${VERSION_MAJOR})
index 806c3e9..78a52bb 100644 (file)
@@ -20,7 +20,7 @@ IF(WAYLAND_SUPPORT)
        SET(WIN_PKG "${WIN_PKG} ecore-wayland")
 ENDIF(WAYLAND_SUPPORT)
 INCLUDE(FindPkgConfig)
-pkg_check_modules(manager_pkges REQUIRED aul glib-2.0 gobject-2.0 security-server dbus-glib-1 vconf dlog tapi appsvc libcurl bluetooth-api heynoti smartcard-service smartcard-service-common libssl pmapi svi capi-media-wav-player pkgmgr pkgmgr-info ${WIN_PKG})
+pkg_check_modules(manager_pkges REQUIRED aul glib-2.0 gobject-2.0 dbus-glib-1 vconf dlog tapi appsvc libcurl bluetooth-api heynoti smartcard-service smartcard-service-common libssl pmapi svi capi-media-wav-player pkgmgr pkgmgr-info ${WIN_PKG})
 
 IF(WAYLAND_SUPPORT)
  ADD_DEFINITIONS("-DHAVE_WAYLAND")
@@ -67,7 +67,6 @@ ADD_DEFINITIONS("-DLLCP_MODE")
 ADD_DEFINITIONS("-DNFC_APP_SUPPORTED")
 ADD_DEFINITIONS("-DBROADCAST_MESSAGE")
 ADD_DEFINITIONS("-DSAVE_TARGET_INFO_IN_CC")
-#ADD_DEFINITIONS("-DSECURITY_SERVER")
 #ADD_DEFINITIONS("-DG_MAIN_LOOP")
 #ADD_DEFINITIONS("-DUSE_ECORE_MAIN_LOOP")
 ADD_DEFINITIONS("-DUSE_GLIB_MAIN_LOOP")
index 3be3ee0..b39a53b 100644 (file)
@@ -21,7 +21,6 @@
 #include <glib.h>
 
 #include "vconf.h"
-#include "security-server.h"
 
 #include "net_nfc_server_dispatcher_private.h"
 #include "net_nfc_typedef_private.h"
@@ -191,14 +190,6 @@ static void *_net_nfc_dispatcher_thread_func(void *data)
 
 //             DEBUG_SERVER_MSG("net_nfc_controller get command = [%d]", req_msg->request_type);
 
-#if 1
-               if (!_net_nfc_check_dispatcher_privilege(req_msg))
-               {
-//                     _net_nfc_util_free_mem(req_msg);
-//                     continue;
-               }
-#endif
-
                switch (req_msg->request_type)
                {
                case NET_NFC_MESSAGE_SERVICE_CLEANER :
@@ -918,215 +909,3 @@ static void *_net_nfc_dispatcher_thread_func(void *data)
 
        return (void *)NULL;
 }
-
-/* return true to authentication success; false to fail to authenticate */
-bool _net_nfc_check_dispatcher_privilege(net_nfc_request_msg_t *request_msg)
-{
-       int client_fd_request = request_msg->client_fd;
-       int ret_value;
-
-       switch(request_msg->request_type)
-       {
-#if 0
-               case NET_NFC_MESSAGE_SERVICE_ACTIVATE:
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_SERVICE_ACTIVATE...");
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::admin","w");
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-
-                               if (net_nfc_server_check_client_is_running(client_fd_request)){
-                                       net_nfc_response_test_t resp = { 0, };
-                                       resp.length = sizeof(net_nfc_response_test_t);
-                                       resp.flags = request_msg->flags;
-                                       resp.result = NET_NFC_SECURITY_FAIL;
-                                       resp.trans_param = (void *)request_msg->user_param;
-                                       net_nfc_send_response_msg(request_msg->client_fd, request_msg->request_type,(void *)&resp, sizeof(net_nfc_response_test_t), NULL);
-
-                               }
-                               return false;
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-#endif
-               case NET_NFC_MESSAGE_TRANSCEIVE:
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_TRANSCEIVE...");
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::tag","w");
-
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-#if 0
-
-                               if (net_nfc_server_check_client_is_running(client_fd_request))
-                               {
-                                       net_nfc_request_transceive_t *detail = (net_nfc_request_transceive_t *)request_msg;
-                                       net_nfc_response_transceive_t resp = { 0, };
-
-                                       resp.length = sizeof(net_nfc_response_transceive_t);
-                                       resp.flags = detail->flags;
-                                       resp.trans_param = detail->trans_param;
-                                       resp.result = NET_NFC_SECURITY_FAIL;
-
-                                       net_nfc_send_response_msg(request_msg->client_fd, request_msg->request_type, (void *)&resp, sizeof(net_nfc_response_transceive_t), NULL);
-
-                               }
-                               return false;
-#endif
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-               case NET_NFC_MESSAGE_READ_NDEF:
-
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_READ_NDEF...");
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::tag","w");
-
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-#if 0
-
-                               if (net_nfc_server_check_client_is_running(client_fd_request))
-                               {
-                                       net_nfc_request_read_ndef_t *detail = (net_nfc_request_read_ndef_t *)request_msg;
-                                       net_nfc_response_write_ndef_t resp = { 0, };
-
-                                       resp.length = sizeof(net_nfc_response_read_ndef_t);
-                                       resp.flags = detail->flags;
-                                       resp.trans_param = detail->trans_param;
-                                       resp.result = NET_NFC_SECURITY_FAIL;
-
-                                       net_nfc_send_response_msg(request_msg->client_fd, request_msg->request_type, (void *)&resp, sizeof(net_nfc_response_write_ndef_t), NULL);
-
-                               }
-                               return false;
-#endif
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-               case NET_NFC_MESSAGE_WRITE_NDEF:
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_WRITE_NDEF...");
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::tag","w");
-
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-#if 0
-
-                               if (net_nfc_server_check_client_is_running(client_fd_request))
-                               {
-                                       net_nfc_request_write_ndef_t *detail = (net_nfc_request_write_ndef_t *)request_msg;
-                                       net_nfc_response_write_ndef_t resp = { 0, };
-
-                                       resp.length = sizeof(net_nfc_response_write_ndef_t);
-                                       resp.flags = detail->flags;
-                                       resp.trans_param = detail->trans_param;
-                                       resp.result = NET_NFC_SECURITY_FAIL;
-
-                                       net_nfc_send_response_msg(request_msg->client_fd, request_msg->request_type, (void *)&resp, sizeof(net_nfc_response_write_ndef_t), NULL);
-
-                               }
-                               return false;
-#endif
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-               case NET_NFC_MESSAGE_P2P_SEND:
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_P2P_SEND...");
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::p2p","w");
-
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-#if 0
-
-                               if (net_nfc_server_check_client_is_running(client_fd_request))
-                               {
-                                       net_nfc_request_p2p_send_t *exchanger = (net_nfc_request_p2p_send_t *)request_msg;
-
-                                       net_nfc_response_p2p_send_t resp_msg = { 0, };
-
-                                       resp_msg.length = sizeof(resp_msg);
-                                       resp_msg.response_type = NET_NFC_MESSAGE_P2P_SEND;
-                                       resp_msg.handle = exchanger->handle;
-                                       resp_msg.result = NET_NFC_SECURITY_FAIL;
-                                       resp_msg.trans_param = (void *)exchanger->user_param;
-
-                                       net_nfc_send_response_msg(request_msg->client_fd,NET_NFC_MESSAGE_P2P_SEND, &resp_msg,sizeof(resp_msg), NULL);
-
-                               }
-                               return false;
-#endif
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-#if 0
-               case NET_NFC_MESSAGE_SNEP_START_SERVER :
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_SNEP_START_SERVER...");
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::p2p","rw");
-
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-                               if (net_nfc_server_check_client_is_running(client_fd_request))
-                               {
-                                       net_nfc_request_listen_socket_t *msg = (net_nfc_request_listen_socket_t *)request_msg;
-                                       net_nfc_response_receive_socket_t resp = { 0 };
-                                       resp.length = sizeof(resp);
-                                       resp.response_type = NET_NFC_MESSAGE_SNEP_START_SERVER;
-                                       resp.user_param = msg->user_param;
-                                       resp.result = NET_NFC_SECURITY_FAIL;
-                                       net_nfc_send_response_msg(request_msg->client_fd, request_msg->request_type, (void *)&resp, sizeof(net_nfc_response_receive_socket_t), NULL);
-                               }
-                               return false;
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-#endif
-#if 0
-               case NET_NFC_MESSAGE_SNEP_START_CLIENT :
-                       DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_SNEP_START_CLIENT...");
-
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::p2p","rw");
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking failed, and then send response to client");
-                               if (net_nfc_server_check_client_is_running(client_fd_request))
-                               {
-                                       net_nfc_request_snep_client_t *msg =(net_nfc_request_snep_client_t *)request_msg;
-                                       net_nfc_response_receive_socket_t resp_msg = { 0, };
-                                       resp_msg.length = sizeof(resp_msg);
-                                       resp_msg.response_type = NET_NFC_MESSAGE_SNEP_START_CLIENT;
-                                       resp_msg.user_param = msg->user_param;
-                                       resp_msg.result = NET_NFC_SECURITY_FAIL;
-                                       net_nfc_send_response_msg(request_msg->client_fd, request_msg->request_type, (void *)&resp_msg, sizeof(net_nfc_response_receive_socket_t), NULL);
-                               }
-                               return false;
-                       }
-                       DEBUG_SERVER_MSG("checking success");
-                       break;
-
-#endif
-#if 0
-               case NET_NFC_MESSAGE_SNEP_STOP_SERVICE :
-                       ret_value = security_server_check_privilege_by_sockfd(client_fd_request,"nfc-manager::p2p","rw");
-                       if (ret_value == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               return false;
-
-                       }
-                       break;
-
-#endif
-               default :
-                       return true;
-       }
-
-       return true;
-}
index 8df4c0d..4e7c142 100755 (executable)
@@ -29,7 +29,6 @@
 #include <errno.h>
 
 #include "vconf.h"
-#include "security-server.h"
 
 #include "net_nfc_typedef_private.h"
 #include "net_nfc_debug_private.h"
 /////////////////////////////
 
 /* static variable */
-#ifdef SECURITY_SERVER
-static char *cookies = NULL;
-static int cookies_size = 0;
-static gid_t gid = 0;
-#endif
 
 static pthread_mutex_t g_server_socket_lock = PTHREAD_MUTEX_INITIALIZER;
 static net_nfc_server_info_t g_server_info = { 0, };
@@ -193,30 +187,6 @@ bool net_nfc_server_ipc_initialize()
                goto ERROR;
        }
 
-#ifdef SECURITY_SERVER
-       gid = security_server_get_gid(NET_NFC_MANAGER_OBJECT);
-       if (gid == 0)
-       {
-               DEBUG_ERR_MSG("get gid from security server is failed. this object is not allowed by security server");
-               goto ERROR;
-       }
-
-       if ((cookies_size = security_server_get_cookie_size()) > 0)
-       {
-               _net_nfc_util_alloc_mem(cookies, cookies_size);
-               if (cookies == NULL)
-               {
-                       DEBUG_ERR_MSG("alloc failed");
-                       goto ERROR;
-               }
-       }
-       else
-       {
-               DEBUG_ERR_MSG("security_server_get_cookie_size failed");
-               goto ERROR;
-       }
-#endif
-
        net_nfc_dispatcher_start_thread();
        DEBUG_SERVER_MSG("server ipc is initialized");
 
@@ -227,13 +197,6 @@ bool net_nfc_server_ipc_initialize()
        return true;
 
 ERROR :
-#ifdef SECURITY_SERVER
-       if (cookies == NULL)
-       {
-               _net_nfc_util_free_mem(cookies);
-       }
-#endif
-
        if (g_server_info.server_src_id > 0)
        {
                g_source_remove(g_server_info.server_src_id);
@@ -262,13 +225,6 @@ void net_nfc_server_ipc_finalize()
        /* cleanup client */
        net_nfc_server_deinit_client_context();
 
-#ifdef SECURITY_SERVER
-       if (cookies == NULL)
-       {
-               _net_nfc_util_free_mem(cookies);
-       }
-#endif
-
        if (g_server_info.server_src_id > 0)
        {
                g_source_remove(g_server_info.server_src_id);
@@ -511,42 +467,6 @@ bool net_nfc_server_read_client_request(int client_sock_fd, net_nfc_error_e *res
                return false;
        }
 
-#ifdef SECURITY_SERVER
-       uint32_t cookie_len = *(uint32_t *)(buffer + offset);
-       offset += sizeof(cookie_len);
-
-       if (cookie_len == cookies_size && (length - offset) > cookies_size)
-       {
-               int error = 0;
-
-               /* copy cookie */
-               memcpy(cookies, buffer + offset, cookies_size);
-               offset += cookies_size;
-
-               /* for debug */
-#if 0
-               DEBUG_SERVER_MSG("recevied cookies");
-               DEBUG_MSG_PRINT_BUFFER(cookies, cookie_len);
-#endif
-
-               /* check cookie */
-               if ((error = security_server_check_privilege(cookies, gid)) < 0)
-               {
-                       DEBUG_ERR_MSG("failed to authentificate client [%d]", error);
-                       _net_nfc_util_free_mem(buffer);
-                       *result = NET_NFC_SECURITY_FAIL;
-                       return false;
-               }
-       }
-       else
-       {
-               DEBUG_ERR_MSG("there is no cookie or invalid in message");
-               _net_nfc_util_free_mem(buffer);
-               *result = NET_NFC_SECURITY_FAIL;
-               return false;
-       }
-#endif
-
        if (length > offset)
        {
                _net_nfc_util_alloc_mem(req_msg, length - offset);
@@ -604,15 +524,6 @@ bool net_nfc_server_read_client_request(int client_sock_fd, net_nfc_error_e *res
        case NET_NFC_MESSAGE_SERVICE_SET_LAUNCH_STATE :
                {
                        DEBUG_SERVER_MSG("checking NET_NFC_MESSAGE_SERVICE_SET_LAUNCH_STATE...");
-#if 1
-                       int ret = security_server_check_privilege_by_sockfd(req_msg->client_fd,"nfc-manager::common","w");
-
-                       if (ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED)
-                       {
-                               DEBUG_SERVER_MSG("checking faile and return...");
-//                             return false;
-                       }
-#endif
 
                        net_nfc_request_set_launch_state_t *detail = (net_nfc_request_set_launch_state_t *)req_msg;