summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update Chinese (China) translationglib-2-60Dz Chen2022-09-111-2053/+2597
|
* Update Chinese (Taiwan) translationTing-Wei Lan2019-10-081-570/+665
|
* 2.60.72.60.7Philip Withnall2019-09-022-1/+14
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Merge branch 'backport-1009-application-crash-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-09-021-0/+3
|\ | | | | | | | | Backport !1009 “gapplication: remove inactivity_timeout source on finalize” to glib-2-60 See merge request GNOME/glib!1012
| * gapplication: remove inactivity_timeout source on finalizeTing-Wei Lan2019-07-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | The event source used to handle inactivity_timeout doesn't hold a reference on the application. Therefore, it is possible for callback function of the event source to run after the application has been freed, leading to use-after-free problem. To avoid the problem, we should remove the event source before the application is freed. This should fix SIGBUS crash of gio/tests/gapplication on FreeBSD. https://gitlab.gnome.org/GNOME/glib/issues/1846#note_566550
* | Merge branch 'backport-1017-iso8601-parsing-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-09-022-2/+11
|\ \ | | | | | | | | | | | | Backport !1017 “gdatetime: Avoid an assertion failure when parsing some ISO 8601 dates” to glib-2-60 See merge request GNOME/glib!1081
| * | gdatetime: Avoid an assertion failure when parsing some ISO 8601 datesPhilip Withnall2019-09-022-2/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Some malformed ISO 8601 date/time strings were causing an assertion failure when passed to `g_date_time_new_from_iso8601()`, due to a mismatch between the bounds checking of timezone offsets in `GDateTime` and `GTimeZone`. Fix that and add a unit test for it. (Trivial backport of !1017.) oss-fuzz#16101 Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | Merge branch 'backport-1040-settings-backend-race-glib-2-60' into 'glib-2-60'Sebastian Dröge2019-08-271-17/+24
|\ \ | | | | | | | | | | | | Backport !1040 “GSettingsBackend - Fix thread-safety during destruction of GSettings instances...” to glib-2-60 See merge request GNOME/glib!1065
| * | GSettingsBackend - Fix thread-safety during destruction of GSettings ↵Sebastian Dröge2019-08-271-17/+24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instances while notifications are emitted g_settings_backend_watch() uses a weak notify for keeping track of the target. There's an explanation why this is supposed to be safe but that explanation is wrong. The following could happen before: 1. We have the target stored in the watch list 2. The last reference to the target is dropped in thread A and we end up in g_settings_backend_watch_weak_notify() right before the mutex 3. g_settings_backend_dispatch_signal() is called from another thread B and gets the mutex before 2. 4. g_weak_ref_init() is called on the target from thread B, which at this point has a reference count of exactly one (see g_object_unref() where it calls the weak notifies) 5. Thread A continues at 3. and drops the last reference and destroys the object. Now the GWeakRef from 4. points to a destroyed object. Note that GWeakRefs would be cleared before the weak notifies are called 6. At some later point another thread g_weak_ref_get() is called by g_settings_backend_invoke_closure() and accesses an already destroyed object with refcount 0 from the GWeakRef created in 4. by thread B (or worse, already freed memory that was reused). Solve this by actually storing a GWeakRef of the target in the watch list and only access the target behind it via the GWeakRef API, and then pass a strong reference to the notification dispatch code. The weak notify is only used to remove the (potentially with empty GWeakRef) target from the list of watches and the only place that compares the target by pointer instead of going through the GWeakRef API. Fixes https://gitlab.gnome.org/GNOME/glib/issues/1870
* | Merge branch 'backport-966-win32-uri-crash-fix' into 'glib-2-60'Nirbheek Chauhan2019-08-273-9/+21
|\ \ | | | | | | | | | | | | Backport !966 “Resolve "Invalid characters in Open Location dialog crashes GIMP"” to glib-2-60 See merge request GNOME/glib!1061
| * | gwinhttpvfs: Fall back to wrapped VFS if creating a HTTP file failsPhilip Withnall2019-08-271-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we fail to create a GWinhttpFile for a URI (for example, because it’s an invalid URI or is badly encoded), don’t just return NULL. Instead, fall back to the wrapped VFS which might be able to handle it instead. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1819
| * | gwinhttpfile: Document constructor as potentially returning NULLPhilip Withnall2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It can return NULL if the URI was badly encoded or couldn’t be handled by Windows’ API. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1819
| * | gvfs: Add an assertion to check that get_file_for_uri() is never NULLPhilip Withnall2019-08-271-4/+6
|/ / | | | | | | | | | | | | | | | | | | It cannot return a NULL value, as none of its callers have error handlng. Add an assertion to check the values returned by the VFS implementations. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1819
* | Merge branch 'backport-1008-structured-logging-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-08-051-2/+2
|\ \ | |/ |/| | | | | Backport !1008 “gmessages: Only use structured logs if GLIB_VERSION_MAX_ALLOWED is ≥2.56” to glib-2-60 See merge request GNOME/glib!1013
| * gmessages: Only use structured logs if GLIB_VERSION_MAX_ALLOWED is ≥2.56Philip Withnall2019-07-291-2/+2
|/ | | | | | | | | Only redefine g_message() and friends to use structured logging if the compiling code is OK with depending on GLib functionality from ≥2.56. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1847
* 2.60.62.60.6Philip Withnall2019-07-242-1/+10
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Merge branch 'backport-984-985-keyfile-portal-fixes-glib-2-60' into 'glib-2-60'Matthias Clasen2019-07-153-2/+22
|\ | | | | | | | | Backport !984, !985 keyfile/portal fixes to glib-2-60 See merge request GNOME/glib!993
| * key file: Handle filename being NULLMatthias Clasen2019-07-151-1/+2
| | | | | | | | | | | | | | This happens when we are default-constructed without explicit arguments. Closes: https://gitlab.gnome.org/GNOME/glib/issues/1825
| * settings: Tweak priorities for keyfile backendMatthias Clasen2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to use the keyfile backend in sandboxes, but we want to avoid people losing their existing settings that are stored in dconf. Flatpak does a migration from dconf to keyfile, but only if the app explictly requests it. From an app perspective, there are two steps to the dconf->keyfile migration: 1. Request that flatpak do the migration, by adding the migrate-path key to the metadata 2. Stop adding the 'dconf hole' to the sandbox To keep us from switching to the keyfile backend prematurely, look at whether the app has stopped requesting a 'dconf hole' in the sandbox.
| * portal: Add a getter for dconf accessMatthias Clasen2019-07-152-0/+19
|/ | | | | | Add method to find whether the sandbox provides access to dconf. This will be used to tweak the priorities for the keyfile settings backend.
* 2.60.52.60.5Philip Withnall2019-07-092-1/+17
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Merge branch 'backport-958-gcond-errno-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-07-091-1/+3
|\ | | | | | | | | gthread: fix minor errno problem in GCond See merge request GNOME/glib!965
| * gthread: fix minor errno problem in GCondAllison Karlitskaya2019-07-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | The return value from `g_cond_wait_until()` is calculated, based on the value of `errno` after reacquiring the mutex. This is a problem because `errno` can be overwritten in the case the mutex is contended (in which case the slow-path code will re-enter the kernel). Perform the calculation before reacquiring the mutex. See merge request GNOME/glib!958
* | Merge branch 'backport-945-markup-stack-overrun-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-07-091-3/+5
|\ \ | | | | | | | | | | | | Backport !945 “Avoid overrunning stack at the end of the varargs.” to glib-2-60 See merge request GNOME/glib!949
| * | Avoid overrunning stack at the end of the varargs.John Ralls2019-06-241-3/+5
| |/
* | Merge branch 'backport-954-unicode-mani-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-07-093-3/+3
|\ \ | | | | | | | | | | | | Backport !954 “Fix the ISO 15924 code for Manichaean” to glib-2-60 See merge request GNOME/glib!956
| * | Fix the ISO 15924 code for ManichaeanDavid Corbett2019-06-273-3/+3
| |/
* | Merge branch 'backport-974-keyfile-settings-type-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-07-091-0/+1
|\ \ | | | | | | | | | | | | Backport !974 “Ensure that the keyfile settings backend exists” to glib-2-60 See merge request GNOME/glib!977
| * | Ensure that the keyfile settings backend existsMatthias Clasen2019-07-091-0/+1
|/ / | | | | | | | | | | We need to bring the type into existence. Closes: https://gitlab.gnome.org/GNOME/glib/issues/1822
* | Merge branch 'backport-968-openuriportal-typo-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-07-041-1/+1
|\ \ | |/ |/| | | | | Backport !968 ”Fix typo in request handle” to glib-2-60 See merge request GNOME/glib!969
| * Fix typo in request handleDavid Strauss2019-07-041-1/+1
|/
* Merge branch 'dbus-security-glib-2-60' into 'glib-2-60'Philip Withnall2019-06-116-6/+147
|\ | | | | | | | | Backport !909 “D-Bus auth mechanism improvements” to glib-2-60 See merge request GNOME/glib!910
| * gdbusdaemon: Only authorize anonymous users on Windows, not UnixSimon McVittie2019-06-111-1/+9
| | | | | | | | | | | | On Unix, we expect EXTERNAL authentication to work. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * gdbus-example-peer: Provide an example GDBusAuthObserverSimon McVittie2019-06-111-1/+76
| | | | | | | | | | | | | | | | | | | | It's somewhat unrealistic to use a GDBusServer without a GDBusAuthObserver, because most D-Bus servers want to be like the standard session bus (the owning user can connect) rather than being like the standard system bus (all users can connect, the server is a security boundary, and many bugs are security vulnerabilities). Signed-off-by: Simon McVittie <smcv@collabora.com>
| * GDBusAuthObserver: Document how to restrict authentication to EXTERNALSimon McVittie2019-06-111-0/+24
| | | | | | | | | | | | | | This is simpler and more robust than DBUS_COOKIE_SHA1, which relies on assumptions about random numbers and a secure home directory. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * GDBusAuthObserver: Fix mixup between authentication and authorizationSimon McVittie2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | Authentication is about proving who I am; authorization is about whether, given the knowledge of who I am, I am allowed to do something. GDBusServer and GDBusConnection carry out authentication automatically, but rely on the library user to carry out authorization. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * GDBusServer: Document that a GDBusAuthObserver is usually desirableSimon McVittie2019-06-112-3/+14
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * Document where we expect credentials-passing to be supportedSimon McVittie2019-06-112-0/+23
|/ | | | | | | This is useful information for implementors of portable software to know whether they can rely on credentials-passing. Signed-off-by: Simon McVittie <smcv@collabora.com>
* 2.60.42.60.4Philip Withnall2019-06-102-1/+23
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Merge branch 'backport-904-genmarshal-fixes-glib-2-60' into 'glib-2-60'Emmanuele Bassi2019-06-101-1/+2
|\ | | | | | | | | Backport !904 “Fix some valist genmarshal bugs” to glib-2-60 See merge request GNOME/glib!905
| * glib-genmarshal: Avoid a string copy for static string valist argumentsPhilip Withnall2019-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When building a valist marshaller, we can avoid a string copy if the argument is known to always be static. The marshaller we ship in `gmarshal.c` got this right, but marshallers generated by glib-genmarshal were missing the optimisation. Fix that. Backported version of !904 does not include the unit test. The version of this on `master` includes a unit test. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1792
| * glib-genmarshal: Fix ref-sinking of GVariants in valist marshallersPhilip Withnall2019-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The old (Perl) implementation of glib-genmarshal used g_variant_ref_sink() to correctly handle floating inputs; the Python version should do the same. Backported version of !904 does not include the unit test. The version of this on `master` includes a unit test. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1793
* | Merge branch 'backport-799-func-macro-glib-2-60' into 'glib-2-60'Sebastian Dröge2019-06-101-3/+3
|\ \ | |/ |/| | | | | Backport !799 “Revert "macros: Try to use the standard __func__ first in G_STRFUNC"” to glib-2-60 See merge request GNOME/glib!899
| * Revert "macros: Try to use the standard __func__ first in G_STRFUNC"Philip Withnall2019-06-071-3/+3
|/ | | | | | | | | | | | | This reverts commit 9f75cc9edf1d311ef4bacc3d686c7afa0c4dcbb2. It breaks usage of G_STRFUNC when compiling applications with `-Wpedantic` — `__func__` is not `#define`d, so G_STRFUNC was falling through to using `__FUNCTION__`, which raises a warning with `-Wpedantic`. Fun times. Fixes: #1755
* Merge branch 'backport-865-happier-eyeballs-glib-2-60' into 'glib-2-60'Philip Withnall2019-06-052-6/+28
|\ | | | | | | | | Backport !865 'gnetworkaddress: fix "happy eyeballs" logic' to glib-2-60 See merge request GNOME/glib!894
| * network-address test: add ipv6-fail ipv4-slow caseAllison Karlitskaya2019-06-051-0/+27
| | | | | | | | | | | | Add a case for when the IPv6 result comes back negative and the IPv4 result is significantly delayed. This is exactly the case that causes the bug addressed by GNOME/glib!865
| * gnetworkaddress: fix "happy eyeballs" logicAllison Karlitskaya2019-06-041-6/+1
|/ | | | | | | | | | | | | | | | The "happy eyeballs" RFC states that on receiving a negative response for an IPv6 address lookup, we should wait for the IPv4 lookup to complete and use any results we get from there. The current code was not doing that: it was rather setting a timeout for failing the resolution entirely. In scenarios where the IPv4 response comes more than 50ms after the IPv6 response (which is easily attainable under valgrind in certain configurations) this means that the IPv4 response will never come. Remove the timeout and just wait. See merge request GNOME/glib!865
* Merge branch 'backport-876-gfile-permissions-glib-2-60' into 'glib-2-60'Philip Withnall2019-06-041-5/+6
|\ | | | | | | | | Backport !876 “gfile: Limit access to files when copying” to glib-2-60 See merge request GNOME/glib!878
| * gfile: Limit access to files when copyingOndrej Holy2019-06-041-5/+6
|/ | | | | | | | 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.
* Merge branch 'backport-875-ci-win32-glib-2-60' into 'glib-2-60'Christoph Reiter2019-06-041-13/+16
|\ | | | | | | | | Backport !875 “CI/msys2: disable coverage reporting, lcov doesn't support gcc9 yet” to glib-2-60 See merge request GNOME/glib!886