stream: skip cynara checks for remote connection 98/241298/6 accepted/tizen/unified/20200824.134510 submit/tizen/20200821.074009 submit/tizen/20200824.023231
authorSeungbae Shin <seungbae.shin@samsung.com>
Wed, 19 Aug 2020 05:28:18 +0000 (14:28 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 20 Aug 2020 07:04:44 +0000 (07:04 +0000)
[Version] 13.0-16
[Issue Type] Update

Change-Id: I20caf16d5745bcb0e51c8e9b1ae4353c9a71f653

packaging/pulseaudio.spec
src/pulse/stream.c
src/pulsecore/protocol-native.c

index e5275b0..160b13c 100644 (file)
@@ -3,7 +3,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          13.0
-Release:          15
+Release:          16
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
index 0b98df1..01bb6ba 100644 (file)
 #include <pulsecore/core-rtclock.h>
 #include <pulsecore/core-util.h>
 
+#ifdef __TIZEN__
+#include <pulsecore/proplist-util.h>
+#endif
+
 #include "internal.h"
 #include "stream.h"
 
@@ -1324,6 +1328,7 @@ static int create_stream(
         pa_tagstruct_putu32(t, s->buffer_attr.fragsize);
 #ifdef TIZEN_SECURITY
         pa_tagstruct_put_boolean(t, is_virtual_stream(s->proplist));
+        pa_tagstruct_put_boolean(t, pa_proplist_has_remote_name(s->proplist));
 #endif
     }
 
index 9b702da..c1aa9c1 100644 (file)
@@ -2404,6 +2404,7 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin
     uint32_t i;
 #ifdef TIZEN_SECURITY
     bool is_virtual_stream = false;
+    bool is_remote_stream = false;
 #endif
 
     pa_native_connection_assert_ref(c);
@@ -2433,11 +2434,14 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin
         protocol_error(c);
         goto finish;
     }
-    pa_log_info("is virtual stream : %s", pa_yes_no(is_virtual_stream));
-    if (!is_virtual_stream) {
-        CHECK_VALIDITY(c->pstream, cynara_check_privilege(_get_connection_out_fd(c), RECORDER_PRIVILEGE),
-                       tag, PA_ERR_ACCESS);
+    if ((pa_tagstruct_get_boolean(t, &is_remote_stream) < 0)) {
+        protocol_error(c);
+        goto finish;
     }
+    pa_log_info("is virtual stream : %s, is remote stream : %s", pa_yes_no(is_virtual_stream), pa_yes_no(is_remote_stream));
+
+    if (!is_virtual_stream && !is_remote_stream)
+        CHECK_VALIDITY(c->pstream, cynara_check_privilege(_get_connection_out_fd(c), RECORDER_PRIVILEGE), tag, PA_ERR_ACCESS);
 #endif
 
     p = pa_proplist_new();