From: Jeongho Mok Date: Mon, 6 Apr 2015 12:12:38 +0000 (+0900) Subject: disable security X-Git-Tag: accepted/tizen/common/20150409.072606^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29a4f95f385ed365e824a9563b9ae45ab8fc2eaa;p=platform%2Fcore%2Fmultimedia%2Faudio-session-manager.git disable security Change-Id: I9fae47e87e9a7ef65dc5e16754bbedd057ebbde3 --- diff --git a/Makefile.am b/Makefile.am index 8537556..89b325d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/configure.ac b/configure.ac index f4a0663..47cb576 100644 --- a/configure.ac +++ b/configure.ac @@ -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. diff --git a/include/audio-session-manager-types.h b/include/audio-session-manager-types.h index 0219fa1..7160a15 100644 --- a/include/audio-session-manager-types.h +++ b/include/audio-session-manager-types.h @@ -47,10 +47,6 @@ #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; /** diff --git a/packaging/audio-session-manager.spec b/packaging/audio-session-manager.spec index 1453c77..5644f0c 100644 --- a/packaging/audio-session-manager.spec +++ b/packaging/audio-session-manager.spec @@ -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 diff --git a/src/audio-session-mgr.c b/src/audio-session-mgr.c index f8304ff..19e678e 100644 --- a/src/audio-session-mgr.c +++ b/src/audio-session-mgr.c @@ -42,10 +42,6 @@ #include #include -#ifdef USE_SECURITY -#include -#endif - #if defined(USE_VCONF) #include #include @@ -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");