office-gobmx/ucb
Stephan Bergmann 8a443fe0f4 tdf#124962: Reduce risk of g_main_loop_run from within gio MountOperation
Using g_main_loop_run here appears to be inherently necessary for the
g_file_mount_enclosing_volume/g_file_mount_enclosing_volume_finish protocol, but
has at least two problems:  For one, it temporarily drops the SolarMutex (if it
was held by the current thread), causing the usual integrity issues caused by an
inner stack frame temporarily releasing the SolarMutex that is held by some
unsuspecting caller.  This is an inherent problem of our broken SolarMutex
design, and this change can't do much about it.

But for another, at least with GTK-based VCL backends, it also means that the
current thread can start to execute VCL events at "unexpected" times from within
this g_main_loop_run (e.g., paint events, as in the backtraces linked from
tdf#124962).  While handling of VCL events is necessary when a callback to
ooo_mount_operation_ask_password happens and it actually pops up a dialog
prompting the user for credentials, such handling of VCL events is completely
unwanted when no such dialog is popped up (e.g., when the given server is
unreachable anyway, as is the case in tdf#124962).

So, to shrink the problematic window of time in which VCL events may get handled
from within the gio MountOperation, use a dedicated GMainContext for the gio
GMainLoop (so that it only handles events related to the mount operation), and
only temporarily put back in place the original GMainContext during
ooo_mount_operation_ask_password (so that VCL events will get handled as
necessary when a dialog is actually popped up).

Change-Id: Ie410f23778045b1adf98579bb34ce38d0f8f3320
Reviewed-on: https://gerrit.libreoffice.org/72026
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-09 13:14:00 +02:00
..
qa
source tdf#124962: Reduce risk of g_main_loop_run from within gio MountOperation 2019-05-09 13:14:00 +02:00
test/com/sun/star/comp/ucb
CppunitTest_ucb_webdav_local_neon.mk
CppunitTest_ucb_webdav_neon_opts.mk
CppunitTest_ucb_webdav_propfindcache.mk
CppunitTest_ucb_webdav_res_access.mk
JunitTest_ucb_complex.mk Fix many Java subsequentcheck test by using JUH 2018-11-09 07:37:50 +01:00
JunitTest_ucb_unoapi.mk Simplify and fix Java UNO API test makefiles 2018-11-09 07:37:00 +01:00
Library_cached1.mk
Library_srtrs1.mk
Library_ucb1.mk
Library_ucpcmis1.mk Upgrade external/boost to Boost 1.69.0 2019-01-15 08:24:05 +01:00
Library_ucpdav1.mk
Library_ucpexpand1.mk log nice exception messages whereever possible 2019-03-07 07:12:39 +01:00
Library_ucpext.mk
Library_ucpfile1.mk Move dubious file: -> smb: conversion from INetURLObject to file UCP 2019-02-05 19:55:04 +01:00
Library_ucpftp1.mk
Library_ucpgio1.mk
Library_ucphier1.mk
Library_ucpimage.mk
Library_ucppkg1.mk
Library_ucptdoc1.mk
Makefile
Module_ucb.mk
README

Universal Content Broker (has ucp) which do things like convert files to strings in content broker world.

mmeeks: so - I renamed the old LGPLv3 webdav code to webdav-neon, and imported
the (not built) surf webdav ucp into the old space. so that in future, we can
merge changes more easily - and still choose which to use. cbosdonnat kindly
volunteered to do some comparative analysis of the two codebases to decide which
is best for what etc.