disable security 09/37809/2 accepted/tizen/common/20150409.072606 accepted/tizen/mobile/20150409.122306 accepted/tizen/tv/20150409.080339 accepted/tizen/wearable/20150409.080556 submit/tizen/20150409.044538
authorJeongho Mok <jho.mok@samsung.com>
Mon, 6 Apr 2015 12:12:38 +0000 (21:12 +0900)
committerJeongho Mok <jho.mok@samsung.com>
Wed, 8 Apr 2015 06:03:46 +0000 (15:03 +0900)
Change-Id: I9fae47e87e9a7ef65dc5e16754bbedd057ebbde3

Makefile.am
configure.ac
include/audio-session-manager-types.h
packaging/audio-session-manager.spec
src/audio-session-mgr.c

index 8537556..89b325d 100644 (file)
@@ -12,11 +12,6 @@ libaudio_session_mgr_la_LDFLAGS += -Wl,-fini, __ASM_fini_module
 
 libaudio_session_mgr_la_CPPFLAGS = -I$(srcdir)/include -DUSE_VCONF $(VCONF_CFLAGS) $(MMCOMMON_CFLAGS)
 
-if USE_SECURITY
-libaudio_session_mgr_la_CPPFLAGS += $(SECURITY_CFLAGS) -DUSE_SECURITY
-libaudio_session_mgr_la_LIBADD += $(SECURITY_LIBS)
-endif
-
 libaudio_session_mgr_la_CPPFLAGS += $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x00800000 -DMMF_DEBUG_PREFIX=\"MMF-SESSIONMGR\"
 libaudio_session_mgr_la_LIBADD += $(MMLOG_LIBS)
 
index f4a0663..47cb576 100644 (file)
@@ -38,24 +38,6 @@ PKG_CHECK_MODULES(AVSYSAUDIO, avsysaudio)
 AC_SUBST(AVSYSAUDIO_CFLAGS)
 AC_SUBST(AVSYSAUDIO_LIBS)
 
-dnl use security --------------------------------------------------------------------------
-AC_ARG_ENABLE(security, AC_HELP_STRING([--enable-security], [using security]),
-[
- case "${enableval}" in
-        yes) USE_SECURITY=yes ;;
-        no)  USE_SECURITY=no ;;
-        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-security) ;;
- esac
- ],[USE_SECURITY=no])
-
-if test "x$USE_SECURITY" = "xyes"; then
-       PKG_CHECK_MODULES(SECURITY, security-server)
-       AC_SUBST(SECURITY_CFLAGS)
-       AC_SUBST(SECURITY_LIBS)
-fi
-AM_CONDITIONAL(USE_SECURITY, test "x$USE_SECURITY" = "xyes")
-dnl end --------------------------------------------------------------------
-
 
 
 # Checks for header files.
index 0219fa1..7160a15 100644 (file)
 #define ERR_ASM_VCONF_ERROR                    0x21
 #define ERR_ASM_UNKNOWN_ERROR                  0x2F
 #define ERR_ASM_HANDLE_IS_FULL                 0x30
-#ifdef USE_SECURITY
-#define ERR_ASM_CHECK_PRIVILEGE_FAILED         0x40
-#define COOKIE_SIZE                            20
-#endif
 
 
 #define ASM_PRIORITY_MATRIX_MIN (ASM_EVENT_MAX-1)
@@ -243,9 +239,6 @@ typedef struct
        ASM_sound_events_t                      sound_event;
        ASM_sound_states_t                      sound_state;
        ASM_resource_t                          system_resource;
-#ifdef USE_SECURITY
-       unsigned char   cookie [COOKIE_SIZE];
-#endif
 } __ASM_msg_data_lib_to_asm_t;
 
 /**
@@ -258,9 +251,6 @@ typedef struct
        ASM_sound_commands_t                    result_sound_command;
        ASM_sound_states_t                      result_sound_state;
        ASM_sound_events_t                      former_sound_event;
-#ifdef USE_SECURITY
-       int                                     check_privilege;
-#endif
 } __ASM_msg_data_asm_to_lib_t;
 
 /**
index 1453c77..5644f0c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       audio-session-manager
 Summary:    Audio Session Manager
-Version:    0.2.6
+Version:    0.2.7
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0
@@ -14,7 +14,6 @@ BuildRequires:  pkgconfig(mm-common)
 BuildRequires:  pkgconfig(sysman)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(avsysaudio)
-BuildRequires:  pkgconfig(security-server)
 
 %description
 Audio Session Manager package.
@@ -44,7 +43,7 @@ cp %{SOURCE1001} .
 
 %build
 CFLAGS="%{optflags} -fvisibility=hidden -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ; export CFLAGS
-%reconfigure --disable-static --enable-security 
+%reconfigure --disable-static
 %__make %{?jobs:-j%jobs}
 
 %install
index f8304ff..19e678e 100644 (file)
 #include <string.h>
 #include <mm_debug.h>
 
-#ifdef USE_SECURITY
-#include <security-server.h>
-#endif
-
 #if defined(USE_VCONF)
 #include <vconf.h>
 #include <errno.h>
@@ -562,29 +558,6 @@ void __ASM_destroy_callback(int index)
        debug_fleave();
 }
 
-#ifdef USE_SECURITY
-bool __ASM_set_cookie (unsigned char* cookie)
-{
-       int retval = -1;
-       int cookie_size = 0;
-
-       cookie_size = security_server_get_cookie_size();
-       if (cookie_size != COOKIE_SIZE) {
-               debug_error ("[Security] security_server_get_cookie_size(%d)  != COOKIE_SIZE(%d)\n", cookie_size, COOKIE_SIZE);
-               return false;
-       }
-
-       retval = security_server_request_cookie (cookie, COOKIE_SIZE);
-       if (retval == SECURITY_SERVER_API_SUCCESS) {
-               debug_msg ("[Security] security_server_request_cookie() returns [%d]\n", retval);
-               return true;
-       } else {
-               debug_error ("[Security] security_server_request_cookie() returns [%d]\n", retval);
-               return false;
-       }
-}
-#endif
-
 EXPORT_API
 bool ASM_register_sound_ex (const int application_pid, int *asm_handle, ASM_sound_events_t sound_event, ASM_sound_states_t sound_state,
                                                ASM_sound_cb_t callback, void *cb_data, ASM_resource_t mm_resource, int *error_code, int (*func)(void*,void*))
@@ -659,14 +632,6 @@ bool ASM_register_sound_ex (const int application_pid, int *asm_handle, ASM_soun
 
        handle = -1; /* for register & get handle from server */
 
-#ifdef USE_SECURITY
-       /* get cookie from security server */
-       if (__ASM_set_cookie (asm_snd_msg.data.cookie) == false) {
-               debug_error("failed to ASM_set_cookie()");
-               return false;
-       }
-#endif
-
        /* Construct msg to send -> send msg -> recv msg */
        if (!__asm_construct_snd_msg(asm_pid, handle, sound_event, ASM_REQUEST_REGISTER, sound_state, mm_resource, error_code)) {
                debug_error("failed to __asm_construct_snd_msg(), error(%d)", *error_code);
@@ -691,17 +656,6 @@ bool ASM_register_sound_ex (const int application_pid, int *asm_handle, ASM_soun
        }
        /* Construct msg to send -> send msg -> recv msg : end */
 
-#ifdef USE_SECURITY
-       /* Check privilege first */
-       if (asm_rcv_msg.data.check_privilege == 0) {
-               debug_error("[Security] Check privilege from server Failed!!!");
-               *error_code = ERR_ASM_CHECK_PRIVILEGE_FAILED;
-               return false;
-       } else {
-               debug_msg ("[Security] Check privilege from server Success");
-       }
-#endif
-
        handle = asm_rcv_msg.data.alloc_handle; /* get handle from server */
        if (handle == -1) {
                debug_error("failed to create handle from server");