Commit Graph

21696 Commits

Author SHA1 Message Date
Matthew Leeds
c1f8f06432 gapplication: Fix a minor typo in the documentation 2020-03-10 15:40:02 -07:00
Sebastian Dröge
711de654e2 Merge branch '1986-socks-version' into 'master'
gsocks5proxy: Fix SOCKS5 username/password authentication

Closes #1986

See merge request GNOME/glib!1391
2020-03-10 15:11:09 +00:00
Sebastian Dröge
047957e663 Merge branch '1988-socks5-error' into 'master'
gsocks5proxy: Always advertise username/password authentication support

Closes #1988

See merge request GNOME/glib!1392
2020-03-10 14:58:25 +00:00
Philip Withnall
267a245eec gsocks5proxy: Return G_IO_ERROR_PROXY_NEED_AUTH if anonymous auth fails
If a username and password are specified by the caller, `GSocks5Proxy`
tells the server that it supports anonymous *and* username/password
authentication, and the server can choose which it prefers.

Otherwise, `GSocks5Proxy` only says that it supports anonymous
authentication. If that’s not acceptable to the server, the code was
previously returning `G_IO_ERROR_PROXY_AUTH_FAILED`. That error code
doesn’t indicate to the caller that authentication might succeed were
they to provide a username and password.

Change the error handling to make that clearer. A fuller solution would
be to expose more of the method negotiation in the `GSocks5Proxy` API,
so that the caller can specify ahead of time which authentication
methods they want to use. That can follow in issue #2059 though.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1988
2020-03-10 11:38:43 +00:00
Tim Sabsch
24a0bbac6d Update German translation 2020-03-09 22:53:24 +00:00
Sebastian Dröge
879f3cd0d2 Merge branch '2057-malloc-trim' into 'master'
gmemorymonitor: Mention malloc_trim() in the documentation

Closes #2057

See merge request GNOME/glib!1410
2020-03-09 20:37:20 +00:00
Philip Withnall
f818f50cbc Merge branch 'wip/tingping/gdummytlsconnection-properties' into 'master'
gdummytlsconnection: Add missing overrides for ALPN properties

See merge request GNOME/glib!1409
2020-03-09 20:21:43 +00:00
Philip Withnall
16c60289a4 gmemorymonitor: Mention malloc_trim() in the documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2057
2020-03-09 20:07:43 +00:00
Марко Костић
13d4433517 Update Serbian translation
(cherry picked from commit 255a5be57b)
2020-03-08 20:49:49 +00:00
Patrick Griffis
455e6211cb gdummytlsconnection: Add missing overrides for ALPN properties 2020-03-06 19:26:13 -08:00
Nathan Follens
4586bd3c00 Update Dutch translation
(cherry picked from commit 7015b4f921)
2020-03-06 15:33:54 +00:00
Milo Casagrande
93ece66281 Update Italian translation 2020-03-06 14:35:01 +00:00
Philip Withnall
42c7e89228 Merge branch 'w32-fileinfo-mtime-usec' into 'master'
Support nanoseconds in stat timestamps on Windows

See merge request GNOME/glib!1329
2020-03-06 12:58:00 +00:00
Philip Withnall
c8ad0aad08 Merge branch 'wip/tbaederr/clang-warnings' into 'master'
tests: Don't compare strings by pointer

See merge request GNOME/glib!1408
2020-03-05 11:32:38 +00:00
Timm Bäder
662059d18a tests: Don't compare strings by pointer
clang complains about this in the form of

<source>:6:9: warning: result of comparison against a string literal is
  unspecified (use an explicit string comparison function instead)

  if (f == (void *)"a") {
        ^  ~~~~~~~~~~~

Use variables for the strings instead, which should have the same
address.
2020-03-05 09:39:33 +01:00
Andre Klapper
5892c980bf Fix broken markup in Slovak UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
f08d81d546 Fix broken markup in Norwegian Bokmål UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
da443b6b28 Fix broken markup in Malay UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
6da07a0fcf Fix broken markup in Latvian UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
c8069050ba Fix broken markup in Lithuanian UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
f7f831557e Fix broken markup in Galician UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
cf7c5228ce Fix broken markup in French UI translation 2020-03-04 20:18:49 +01:00
Andre Klapper
b7a74c46e0 Fix broken markup in Catalan UI translations 2020-03-04 20:18:49 +01:00
Philip Withnall
d149f5ea08 Merge branch 'wip/smcv/show-execution-environment' into 'master'
CI: Show execution environment before we start

See merge request GNOME/glib!1360
2020-03-04 17:24:07 +00:00
Philip Withnall
28133feb4a Merge branch '2051-unix-output-stream-fsync' into 'master'
gunix{input|output}stream: Drop custom close_{async|finish}() methods

Closes #2051

See merge request GNOME/glib!1401
2020-03-04 15:35:47 +00:00
Philip Withnall
2510d5aae0 Merge branch 'wip/Jehan/g_param_is_valid_property_name' into 'master'
gobject: new g_param_is_valid_property_name() function.

See merge request GNOME/glib!1302
2020-03-04 15:30:38 +00:00
Simon McVittie
dff2e3b4c7 CI: Show execution environment before we start
This will help to debug CI issues that are related to us running in
a container that might have unusual capabilities, mount points,
filesystems etc., such as (probably) #2027, #2028, #2029.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-03-04 15:25:47 +00:00
Philip Withnall
d49393e94d gparam: Clarify that parameter names must be non-empty
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-04 14:46:28 +00:00
Jehan
13d1697b67 gobject: Add g_{param_spec,signal}_is_valid_name() functions
Making this validation code public allows projects to validate a
GParamSpec name before creating it. While hard-coded GParamSpec don't
need this, we can't afford crashing the main program for dynamically
generated GParamSpec from user-created data.

In such case, we will need to validate the param names and return errors
instead of trying to create a GParamSpec with invalid names.

Includes modifications from Philip Withnall and Emmanuele Bassi to
rearrange the new function addition and split it into one function for
GParamSpecs and one for GSignals.
2020-03-04 14:46:28 +00:00
Philip Withnall
fb1e416a32 gversionmacros: Add version macros for GLib 2.66
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-04 14:46:28 +00:00
Philip Withnall
604081971f build: Post-release version bump to 2.65.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-04 14:46:28 +00:00
Philip Withnall
8f16a89817 Merge branch '2038-tls-connection-annotations' into 'master'
gtlsconnection: Add missing (nullable) annotations

Closes #2038

See merge request GNOME/glib!1368
2020-03-04 14:15:07 +00:00
Philip Withnall
855e1de044 Merge branch 'wip/tbaederr/fallthrough' into 'master'
Replace fallthrough comments with G_GNUC_FALLTHROUGH

See merge request GNOME/glib!1406
2020-03-04 11:10:01 +00:00
Philip Withnall
51953dd857 Merge branch 'wip/baedert/fallthrough-clang' into 'master'
macros: Define G_GNUC_FALLTHROUGH for more compilers

See merge request GNOME/glib!1396
2020-03-04 11:08:26 +00:00
Timm Bäder
e5ab441b0d Replace fallthrough comments with G_GNUC_FALLTHROUGH
It's safer to do it this way and since we have G_GNUC_FALLTHROUGH now, w
e might as well replace the fallthrough comments.
2020-03-04 11:21:17 +01:00
Philip Withnall
b72acc9c6e Merge branch 'disable_mem-overflow_test_link_warning' into 'master'
tests: Disable link-time warning for mem-overflow

See merge request GNOME/glib!1405
2020-03-04 10:17:40 +00:00
nightuser
43dbf98687 tests: Disable link-time warning for mem-overflow
`mem-overflow` test disables GCC warning `alloc-size-larger-than` via
diagnostic pragma, but it's still emitted in the linkage stage when
LTO is enabled.

This changes explicitly set `link_args` for the test to disable the
warning.
2020-03-03 23:54:21 +03:00
Philip Withnall
46d343e734 garray: Clarify documentation in a few places
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1154
2020-03-03 14:32:37 +00:00
Milo Casagrande
66af0d2a7d Update Italian translation 2020-03-03 10:40:50 +00:00
Philip Withnall
0a2dc161c0 gunix{input|output}stream: Drop custom close_{async|finish}() methods
They were not actually asynchronous, and hence caused blocking in the
main thread. Deleting them means the default implementation of those
vfuncs is used, which runs the sync implementation in a thread — which
is what is wanted here.

Spotted by Benjamin Otte.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2051
2020-03-02 13:55:00 +00:00
Philip Withnall
b3b814f9c2 Merge branch 'wip/smcv/skip-low-mem' into 'master'
tests: Skip MemoryMonitor test if GObject-Introspection is too old

See merge request GNOME/glib!1397
2020-03-02 10:26:50 +00:00
Philip Withnall
e4a690f5dd gcancellable: Fix minor race between GCancellable and GCancellableSource
There’s a minor race condition between cancellation of a `GCancellable`,
and disposal/finalisation of a `GCancellableSource` in another thread.

Thread A                               Thread B
 g_cancellable_cancel(C)
 →cancellable_source_cancelled(C, S)
                                       g_source_unref(S)
                                       cancellable_source_dispose(S)
 →→g_source_ref(S)
 →→# S is invalid at this point; crash

Thankfully, the `GCancellable` sets `cancelled_running` while it’s
emitting the `cancelled` signal, so if `cancellable_source_dispose()` is
called while that’s high, we know that the thread which is doing the
cancellation has already started (or is committed to starting) calling
`cancellable_source_cancelled()`.

Fix the race by resurrecting the `GCancellableSource` in
`cancellable_source_dispose()`, and signalling this using
`GCancellableSource.resurrected_during_cancellation`. Check for that
flag in `cancellable_source_cancelled()` and ignore cancellation if it’s
set.

The modifications to `resurrected_during_cancellation` and the
cancellable source’s refcount have to be done with `cancellable_mutex`
held so that they are seen atomically by each thread. This should not
affect performance too much, as it only happens during cancellation or
disposal of a `GCancellableSource`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1841
2020-02-29 20:15:39 +00:00
Philip Withnall
4093321c9a tests: Use g_assert_*() in cancellable test rather than g_assert()
`g_assert()` is compiled out if `G_DISABLE_ASSERT` is defined, and
`g_assert_*()` gives more detailed failure messages.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-28 16:06:46 +00:00
Sebastian Dröge
2cad4fb5bf Merge branch 'wip/hadess/avoid-all-remote-files-crash' into 'master'
gcontenttype: Fix crash in _get_generic_icon_name()

See merge request GNOME/glib!1398
2020-02-28 14:49:51 +00:00
Bastien Nocera
a7181ad397 gcontenttype: Fix crash in _get_generic_icon_name()
Guard against NULL type being passed to
g_content_type_get_generic_icon_name() just as we protect
g_content_type_get_description(), otherwise it will cause a crash.

See https://gitlab.gnome.org/GNOME/gtk/issues/2482
2020-02-28 15:09:50 +01:00
Simon McVittie
08a4a2e6f4 Merge branch 'installed-tests' into 'master'
tests: Move memory_monitor_tests under installed_tests_enabled

See merge request GNOME/glib!1395
2020-02-28 14:02:32 +00:00
Jan Alexander Steffens (heftig)
7bdcfcf73a
tests: Move memory_monitor_tests under installed_tests_enabled
So they're not installed when the latter is disabled.
2020-02-28 14:10:25 +01:00
Simon McVittie
fdbd9ed7f7 tests: Skip MemoryMonitor test if GObject-Introspection is too old
Distributions will likely want to update GLib before
GObject-Introspection, to avoid circular dependencies.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-02-28 12:42:36 +00:00
Timm Bäder
5f38ae5ffc macros: Define G_GNUC_FALLTHROUGH for more compilers
Some compilers have __GNUC__ defined as a value less than 6, but do
support implicit-fallthrough via __attribute__((fallthrough)). Define
G_GNUC_FALLTHROUGH for those that support __has_attribute.
2020-02-28 09:34:38 +01:00
Philip Withnall
369626e310 2.64.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 16:11:22 +00:00