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
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
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(heynoti)
-BuildRequires: pkgconfig(security-server)
%description
MMSound Package contains client lib for sound system
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}
#include <sysman.h>
-#ifdef USE_SECURITY
-#include <security-server.h>
-#endif
-
#include <avsys-audio.h>
#define USE_SYSTEM_SERVER_PROCESS_MONITORING
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;
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);