disable security 08/37808/3 accepted/tizen/common/20150409.072610 accepted/tizen/mobile/20150409.122307 accepted/tizen/tv/20150409.080416 accepted/tizen/wearable/20150409.080557 submit/tizen/20150409.044538
authorJeongho Mok <jho.mok@samsung.com>
Mon, 6 Apr 2015 12:03:15 +0000 (21:03 +0900)
committerJeongho Mok <jho.mok@samsung.com>
Wed, 8 Apr 2015 06:02:55 +0000 (15:02 +0900)
Change-Id: I31d5679c9cb4a234d802f008b17ceb42a1d7bb69
Signed-off-by: Jeongho Mok <jho.mok@samsung.com>
configure.ac
packaging/libmm-sound.spec
server/Makefile.am
server/mm_sound_mgr_asm.c

index 01e5195..625f192 100644 (file)
@@ -90,24 +90,6 @@ if test "x$USE_POLICY" = "xyes"; then
     AC_DEFINE([USE_POLICY], 1, [enable samsung policy])
 fi
 
-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.
 AC_HEADER_STDC
index 6e33c18..2c9424c 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.7.2h
+Version:    0.7.2i
 Release:    0
 Group:      Multimedia/Media Playback
 License:    Apache-2.0
@@ -23,7 +23,6 @@ BuildRequires:      pkgconfig(sysman)
 BuildRequires:      pkgconfig(glib-2.0)
 BuildRequires:      pkgconfig(vconf)
 BuildRequires:      pkgconfig(heynoti)
-BuildRequires:      pkgconfig(security-server)
 
 %description
 MMSound Package contains client lib for sound system
@@ -77,9 +76,9 @@ CFLAGS="%{optflags} -fvisibility=hidden -DMM_DEBUG_FLAG -DSEPARATE_SPEAKER_AND_W
 CFLAGS="$CFLAGS -DMURPHY"; export CFLAGS
 %endif
 %if %{with pulseaudio_samsung_policy}
-%reconfigure --prefix=/usr --enable-pulse --enable-security --enable-policy
+%reconfigure --prefix=/usr --enable-pulse --enable-policy
 %else
-%reconfigure --prefix=/usr --enable-pulse --enable-security
+%reconfigure --prefix=/usr --enable-pulse
 %endif
 %__make %{?_smp_mflags}
 
index e9231f3..a338567 100644 (file)
@@ -49,11 +49,6 @@ sound_server_CFLAGS += -DPULSE_CLIENT $(PULSE_CFLAGS)
 sound_server_LDADD += $(PULSE_LIBS)
 endif
 
-if USE_SECURITY
-sound_server_CFLAGS += $(SECURITY_CFLAGS) -DUSE_SECURITY
-sound_server_LDADD += $(SECURITY_LIBS)
-endif
-
 sound_server_DEPENDENCIES = $(srcdir)/../common/libmmfsoundcommon.la
 
 installdocksounddir = $(prefix)/share/sounds/sound-server
index 206e8f6..ef656e9 100644 (file)
@@ -76,10 +76,6 @@ pthread_mutex_t g_mutex_asm = PTHREAD_MUTEX_INITIALIZER;
 
 #include <sysman.h>
 
-#ifdef USE_SECURITY
-#include <security-server.h>
-#endif
-
 #include <avsys-audio.h>
 
 #define USE_SYSTEM_SERVER_PROCESS_MONITORING
@@ -1550,32 +1546,6 @@ void __asm_do_all_resume_callback(ASM_event_sources_t eventsrc)
        debug_log("[ASM_Server][%s] <<<<<<<<<< LEAVE\n", __func__);
 }
 
-#ifdef USE_SECURITY
-gboolean __asm_check_check_privilege (unsigned char* cookie)
-{
-       int asm_gid = -1;
-       int retval = 0;
-
-       /* Get ASM server group id */
-       asm_gid = security_server_get_gid("asm");
-       debug_log ("[ASM_Server][Security] asm server gid = [%d]\n", asm_gid);
-       if (asm_gid < 0) {
-               debug_error ("[ASM_Server][Security] security_server_get_gid() failed. error=[%d]\n", asm_gid);
-               return false;
-       }
-
-       /* Check privilege with valid group id */
-       retval = security_server_check_privilege((char *)cookie, asm_gid);
-       if (retval == SECURITY_SERVER_API_SUCCESS) {
-               debug_log("[ASM_Server][Security] security_server_check_privilege() returns [%d]\n", retval);
-               return true;
-       } else {
-               debug_error("[ASM_Server][Security] security_server_check_privilege() returns [%d]\n", retval);
-               return false;
-       }
-}
-#endif /* USE_SECURITY */
-
 int __asm_process_message (void *rcv_msg, void *ret_msg)
 {
        long int rcv_instance_id;
@@ -1617,21 +1587,6 @@ int __asm_process_message (void *rcv_msg, void *ret_msg)
 
        switch (rcv_request_id) {
        case ASM_REQUEST_REGISTER:
-#ifdef USE_SECURITY
-               /* do security check */
-               if (__asm_check_check_privilege(asm_rcv_msg->data.cookie) == 0) {
-                       debug_error ("[ASM_Server][Security] __asm_check_check_privilege() failed....\n");
-                       asm_snd_msg.instance_id = rcv_instance_id;
-                       asm_snd_msg.data.alloc_handle = -1;
-                       asm_snd_msg.data.cmd_handle = -1;
-                       asm_snd_msg.data.check_privilege = 0;
-                       if (asm_ret_msg == NULL)
-                               __asm_snd_message(&asm_snd_msg);
-                       break;
-               }
-               debug_log ("[ASM_Server][Security] __asm_check_check_privilege() success\n");
-               asm_snd_msg.data.check_privilege = 1;
-#endif /* USE_SECURITY */
                __check_dead_process();
 
                __asm_get_empty_handle(rcv_instance_id, &rcv_sound_handle);