platform/upstream/glib.git
5 years agoglib: Stop using g_get_current_time() in various places 15/213615/1 accepted/tizen_5.5_unified_mobile_hotfix sandbox/hj0426.kim/glib_2.52.2 tizen_5.5_mobile_hotfix tizen_5.5_tv accepted/tizen/5.5/unified/20191031.010124 accepted/tizen/5.5/unified/mobile/hotfix/20201027.063256 accepted/tizen/unified/20190911.111745 submit/tizen/20190909.072243 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 tizen_5.5.m2_release
Philip Withnall [Wed, 24 Jul 2019 13:17:02 +0000 (14:17 +0100)]
glib: Stop using g_get_current_time() in various places

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Change-Id: I5baa3ebebdfd84b94fb32633c990905213421fa6
Helps: #1438
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
5 years agokdbus: modified to check null value 52/210652/1 accepted/tizen/unified/20190724.063829 submit/tizen/20190723.111553
sanghyeok.oh [Tue, 23 Jul 2019 10:37:28 +0000 (19:37 +0900)]
kdbus: modified to check null value

Change-Id: I630159453a711f9951ab09535c5417ec9040a0b9
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agokdbus: fix computing bloom filters 66/210466/1 accepted/tizen/unified/20190722.074829 submit/tizen/20190719.104741
Adrian Szyndela [Fri, 19 Jul 2019 08:27:28 +0000 (10:27 +0200)]
kdbus: fix computing bloom filters

The bloom filters computing had been implemented in the past, basing
on systemd. However, the reimplementation introduced two bugs:
- no clearing of 'p' variable;
- clearing of hash_index variable in a wrong place.

This fixes the bugs.

The same applies to libdbus.

Change-Id: I92d5fe7f270306c96e8a38c96d0a06d38b8e59b1

5 years agogkdbus: async StartServiceByName handled by GTask 29/208729/1 accepted/tizen/unified/20190715.111822 submit/tizen/20190710.004428 submit/tizen/20190715.020025
Adrian Szyndela [Thu, 27 Jun 2019 14:04:29 +0000 (16:04 +0200)]
gkdbus: async StartServiceByName handled by GTask

Change-Id: I65b29cc58c9a275dca3018309c06d25eaf6d6166

5 years agokdbus: modified to support asynchronous StartServiceByName 99/200099/5
sanghyeok.oh [Tue, 19 Feb 2019 06:47:41 +0000 (15:47 +0900)]
kdbus: modified to support asynchronous StartServiceByName

Change-Id: I57c30fb86b1ec266037a4583ef64888ca92f2bc9
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years ago[CVE-2019-12450]gfile: Limit access to files when copying 23/207323/1 accepted/tizen/unified/20190604.014623 submit/tizen/20190603.073640
Ondrej Holy [Thu, 23 May 2019 08:41:53 +0000 (10:41 +0200)]
[CVE-2019-12450]gfile: Limit access to files when copying

file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to limit access to those files.

Change-Id: Id071a47323fcd0690dec6a5d519d5ab4f2f43562
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
(cherry picked from commit ec54d211518bf3c2f397f565088a7054219f194e)

5 years agokdbus: svace fix 85/202285/3 accepted/tizen/unified/20190403.064840 submit/tizen/20190401.083728
sanghyeok.oh [Wed, 27 Mar 2019 00:17:15 +0000 (09:17 +0900)]
kdbus: svace fix

Change-Id: I8166bd83bcd4b5fbca516daa2f1917437820ea8c
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agokdbus: share fd and pool with libdbuspolicy 79/201479/1 accepted/tizen/unified/20190322.075520 submit/tizen/20190321.094448
Adrian Szyndela [Thu, 14 Mar 2019 12:46:10 +0000 (13:46 +0100)]
kdbus: share fd and pool with libdbuspolicy

This uses new functionality of libdbuspolicy: using client's pool and fd.
This way libdbuspolicy doesn't have to create its own connection,
and what is more important it doesn't have to create its own 1MB pool.
This is at the cost of using client's pool for receiving responses
to ioctl(KDBUS_CMD_GET_CONN_INFO), which are small.

Change-Id: If31a3636be87f04559781f2ba68cb05c1c18d865

5 years agokdbus: check policy after opening, before Hello 78/201478/1
Adrian Szyndela [Thu, 14 Mar 2019 11:55:47 +0000 (12:55 +0100)]
kdbus: check policy after opening, before Hello

This moves checking access policy to the point after
the kdbus file descriptor is open, just before "Hello" is performed.
Now, it reflects standard process a bit more.

The standard process is:
- open fd (e.g. socket);
- check authentication, if needed and possible;
- connect to the bus (say hello).

In kdbus, we have only:
- open kdbus fd;
- connect to the bus (ioctl KDBUS_CMD_HELLO).
Calling libdbuspolicy for authentication fits between the two.

Additionally, and most importantly, this is required to share
the connection between gio and libdbuspolicy in the future.

Change-Id: Iee49b36e482a099d061dff4a8ba1826c2a53bb9a

5 years agogio: fix race condition in GDBusObjectManagerClient 31/199531/2
Beniamino Galvani [Sat, 30 Sep 2017 09:26:29 +0000 (11:26 +0200)]
gio: fix race condition in GDBusObjectManagerClient

priv->map_object_path_to_object_proxy must be protected to avoid
concurrent access by multiple threads. Move the hash table insertion
into the critical section.

https://bugzilla.gnome.org/show_bug.cgi?id=788368

Change-Id: I0fc7b7ab9edea681cc71b3c36cc0b5cebb6a1cf8

5 years agogdbus: fix use-after-free 30/199530/2
Lars Uebernickel [Thu, 28 Jan 2016 14:39:18 +0000 (15:39 +0100)]
gdbus: fix use-after-free

g_dbus_connection_call_internal() accesses the user data it passes to
g_dbus_connection_send_message_with_reply() after the call. That data
might be freed already in the case that the callback is called
immediately.

Fix this by removing the 'serial' field from the user data altogether
and fetch the serial from the message in the callback.

https://bugzilla.gnome.org/show_bug.cgi?id=748263

Change-Id: I6c6406f4782bbaeb19dad6b4ae08b3375592d3bc

5 years agokdbus: Fix memory leakage in _g_kdbus_StartServiceByName() 93/199693/1
Jonghwa Lee [Tue, 12 Feb 2019 14:32:44 +0000 (23:32 +0900)]
kdbus: Fix memory leakage in _g_kdbus_StartServiceByName()

GDBusMessage isn't freed after use.

Change-Id: I6f4b8b01dc6e8d3966ca8b8e9fde3d613635ab4d
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
(cherry picked from commit 6097bfc743d6c9d9c1005b3fe1cf029bf934dfac)

6 years agoMerge "Remove kdbus interface header" into tizen
Karol Lewandowski [Wed, 7 Nov 2018 10:28:50 +0000 (10:28 +0000)]
Merge "Remove kdbus interface header" into tizen

6 years agoRemove kdbus interface header 46/192446/1
Michal Bloch [Mon, 5 Nov 2018 12:59:09 +0000 (13:59 +0100)]
Remove kdbus interface header

kdbus.h is now provided with other linux kernel headers.

Change-Id: I48514dce66e7edf309724765c0dd72707a5a47b8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
6 years agoCVE-2018-16429 12/192112/1 accepted/tizen/unified/20181108.172410 submit/tizen/20181030.082154
DongHun Kwak [Tue, 30 Oct 2018 07:36:07 +0000 (16:36 +0900)]
CVE-2018-16429

When formatting the error messages for markup parsing errors, the parser
was unconditionally reading a UTF-8 character from the input buffer —
but the buffer might end with a partial code sequence, resulting in
reading off the end of the buffer by up to three bytes.

Fix this and add a test case, courtesy of pdknsk.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1462

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] Security Patch
[Cause & Measure]
[Checking Method]

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: If7bc858e6de684d5a571b57bd2b3d2a8c48cfc63
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
6 years agoCVE-2018-16428 11/192111/1
DongHun Kwak [Tue, 30 Oct 2018 07:32:47 +0000 (16:32 +0900)]
CVE-2018-16428

If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.

Includes a test case, courtesy of pdknsk.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1461

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] Security patch
[Cause & Measure]
[Checking Method]

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: Icd7c1bf8da55b501d9471df5ad18e7c7b0892d6b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
6 years agokdbus: svace fix 78/186178/1 accepted/tizen/5.0/unified/20181102.024912 accepted/tizen/unified/20180813.152543 submit/tizen/20180813.021314 submit/tizen_5.0/20181101.000006
sanghyeok.oh [Wed, 8 Aug 2018 02:47:31 +0000 (11:47 +0900)]
kdbus: svace fix

Change-Id: I5618c10d9c6c2daa6cbd9c8285becf154d667c44
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
6 years agokdbus: check policy first, only then open kdbus 48/178148/2
Aleksy Barcz [Tue, 8 May 2018 09:36:16 +0000 (11:36 +0200)]
kdbus: check policy first, only then open kdbus

A process shouldn't hold an open kdbus descriptor, if according to
security policy this process has no rights to open the bus at all.

Change-Id: Icd5a0c8fd68e1a7ec0e419f77272d279cf3289f6

6 years agofix for incorrect session bus descriptor lookup 46/177346/1
Aleksy Barcz [Tue, 24 Apr 2018 11:08:57 +0000 (13:08 +0200)]
fix for incorrect session bus descriptor lookup

Bugfix for error handling on dbus-daemon systems.
If get_session_address_platform_specific failed, both error and return value would be set,
resulting in subsequent error overwrite and a glib warning.

Change-Id: Ic0e42ed6868fc9dd71965ce23e68c8dbc8596ff5

6 years agokdbus: patch for error=NULL argument 37/175937/2 accepted/tizen/unified/20180416.213838 submit/tizen/20180416.012717
Aleksy Barcz [Fri, 13 Apr 2018 07:59:45 +0000 (09:59 +0200)]
kdbus: patch for error=NULL argument

Fixes segfault in *error dereference introduced in:
"kdbus: make access error behaviour consistent with dbus-daemon".

Change-Id: I4790cac9c051927d6c9f03c665ef5f2f7650294c

6 years agoASAN patch ( add pie compile option ) 82/175182/1 accepted/tizen/unified/20180410.063648 submit/tizen/20180409.081822 submit/tizen/20180409.232554
DongHun Kwak [Mon, 9 Apr 2018 07:39:40 +0000 (16:39 +0900)]
ASAN patch ( add pie compile option )

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] asan build fail
[Cause & Measure] add pie option
[Checking Method] build test

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: I558c2de2174d9215538b5f771f1d5d7213ff076e
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
6 years agokdbus: make access error behaviour consistent with dbus-daemon 41/172741/1
Aleksy Barcz [Thu, 15 Mar 2018 11:43:28 +0000 (12:43 +0100)]
kdbus: make access error behaviour consistent with dbus-daemon

Bugfix. When used with dbus-daemon, when an AccessDenied or ServiceUnknown
error occurs, gdbus returns a dbus error message to the sender (synchronously
or asynchronously) and doesn't set GError. Up to now the kdbus implementation
didn't return any error message and did set GError, which made the following
low-level functions behaviour inconsistent between dbus-daemon and kdbus:

g_dbus_connection_send_message_with_reply_sync
g_dbus_connection_send_message_with_reply
g_dbus_connection_send_message_with_reply_finish

This patch makes this behaviour consistent. Any code that relied on the inconsistent
behaviour should be corrected. The high-level function interface, returning GVariants
is NOT affected by this change.

Change-Id: I60cd4822ccef0e0fc0d7b99244f4ceb03512b97f

6 years agoglib2.spec: Change -mimplicit-it option to ARM 74/169774/1 accepted/tizen/unified/20180212.140724 submit/tizen/20180209.070903
Jonghwa Lee [Thu, 25 Jan 2018 08:28:33 +0000 (17:28 +0900)]
glib2.spec: Change -mimplicit-it option to ARM

If -mimplicit-it option is set to thumb, then it will shows below warning logs.

[  135s] {standard input}:4839: Warning: conditional outside an IT block for Thumb.
[  135s] {standard input}:4850: Warning: conditional outside an IT block for Thumb.
[  135s] {standard input}:4872: Warning: conditional outside an IT block for Thumb.
[  135s] {standard input}:4899: Warning: conditional outside an IT block for Thumb.
[  135s] {standard input}:4973: Warning: conditional outside an IT block for Thumb.

Since output code was changed to ARM state ('switch compilation mode fom Thumb to ARM'),
-mimplicit-it option also should be changed to ARM mode.

Change-Id: I244f92313a89a70236c3a571847ab6bbd918d823
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
(cherry picked from commit 231ca1b5b0e3a0d4ea2afea70cb3a6bd02d58150)

6 years agoAdd ASLR Patch 99/167499/2
DongHun Kwak [Thu, 18 Jan 2018 04:48:03 +0000 (13:48 +0900)]
Add ASLR Patch

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] not adjust pie compile option
[Cause & Measure] add compile option at spec file
[Checking Method]

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: I2a0741fb7c31ff14fc9fce5ab7226fe436757a11
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
6 years agoMerge "glog: fix crash on Linux without stderr stream" into tizen accepted/tizen/unified/20171128.150357 submit/tizen/20171128.004312
MyoungJune Park [Tue, 28 Nov 2017 00:32:32 +0000 (00:32 +0000)]
Merge "glog: fix crash on Linux without stderr stream" into tizen

6 years agoglog: fix crash on Linux without stderr stream 41/161841/1
INSUN PYO [Fri, 18 Aug 2017 04:42:44 +0000 (13:42 +0900)]
glog: fix crash on Linux without stderr stream

0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
1  0xb67c43f0 in __GI_abort () at abort.c:89
2  0xb69ee9d8 in _g_log_abort (breakpoint=2, breakpoint@entry=1) at gmessages.c:548
3  0xb69ef692 in g_logv (log_domain=0xb6a1dfc8 "GLib", log_level=-1254563840, log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0xb6a26a48 "%s: assertion '%s' failed", args=..., args@entry=...) at gmessages.c:1357
4  0xb69ef728 in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=0xb6a26a48 "%s: assertion '%s' failed") at gmessages.c:1398
5  0xb69efa5a in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=<optimized out>, expression=<optimized out>) at gmessages.c:2687
6  0xb69efe7c in g_log_writer_is_journald (output_fd=-1) at gmessages.c:2122
7  0xb69f02a2 in g_log_writer_default (log_level=G_LOG_LEVEL_CRITICAL, fields=0xbedc9d00, n_fields=4, user_data=0x0) at gmessages.c:2584
8  0xb69ef21a in g_log_structured_array (log_level=G_LOG_LEVEL_CRITICAL, fields=0xbedc9d00, n_fields=4) at gmessages.c:1933
9  0xb69ef47e in g_log_default_handler (log_domain=0xb6a1dfc8 "GLib", log_level=G_LOG_LEVEL_CRITICAL, message=<optimized out>, unused_data=<optimized out>) at gmessages.c:3036
10 0xb69ef5fc in g_logv (log_domain=0xb6a1dfc8 "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0xb6a26a48 "%s: assertion '%s' failed", args=..., args@entry=...) at gmessages.c:1336
11 0xb69ef728 in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=0xb6a26a48 "%s: assertion '%s' failed") at gmessages.c:1398
12 0xb69efa5a in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=<optimized out>, expression=<optimized out>) at gmessages.c:2687

If stderr is not associated with an output stream, the fileno(stderr) returned is -1.
So, g_return_if_fail_warning is recursively called and the abort occurs on the second call.

Change-Id: I417efda0bfafb45fadea5da1332dc56474f36405
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agokdbus: handle sending messages with any number of vectors 76/159176/4 accepted/tizen/unified/20171115.061201 submit/tizen/20171113.071309
Adrian Szyndela [Mon, 6 Nov 2017 13:53:11 +0000 (14:53 +0100)]
kdbus: handle sending messages with any number of vectors

Bugfix. Sending function had an arbitrary limit for kdbus_msg structure size.
Any additional vector added 32 bytes to the structure. Due to the way glib
handles data, in some specific cases number of vectors could increase
significantly, eventually exhausting the limit.
The fix removes the arbitrary limit, exchanging it to standard system memory
limits, by precalculating and allocating needed space, instead of allocating
fixed amount of memory.

Change-Id: I5aa483e26f6bababababadd79422b7abe0b46b7d

7 years agoModify indentation 94/158794/1 submit/tizen/20171106.045908
INSUN PYO [Fri, 3 Nov 2017 05:38:46 +0000 (14:38 +0900)]
Modify indentation

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I6d8118bb36541bc8a17bbf915aafa68687e45e8c

7 years agoswitch compilation mode fom Thumb to ARM 39/156439/3 accepted/tizen/unified/20171019.145642 submit/tizen/20171019.034316 submit/tizen_4.0/20171018.102237
Adrian Szyndela [Wed, 18 Oct 2017 09:30:14 +0000 (11:30 +0200)]
switch compilation mode fom Thumb to ARM

This is needed to be able to put uprobes in the library code as
the uprobes in current kernel versions work only with ARM code.

Change-Id: I0868bf63128900230c849cca48c5601d42b80bfa

7 years agoFix build warnings. 05/150805/3
Michal Bloch [Mon, 18 Sep 2017 12:05:52 +0000 (14:05 +0200)]
Fix build warnings.

Change-Id: I25b3cbbde5f4f8b7016556c2b9c203a743bb6632
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
7 years agoAPI: Deprecated Gdbus APIs in Tizen Public #2 - fix build error. 86/149986/5 accepted/tizen/unified/20170915.190454 submit/tizen/20170914.041649 submit/tizen/20170914.043059
INSUN PYO [Thu, 14 Sep 2017 02:08:15 +0000 (11:08 +0900)]
API: Deprecated Gdbus APIs in Tizen Public #2 - fix build error.

Many processes, such as aul, tlm and gli, generate the following error.
======================================================================
In file included from /usr/include/glib-2.0/gio/gio.h:50:0,
                 from corrupt.c:30:
/usr/include/glib-2.0/gio/gdbusaddress.h:29:51: fatal error: tizen.h: No such file or directory
include <tizen.h>  /* for TIZEN_DEPRECATED_API */
======================================================================

To solve this problem, glib include own macro file.

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Iea4077919fec54626b2ef063e2c5223025e95ac6

7 years agoAPI: Deprecated Gdbus APIs in Tizen Public 58/149258/4 submit/tizen/20170912.053358
INSUN PYO [Tue, 12 Sep 2017 03:10:06 +0000 (12:10 +0900)]
API: Deprecated Gdbus APIs in Tizen Public

In Tizen Public, Gdbus APIs have been deprecated since Tizen 2.4.
This patch shows warning messages to Tizen Public SDK developers.

https://developer.tizen.org/development/api-references/native-application?redirect=https://developer.tizen.org/dev-guide/3.0.0/org.tizen.native.mobile.apireference/group__OPENSRC__GLIB__FRAMEWORK.html

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I07de7c48e6b94caa4d9f31af98b180a218d11275

7 years agokdbus: libdbuspolicy: To perform policy check, pass unique name to libdbuspolicy 58/139058/2 accepted/tizen/4.0/unified/20170816.011022 accepted/tizen/4.0/unified/20170828.222527 accepted/tizen/unified/20170727.190338 submit/tizen/20170719.103604 submit/tizen/20170725.023005 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100005
sanghyeok.oh [Mon, 17 Jul 2017 06:00:49 +0000 (15:00 +0900)]
kdbus: libdbuspolicy: To perform policy check, pass unique name to libdbuspolicy

In case of signal broadcasting, message has null destination,
To perform policy check correctly, gdbus should pass unique name to libdbuspolicy as destination.

Change-Id: I563f7ad5ab99a9c91b5180350bb32259d3fed2b6
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
7 years agoavoid compilation error from -Wshadow gcc option 66/138466/1 accepted/tizen/unified/20170713.153355 submit/tizen/20170712.121302
MyoungJune Park [Wed, 12 Jul 2017 08:32:03 +0000 (17:32 +0900)]
avoid compilation error from -Wshadow gcc option

- if arg name of an inline function at a header file is identical to
  other simbol, gcc make warnings and turn it into failing build.

Change-Id: I73390d0d55574089d1a045be821edcbfc2a7a8f6
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
7 years agokdbus: pass sender to dbuspolicy1_check_out 01/133201/1 accepted/tizen/unified/20170629.085743 submit/tizen/20170612.054403 submit/tizen/20170622.043014
sanghyeok.oh [Fri, 9 Jun 2017 07:16:13 +0000 (16:16 +0900)]
kdbus: pass sender to dbuspolicy1_check_out

Change-Id: I741f2dedc77654889362b3853728dba54a5cef0b
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
7 years agogkdbus bugfix: allow long names 48/128348/16 accepted/tizen/unified/20170612.073709 submit/tizen/20170608.052538 submit/tizen/20170609.002203 submit/tizen/20170609.061842 submit/tizen/20170609.064014
Adrian Szyndela [Tue, 9 May 2017 08:16:53 +0000 (10:16 +0200)]
gkdbus bugfix: allow long names

D-Bus names, paths, interfaces, members may be longer than
127 characters now.

Change-Id: Id917c77f638d72fd0c7c618fe02a3181b57321b4
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
7 years agogkdbus: make error messages more consistent with libdbus 00/132200/3
Adrian Szyndela [Thu, 1 Jun 2017 11:08:22 +0000 (13:08 +0200)]
gkdbus: make error messages more consistent with libdbus

Change-Id: I5b21152f84ccc43ae8d72fe83e9e6d32aba58002

7 years agokdbus: bugfix for return codes on call to non-existing destination 71/128371/9
Adrian Szyndela [Tue, 9 May 2017 12:50:14 +0000 (14:50 +0200)]
kdbus: bugfix for return codes on call to non-existing destination

Calling a method on non-existing destination with auto start disabled
caused error org.freedesktop.DBus.ServiceUnknown.
Non-kdbus implementation gives org.freedesktop.DBus.NameHasNoOwner.
This patch makes kdbus return the same error as non-kdbus implementation.

Change-Id: I0320adf1205e2db11259e3f544eef27873acf8b0

7 years agogkdbus: allow payloads larger than 2M in signals 52/131352/5
Adrian Szyndela [Fri, 26 May 2017 12:31:59 +0000 (14:31 +0200)]
gkdbus: allow payloads larger than 2M in signals

In kdbus signals can't use memfd - only vectors. There is
2M size limit for kdbus vectors. We divide message data
into GVariantVectors, but they were matched 1:1 to kdbus vectors
even if their size was larger than 2M.

This patch divides GVariantVectors larger than 2M into multiple
kdbus vectors when sending a message.

Change-Id: Ided2de80535cf039ea53bd1ab9d4d68c71b6c478

7 years agogkdbus: preserving NUM_UNIX_FDS header field 10/131510/5
Adrian Szyndela [Mon, 29 May 2017 11:37:07 +0000 (13:37 +0200)]
gkdbus: preserving NUM_UNIX_FDS header field

NUM_UNIX_FDS was discarded during sending, but it is needed
to handle file descriptors properly in libdbus.
It is also preserved by sd-bus.

Change-Id: I35ba0535bb7e92748edd51e09085f0321724de2e

7 years agogkdbus: fix special rule for name signals 24/131524/5
Adrian Szyndela [Mon, 29 May 2017 13:48:26 +0000 (15:48 +0200)]
gkdbus: fix special rule for name signals

Sender_unique_name can never be NULL. However, it is checked
if it is NULL. It should be tested for emptiness,
but not for being NULL, but for being an empty string.

Change-Id: I2c968d614f34d7d388a629e0ce4bc9148b7e148e

7 years agoBump to glib 2.52.2 89/131289/5
Adrian Szyndela [Thu, 25 May 2017 10:01:25 +0000 (12:01 +0200)]
Bump to glib 2.52.2

tests: add gdbus-peer test back
Glib 2.51.1 moved gdbus-peer to programs compiled
only when dbus-daemon is detected. We can't easily make
dbus-daemon to be detected without creating a cycle in
the packages dependencies. Thus, I added an option
to force building programs dependent on dbus-daemon
without checking its presence.

Change-Id: Iac77bc4491ff4cadd7263edf510153bd4a38838a

7 years agoMerge tag 'upstream/2.52.2' into tizen 88/131288/4
Adrian Szyndela [Thu, 25 May 2017 09:50:11 +0000 (11:50 +0200)]
Merge tag 'upstream/2.52.2' into tizen

upstream/2.52.2

Change-Id: I60b56ce4eaa45877acc7e53ac4551d0a31234f7e

7 years agoImported Upstream version 2.52.2 10/130010/1 upstream/2.52.2
DongHun Kwak [Fri, 19 May 2017 00:26:29 +0000 (09:26 +0900)]
Imported Upstream version 2.52.2

Change-Id: I71ac7d11a2d40ffe74a13b1d190dbe652cba140a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.52.1 09/130009/1
DongHun Kwak [Fri, 19 May 2017 00:26:07 +0000 (09:26 +0900)]
Imported Upstream version 2.52.1

Change-Id: Idca68df633e439e8492a9e0d40f78b49d689d84b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.52.0 08/130008/1
DongHun Kwak [Fri, 19 May 2017 00:25:57 +0000 (09:25 +0900)]
Imported Upstream version 2.52.0

Change-Id: I7fdddaaf827f7a4f314ba570ff45b481406f5c67
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.51.5 07/130007/1
DongHun Kwak [Fri, 19 May 2017 00:25:27 +0000 (09:25 +0900)]
Imported Upstream version 2.51.5

Change-Id: If8ad379b8e3c0268a99759a5bf621c201926d3fe
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.51.4 06/130006/1
DongHun Kwak [Fri, 19 May 2017 00:25:12 +0000 (09:25 +0900)]
Imported Upstream version 2.51.4

Change-Id: I0a090d45ab8f1805c5f98fd4d804da23a4033a41
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.51.3 05/130005/1
DongHun Kwak [Fri, 19 May 2017 00:24:56 +0000 (09:24 +0900)]
Imported Upstream version 2.51.3

Change-Id: I69068bfdeb46efddb7a09fa8c19386aedca2dd71
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.51.2 04/130004/1
DongHun Kwak [Fri, 19 May 2017 00:24:38 +0000 (09:24 +0900)]
Imported Upstream version 2.51.2

Change-Id: I134d2267df41e44bec49ca802fe31ad39a8874b2
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.51.1 03/130003/1
DongHun Kwak [Fri, 19 May 2017 00:24:21 +0000 (09:24 +0900)]
Imported Upstream version 2.51.1

Change-Id: Id21981348a71b1395dc86225b819cd1ea103428e
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.51.0 02/130002/1
DongHun Kwak [Fri, 19 May 2017 00:23:56 +0000 (09:23 +0900)]
Imported Upstream version 2.51.0

Change-Id: I4219f1e9924abb0277e06eb3575732907a86e82d
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoImported Upstream version 2.50.3 01/130001/1
DongHun Kwak [Fri, 19 May 2017 00:20:59 +0000 (09:20 +0900)]
Imported Upstream version 2.50.3

Change-Id: Ib95600d2b9af114ede0d7291f53745bf373c8b26
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agoAdd license file 11/121111/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/common/20170329.171624 accepted/tizen/ivi/20170329.032515 accepted/tizen/mobile/20170329.032425 accepted/tizen/tv/20170329.032441 accepted/tizen/unified/20170329.032530 accepted/tizen/unified/20170613.014836 accepted/tizen/wearable/20170329.032459 submit/tizen/20170328.042358 submit/tizen/20170613.014000 tizen_4.0.m1_release
DongHun Kwak [Mon, 27 Mar 2017 07:02:20 +0000 (16:02 +0900)]
Add license file

 - Add license file all packages
[Model] ALL
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] license file does not exist at package
[Cause & Measure] add license file at each package
[Checking Method] N/A

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: Idddce1432c3b140537864a95950dff65f67ae8bf

7 years ago[4.0] Remove OBS Project Dependency (kdbus/TV) 30/117630/2 accepted/tizen/common/20170310.122149 accepted/tizen/ivi/20170310.102437 accepted/tizen/mobile/20170310.102350 accepted/tizen/tv/20170310.102405 accepted/tizen/unified/20170310.104544 accepted/tizen/wearable/20170310.102422 submit/tizen/20170310.031600 submit/tizen_unified/20170310.103135
MyungJoo Ham [Tue, 7 Mar 2017 03:53:17 +0000 (12:53 +0900)]
[4.0] Remove OBS Project Dependency (kdbus/TV)

- Please add "libgio-extension-kdbus" for TV/arm-wayland images via JIRA-TRE issue.

- Without this commit, this package won't be built correctly in Tizen 4.0.

Change-Id: I42182599e930499fdd9b862f4a2e87bede2db33f
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
7 years agotests: generating coverage version of the libraries 26/114926/1 accepted/tizen/common/20170309.175450 accepted/tizen/ivi/20170310.031857 accepted/tizen/mobile/20170310.031756 accepted/tizen/tv/20170310.031822 accepted/tizen/unified/20170310.080539 accepted/tizen/wearable/20170310.031840 submit/tizen/20170309.042420 submit/tizen_unified/20170310.011402
Adrian Szyndela [Mon, 6 Feb 2017 11:16:44 +0000 (12:16 +0100)]
tests: generating coverage version of the libraries

Change-Id: I2cb0a26bc55cd0f932d59a8fc14da96349aa0b8a

7 years agogbs incremental build support 51/112751/3
Konrad Lipinski [Thu, 2 Feb 2017 11:58:31 +0000 (12:58 +0100)]
gbs incremental build support

Change-Id: Ic7d7bab4aa03f6707e1bf5482cfc16460b950584

7 years agoImported Upstream version 2.50.2 02/112802/1 upstream/2.50.2
DongHun Kwak [Fri, 3 Feb 2017 01:24:10 +0000 (10:24 +0900)]
Imported Upstream version 2.50.2

Change-Id: I83acaeb7a15edec96b064845383396695b865613
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
7 years agogdbus: add support for 'dbus-integration-tests' framework 51/109751/3 accepted/tizen/common/20170201.171637 accepted/tizen/ivi/20170201.090247 accepted/tizen/mobile/20170201.090157 accepted/tizen/tv/20170201.090211 accepted/tizen/unified/20170309.035607 accepted/tizen/wearable/20170201.090230 submit/tizen/20170201.023443 submit/tizen_unified/20170308.100412
Lukasz Skalski [Tue, 27 Sep 2016 12:24:15 +0000 (14:24 +0200)]
gdbus: add support for 'dbus-integration-tests' framework

Change-Id: Icd3e73b5221996945b0b9e6e34813aba2ebf0ab5

7 years agogdbus:fix race condition between signal callback and g_bus_unwatch_name function 12/110212/1
INSUN PYO [Thu, 29 Dec 2016 02:26:43 +0000 (11:26 +0900)]
gdbus:fix race condition between signal callback and g_bus_unwatch_name function

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ia19381a866674a3343503dab7feab0950bb49238
(cherry picked from commit 9002008efdce0bbf351dae5338fbe782369c3e20)

7 years agoname watching: fix for freeing client prematurely 78/107178/1
Adrian Szyndela [Thu, 22 Dec 2016 11:57:32 +0000 (12:57 +0100)]
name watching: fix for freeing client prematurely

on_name_owner_changed() is called with user_data being client
with no additional reference kept (ref_count is most probably 1,
taken with one of g_bus_watch_name*() functions).
This function calls user code through call_vanished_handler()
and call_appeared_handler(). The handlers may decrease client's
reference count by calling g_bus_unwatch_name().
Thus, we need to keep this reference locally to prevent freeing
client.
Note: this is also a bug in upstream glib, but it needs two things to happen:
1. call_vanished_handler must call user code that in turn calls g_bus_unwatch_name().
2. signal NameOwnerChanged for watched name, with not empty old and new owner
- it happens when a name changes its owner.

Note: if g_bus_unwatch_name() is called from other thread than the thread,
whose main context was default while calling g_bus_watch_name*, race condition
may appear. This is not changed. This is glib's design:
https://developer.gnome.org/glib/stable/glib-Threads.html

Quote:
   [...] individual data structure instances are not automatically
   locked for performance reasons. For example, you must coordinate accesses
   to the same GHashTable from multiple threads.

It seems the same applies for data structures kept in global data, but for which
users keep their id, as in the above case.

Change-Id: Iaa125555f6908e05f999e407fb3ba9364995b21b

7 years agokdbus: set error when dbuspolicy1_init fails 66/106666/1
Konrad Lipinski [Thu, 22 Dec 2016 10:26:01 +0000 (11:26 +0100)]
kdbus: set error when dbuspolicy1_init fails

Change-Id: I99466bde6f7cecd62d6f911cf39bf9204b81d6de

7 years agokdbus: Do not use fstat() to determinte memfd size 01/105201/1
Karol Lewandowski [Thu, 15 Dec 2016 13:13:14 +0000 (14:13 +0100)]
kdbus: Do not use fstat() to determinte memfd size

Memfd size is available via kdbus metadata so there is no need to use fstat.

This fixes failure on Smack system:

    [ 5352.471226] audit: type=1400 audit(946690155.785:99): lsm=SMACK fn=smack_inode_getattr action=denied subject="USER::server" object="USER::client" requested=r pid=13139 comm="gkdbus" path=2F6D656D66643A6B64627573202864656C657465642

Original idea by Insun Pyo <insun.pyo@samsung.com>

Change-Id: Ia7fe30c9604277d5ccf7cafedb0909a2c62b0d59

7 years agofix for race condition in watching names 92/102992/1 accepted/tizen/common/20161212.185410 accepted/tizen/ivi/20161212.025243 accepted/tizen/mobile/20161212.025008 accepted/tizen/tv/20161212.025121 accepted/tizen/wearable/20161212.025155 submit/tizen/20161209.100157 submit/tizen/20161209.115942
Adrian Szyndela [Mon, 5 Dec 2016 14:38:08 +0000 (15:38 +0100)]
fix for race condition in watching names

Change-Id: I11fa92a6dae62cb3bdaa4159db0da160752063d1
(cherry picked from commit f1f2e5e4df63f06cac53148e5c91a27a56eea9ca)

7 years agoRevert "kdbus: fix race-condition in GDBusNameWatching component" 34/101434/1
Hyotaek Shim [Thu, 1 Dec 2016 07:01:21 +0000 (23:01 -0800)]
Revert "kdbus: fix race-condition in GDBusNameWatching component"

This reverts commit f942d75a0ae909ef1f7419f093edb7826148a23d.

Change-Id: Ic13b87efa9e8a73bf5e7a968fbfa4d9813071796
(cherry picked from commit d071aa0a622f39aeb066d468278f30c45070e016)

7 years agokdbus: fix g_dbus_connection_call_sync ("NameHasOwner") failure 43/101343/2
INSUN PYO [Thu, 1 Dec 2016 02:11:03 +0000 (11:11 +0900)]
kdbus: fix g_dbus_connection_call_sync ("NameHasOwner") failure

The caller _dbus_daemon_synthetic_reply function uses the error for a special purpose.
So, _g_kdbus_NamehasOwner never makes error and only return FALSE even if an error occurs.

================ the call stck of failure =====================================
0  g_kdbus_NameHasOwner_internal (worker=worker@entry=0x42a40, name=name@entry=0x5df78 "org.not.existing.busname") at gkdbus.c:1190
1  0xb6f18a0c in _g_kdbus_NameHasOwner (worker=worker@entry=0x42a40, name=0x5df78 "org.not.existing.busname", error=error@entry=0xbefff6d0) at gkdbus.c:1314   ==> generate gdbus error
2  0xb6f1a526 in _dbus_daemon_synthetic_reply (worker=worker@entry=0x42a40, message=message@entry=0x57c60) at gkdbusfakedaemon.c:542  ==> This function only check error value rather than return value.  So, after appling patch, this logic has been changed.
3  0xb6f19a9c in _g_kdbus_worker_send_message_sync (worker=0x42a40, message=message@entry=0x57c60, out_reply=out_reply@entry=0xbefff768, timeout_msec=timeout_msec@entry=-1, cancellable=cancellable@entry=0x0, error=error@entry=0xbefff7ac) at gkdbus.c:3888
4  0xb6f3fe78 in g_dbus_connection_send_message_with_reply_sync (connection=connection@entry=0x421e0, message=message@entry=0x57c60, flags=G_DBUS_SEND_MESSAGE_FLAGS_NONE, timeout_msec=timeout_msec@entry=-1, out_serial=0xbefff76c, out_serial@entry=0x0, cancellable=0x0, error=error@entry=0xbefff7ac) at gdbusconnection.c:3019
5  0xb6f4013e in g_dbus_connection_call_sync_internal (connection=0x421e0, bus_name=<optimized out>, object_path=0x24058 "/org/freedesktop/DBus", interface_name=0x24040 "org.freedesktop.DBus", method_name=method_name@entry=0x24030 "NameHasOwner", parameters=parameters@entry=0x3d6a8, reply_type=reply_type@entry=0x24130, flags=flags@entry=G_DBUS_CALL_FLAGS_NONE, timeout_msec=timeout_msec@entry=-1, fd_list=fd_list@entry=0x0, out_fd_list=out_fd_list@entry=0x0, cancellable=cancellable@entry=0x0, error=error@entry=0xbefff83c) at gdbusconnection.c:6641
6  0xb6f4187a in g_dbus_connection_call_sync (connection=<optimized out>, bus_name=<optimized out>, object_path=<optimized out>, interface_name=<optimized out>, method_name=0x24030 "NameHasOwner", parameters=0x3d6a8, reply_type=0x24130, flags=G_DBUS_CALL_FLAGS_NONE, timeout_msec=-1, cancellable=0x0, error=0xbefff83c) at gdbusconnection.c:6868
==============================================================================

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I4959eaeeaad79de641f6b0c1ce10020ae9fe3760

7 years agoRemove Profile Build Dependency 85/101385/1
MyungJoo Ham [Thu, 1 Dec 2016 05:16:24 +0000 (14:16 +0900)]
Remove Profile Build Dependency

Apply Tizen-TV profile optimization for ALL Tizen profiles
because it would not have side effects on the correctness.
(simply ref/unref a Tizen-wide "dbus")

Change-Id: I209f9bf798b02f674a95dfc38142b4a44e194883
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
7 years agogdbus:add null check for error variable 72/101172/1
sanghyeok.oh [Wed, 30 Nov 2016 09:43:21 +0000 (18:43 +0900)]
gdbus:add null check for error variable

Change-Id: Ib51dd62ebc066b9393ae7c59f2f63d3330a16518
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
(cherry picked from commit 22aff71838c2aafc27196886fff317d146f749e1)

7 years agoKdbus: Fix for handling EPERM errors 29/100229/1
Hyotaek Shim [Fri, 25 Nov 2016 10:04:10 +0000 (19:04 +0900)]
Kdbus: Fix for handling EPERM errors

Change-Id: I63b35469d0fe660a33880ac02b9dcb405ceeafac
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
7 years agokdbus: check return status of KDBUS_CMD_FREE iotcl 57/100057/1
INSUN PYO [Thu, 24 Nov 2016 09:01:34 +0000 (18:01 +0900)]
kdbus: check return status of KDBUS_CMD_FREE iotcl

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I35ae1afffc01aaf1df54d6d2466cb0ecb3417c73

7 years agokdbus: check return status of KDBUS_CMD_CONN_INFO iotcl 21/99621/2
Lukasz Skalski [Wed, 23 Nov 2016 11:18:07 +0000 (12:18 +0100)]
kdbus: check return status of KDBUS_CMD_CONN_INFO iotcl

Change-Id: If6ea3c1825333aca2af4a2599b0187b1ff931b34

7 years agogdbus: change timeout error code from 'gdbus error' to 'gio error' 63/99463/1
sanghyeok.oh [Tue, 22 Nov 2016 08:19:13 +0000 (17:19 +0900)]
gdbus: change timeout error code from 'gdbus error' to 'gio error'

sync/async call return different error code when timeout was occured
modify it to return G_IO_ERROR_TIMED_OUT

Change-Id: I7b9fb847240311ce40f59ab7d552aaa2efeecb45
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
(cherry picked from commit 7a6fcd470025060f220b51ed8a4ecd57cf2b84b7)

8 years agokdbus: fix race-condition in GDBusNameWatching component 41/94541/3 accepted/tizen/common/20161114.170921 accepted/tizen/ivi/20161114.005113 accepted/tizen/mobile/20161114.004933 accepted/tizen/tv/20161114.005004 accepted/tizen/wearable/20161114.005043 submit/tizen/20161111.051722
Lukasz Skalski [Mon, 31 Oct 2016 10:49:11 +0000 (11:49 +0100)]
kdbus: fix race-condition in GDBusNameWatching component

To avoid race-condition between GetNameOwner replay and
NameOwnerChanged signal in GDBusNameWatching component,
let's always use GetNameOwner sync call on kdbus bus.

Change-Id: Iebb780737d753d989a7d928f65d433d86d79284a

8 years agocoding style:errno must referenced right after calling standard function 89/91689/2 accepted/tizen/3.0/common/20161114.110605 accepted/tizen/3.0/ivi/20161028.151229 accepted/tizen/3.0/mobile/20161028.143120 accepted/tizen/3.0/tv/20161028.143435 accepted/tizen/3.0/wearable/20161028.150807 accepted/tizen/common/20161017.170024 accepted/tizen/ivi/20161017.013626 accepted/tizen/mobile/20161017.013600 accepted/tizen/tv/20161017.013609 accepted/tizen/wearable/20161017.013617 submit/tizen/20161014.114439 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.092423 submit/tizen_3.0_common/20161104.104000
sanghyeok.oh [Tue, 11 Oct 2016 01:21:55 +0000 (10:21 +0900)]
coding style:errno must referenced right after calling standard function

Change-Id: I8eff8b174ecb621acbbe73734aa5c35cf5c60bfc
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agoFix for missing g_source_unref(Gkdbus worker source) 86/89986/1 accepted/tizen/3.0/ivi/20161011.044023 accepted/tizen/3.0/mobile/20161015.033212 accepted/tizen/3.0/tv/20161016.004429 accepted/tizen/3.0/wearable/20161015.082837 accepted/tizen/common/20161004.194241 accepted/tizen/ivi/20161005.080211 accepted/tizen/mobile/20161005.080124 accepted/tizen/tv/20161005.080146 accepted/tizen/wearable/20161005.080153 submit/tizen/20161004.080437 submit/tizen_3.0_ivi/20161010.000002 submit/tizen_3.0_mobile/20161015.000002 submit/tizen_3.0_tv/20161015.000002 submit/tizen_3.0_wearable/20161015.000002
Hyotaek Shim [Wed, 28 Sep 2016 03:38:26 +0000 (12:38 +0900)]
Fix for missing g_source_unref(Gkdbus worker source)

Change-Id: Ia5fb338b8b69b76c52d2dee8f6ccbb39e101a1c7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
8 years agoglib:remove self-join deadlock:change to g_thread_unref 80/89880/1 accepted/tizen/common/20160927.152907 accepted/tizen/ivi/20160928.050508 accepted/tizen/mobile/20160928.050413 accepted/tizen/tv/20160928.050428 accepted/tizen/wearable/20160928.050451 submit/tizen/20160927.110227
sanghyeok.oh [Tue, 27 Sep 2016 09:28:51 +0000 (18:28 +0900)]
glib:remove self-join deadlock:change to g_thread_unref

Change-Id: I1b98bed183510ca79c3448da5e2bd2a4115de709
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agoglib:remove self-join deadlock 68/89768/1 submit/tizen/20160927.041657
sanghyeok.oh [Tue, 27 Sep 2016 02:33:36 +0000 (11:33 +0900)]
glib:remove self-join deadlock

Change-Id: Ia9fffe62c90d596efe29929c50e835d4a93fac52
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agofix double unref 01/89701/1
sanghyeok.oh [Mon, 26 Sep 2016 11:16:33 +0000 (20:16 +0900)]
fix double unref

Allocated memory by g_thread_new() is freed by g_thread_join() or g_thread_unref()
It is not needed to use both g_thread_join() and g_thread_unref().

Change-Id: Ic6d13ecfa9f6c8d265bf516f4438e7a83bbd0e9c
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agokdbus: Add a null teminated string for GetConnectionCredentials (LinuxSecurityLabel... 71/88071/1 accepted/tizen/common/20160919.154456 accepted/tizen/ivi/20160920.051618 accepted/tizen/mobile/20160920.051523 accepted/tizen/tv/20160920.051536 accepted/tizen/wearable/20160920.051558 submit/tizen/20160919.053144
INSUN PYO [Tue, 13 Sep 2016 07:42:45 +0000 (16:42 +0900)]
kdbus: Add a null teminated string for GetConnectionCredentials (LinuxSecurityLabel) method.

The result of LinuxSecurityLabel item should end to null.
Dbus spec : https://dbus.freedesktop.org/doc/dbus-specification.html

Legacy dbus daemon : dbus/bus/driver.c. _dbus_asv_add_byte_array (&array_iter, "LinuxSecurityLabel", s, strlen (s) + 1))
libdbus kdbus : dbus-transport-kdbus.c. dbus_bool_t res = _dbus_asv_add_byte_array (&array_iter, "LinuxSecurityLabel", info.sec_label, strlen (info.sec_label)+1);

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Idff013ca4c56d93a6207bcb7365b36da86f7c1c2

8 years agogkdbus: Fix wrong return value of _g_kdbus_quit_loop() 41/87441/1 accepted/tizen/common/20160908.134701 accepted/tizen/ivi/20160909.062511 accepted/tizen/mobile/20160909.062420 accepted/tizen/tv/20160909.062448 accepted/tizen/wearable/20160909.062459 submit/tizen/20160908.061113
Jonghwa Lee [Thu, 8 Sep 2016 04:30:39 +0000 (13:30 +0900)]
gkdbus: Fix wrong return value of _g_kdbus_quit_loop()

_g_kdbus_quit_loop() which is used as a callback function in
g_main_context_invoke() always return 'TRUE'. This is not correct.
Returnning 'TRUE' means its functionality isn't completed. And it
results infinite loop time to time.

This patch fixes the function's return value correctly.

Change-Id: I08ea4c3a7c294774163c63983b48b458aa1d5c43
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
8 years agoMerge "kdbus: fix for GetConnectionSELinuxSecurityContext method call" into tizen
Hyotaek Shim [Wed, 7 Sep 2016 05:20:29 +0000 (22:20 -0700)]
Merge "kdbus: fix for GetConnectionSELinuxSecurityContext method call" into tizen

8 years agokdbus: fix build error for 64 bit architecture 71/86871/1 accepted/tizen/common/20160905.171612 accepted/tizen/ivi/20160907.060150 accepted/tizen/mobile/20160907.060101 accepted/tizen/tv/20160907.060117 accepted/tizen/wearable/20160907.060137 submit/tizen/20160905.094007 submit/tizen/20160905.095924
INSUN PYO [Mon, 5 Sep 2016 09:32:46 +0000 (18:32 +0900)]
kdbus: fix build error for 64 bit architecture

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I25c8313c5cf8e22702fe61703445a7640fad9298

8 years agokdbus: fix for GetConnectionSELinuxSecurityContext method call 67/86867/1
Lukasz Skalski [Mon, 5 Sep 2016 09:06:03 +0000 (11:06 +0200)]
kdbus: fix for GetConnectionSELinuxSecurityContext method call

To keep compatibility with dbus1, GetConnectionSELinuxSecurityContext
method call should always return SELinuxSecurityContextUnknown error
on systems without SELinux (even if other LSM systems, like for example
SMACK, are available on platform).

Change-Id: Iaff5afad798b06179c298e65955f90038882b54f

8 years agokdbus: enable KDBUS_MEMORY_POOL_SIZE environment to support adjustable memory pool 02/86802/1 submit/tizen/20160905.073119
INSUN PYO [Mon, 5 Sep 2016 03:14:43 +0000 (12:14 +0900)]
kdbus: enable KDBUS_MEMORY_POOL_SIZE environment to support adjustable memory pool

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ic593bc76914ef0aba3b448924d40a52e276df529

8 years agoMerge "change KDBUS_INFINITE_TIMEOUT_NS to 0x3ff.. to avoid wraparound - will work...
INSUN PYO [Thu, 1 Sep 2016 03:28:52 +0000 (20:28 -0700)]
Merge "change KDBUS_INFINITE_TIMEOUT_NS to 0x3ff.. to avoid wraparound - will work for 144 years of uptime" into tizen

8 years agoMerge "kdbus: always use well-known names for proxy" into tizen
Hyotaek Shim [Thu, 1 Sep 2016 02:06:34 +0000 (19:06 -0700)]
Merge "kdbus: always use well-known names for proxy" into tizen

8 years agochange KDBUS_INFINITE_TIMEOUT_NS to 0x3ff.. to avoid wraparound - will work for 144... 45/86345/1
Konrad Lipinski [Wed, 31 Aug 2016 15:06:31 +0000 (17:06 +0200)]
change KDBUS_INFINITE_TIMEOUT_NS to 0x3ff.. to avoid wraparound - will work for 144 years of uptime

Change-Id: I597460ffb82d5551f221de0554c0f81746f5dee9

8 years agoDetailed error information on KDBUS_CMD_SEND failures 30/86230/2
Hyotaek Shim [Wed, 31 Aug 2016 07:06:29 +0000 (16:06 +0900)]
Detailed error information on KDBUS_CMD_SEND failures

Change-Id: Ied09920c30f014bcbfe2b7160fb9b13cc8297f09
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
8 years agokdbus: always use well-known names for proxy 72/86072/1
Lukasz Skalski [Mon, 29 Aug 2016 14:17:54 +0000 (16:17 +0200)]
kdbus: always use well-known names for proxy

If proxy->priv->name is a well-known name (what just means that we
created proxy for well-known name) then proxy->priv->name_owner points
to current name owner (unique id or NULL if name currently doesn't have
any owner). If we have following scenario:

1) server termination
2) g_dbus_proxy_call() to server
    2a) get_destination_for_call()
3) on_name_owner callback, which set proxy->priv->name_owner to NULL

then get_destination_for_call() function will return
proxy->priv->name_owner value (which is unique id of previous name
owner). To avoid above race condition it will be better if we 'always'
return well-known name (without checking name_owner value).

Change-Id: I31f7edb56d8434e26a15efe260c1b737486da93e

8 years agokdbus:remove not necessary(dbuplicated) code - kdbus timeout 52/84952/1 accepted/tizen/common/20160829.140205 accepted/tizen/ivi/20160829.232651 accepted/tizen/mobile/20160829.232559 accepted/tizen/tv/20160829.232610 accepted/tizen/wearable/20160829.232633 submit/tizen/20160829.055144
INSUN PYO [Tue, 23 Aug 2016 04:11:44 +0000 (13:11 +0900)]
kdbus:remove not necessary(dbuplicated) code - kdbus timeout

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ia5a027ed30ccda95c3fa034fc793a9d2d8023526

8 years agoMerge "global construction for dbusconnection only on _TV_PROFILE" into tizen sandbox/mj2004.park/glib_upto_2.48 accepted/tizen/common/20160823.132657 accepted/tizen/ivi/20160822.232907 accepted/tizen/mobile/20160822.232814 accepted/tizen/tv/20160822.232831 accepted/tizen/wearable/20160822.232848 submit/tizen/20160822.115649
MyoungJune Park [Mon, 22 Aug 2016 11:52:14 +0000 (04:52 -0700)]
Merge "global construction for dbusconnection only on _TV_PROFILE" into tizen

8 years agoRevert (Build Error) : speed up incremental builds: %reconfigure instead of autogen 73/84673/1 accepted/tizen/common/20160822.132601 accepted/tizen/ivi/20160822.232531 accepted/tizen/mobile/20160822.232440 accepted/tizen/tv/20160822.232456 accepted/tizen/wearable/20160822.232514 submit/tizen/20160822.034349
INSUN PYO [Mon, 22 Aug 2016 03:34:17 +0000 (12:34 +0900)]
Revert (Build Error) : speed up incremental builds: %reconfigure instead of autogen

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I6933e2aa5fca4d23a5c9c63ceb9d915081f9dc5d

8 years agokdbus: fixed(build error) memory leak in hello command - #2 70/84670/1
INSUN PYO [Mon, 22 Aug 2016 02:34:27 +0000 (11:34 +0900)]
kdbus: fixed(build error) memory leak in hello command - #2

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I62a2b60968ba08409790b61bd670be9804334cbe

8 years agogkdbus reply timeout changes 06/84106/3
Konrad Lipinski [Tue, 16 Aug 2016 15:35:33 +0000 (17:35 +0200)]
gkdbus reply timeout changes

- drop userspace timeouts on unix/kdbus (rely on kdbus instead)
- propagate user-provided timeouts to kdbus
- translate infinite timeouts (G_MAXINT) into 0x7fffffffffffffff ns
  (292 years)

Change-Id: Id769802925522cf82c26354dae9d8ee29fcb972d

8 years agoMerge "modify signal subscription rule" into tizen
Hyotaek Shim [Wed, 17 Aug 2016 05:14:26 +0000 (22:14 -0700)]
Merge "modify signal subscription rule" into tizen

8 years agomodify signal subscription rule 73/84073/2
sanghyeok.oh [Tue, 16 Aug 2016 11:28:26 +0000 (20:28 +0900)]
modify signal subscription rule

Change-Id: I8ab485f0a59e041ef735ff8cc74909cf9b7db91f
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agoMerge "kdbus: fixed memory leak in "hello" command." into tizen
INSUN PYO [Wed, 17 Aug 2016 02:33:10 +0000 (19:33 -0700)]
Merge "kdbus: fixed memory leak in "hello" command." into tizen

8 years agospeed up incremental builds: %reconfigure instead of autogen 39/83539/2
Konrad Lipinski [Thu, 11 Aug 2016 12:27:41 +0000 (14:27 +0200)]
speed up incremental builds: %reconfigure instead of autogen

Change-Id: I90aa6c14568fbefc981650c7c1beb56f26c66747

8 years agoMerge "modify signal subscribtion rule" into tizen accepted/tizen/common/20160817.132841 accepted/tizen/ivi/20160817.040837 accepted/tizen/mobile/20160817.040741 accepted/tizen/tv/20160817.040801 accepted/tizen/wearable/20160817.040815 submit/tizen/20160816.095811
Hyotaek Shim [Tue, 16 Aug 2016 09:43:46 +0000 (02:43 -0700)]
Merge "modify signal subscribtion rule" into tizen

8 years agokdbus: fixed memory leak in "hello" command. 52/84052/1
Adrian Szyndela [Tue, 16 Aug 2016 09:39:58 +0000 (11:39 +0200)]
kdbus: fixed memory leak in "hello" command.

Change-Id: I0e411bc9dbaf0b08bb622650596e1c491d85d3e5