summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongho Mok <jho.mok@samsung.com>2015-04-06 21:12:38 +0900
committerJeongho Mok <jho.mok@samsung.com>2015-04-08 15:03:46 +0900
commit29a4f95f385ed365e824a9563b9ae45ab8fc2eaa (patch)
treedd6240c703867b6146c6bd826873deaea02fc31c
parentf8142a53c6d6d44e5d0636a0d5b2787390b82dbe (diff)
downloadaudio-session-manager-29a4f95f385ed365e824a9563b9ae45ab8fc2eaa.tar.gz
audio-session-manager-29a4f95f385ed365e824a9563b9ae45ab8fc2eaa.tar.bz2
audio-session-manager-29a4f95f385ed365e824a9563b9ae45ab8fc2eaa.zip
Change-Id: I9fae47e87e9a7ef65dc5e16754bbedd057ebbde3
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac18
-rw-r--r--include/audio-session-manager-types.h10
-rw-r--r--packaging/audio-session-manager.spec5
-rw-r--r--src/audio-session-mgr.c46
5 files changed, 2 insertions, 82 deletions
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 <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");