Commit graph

2666 commits

Author SHA1 Message Date
Simon McVittie
dbc7637f13 Modernize checks in ld_supports_flag
Part of a patch by Javier Jardón.

(This will conflict with changes from my gc-sections branch -smcv)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:48:14 +00:00
Simon McVittie
7fe24aacd2 Modernize checks for DBUS__ACQUIRE_SVC
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:47:28 +00:00
Simon McVittie
9bedcb0717 Modernize checks for monotonic clock
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:46:52 +00:00
Simon McVittie
dac0a716ad Modernize checks for cmsgcred
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:46:34 +00:00
Simon McVittie
5906c072da Modernize checks for ISO/GNU varargs
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:46:21 +00:00
Simon McVittie
07a54bb2f1 Modernize checks for socklen_t
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:46:00 +00:00
Simon McVittie
1704a7d483 Modernize checks for non-POSIX getpwnam_r
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:45:48 +00:00
Simon McVittie
cc2c19c164 Modernize checks for dirfd/dd_fd
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 15:45:31 +00:00
Simon McVittie
ff04d7397a Rename configure.in to configure.ac
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
2011-02-24 15:43:24 +00:00
Simon McVittie
cf33a006dc Post-release version bump 2011-02-18 14:24:35 +00:00
Mark Brand
49d1e3fa5a sysdeps-win needs _dbus_path_is_absolute
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-18 13:52:36 +00:00
Simon McVittie
b6142a593b Let's try that again. 2011-02-17 20:06:36 +00:00
Simon McVittie
2497a91b3f Remove unreviewed changes intended to support GTest-based tests
These were committed by mistake. :-(
2011-02-17 20:01:54 +00:00
Simon McVittie
86073fb2a7 Post-release version bump 2011-02-17 19:02:24 +00:00
Simon McVittie
56623cbde7 Prepare version 1.4.4 2011-02-17 18:21:25 +00:00
Simon McVittie
2b5959882a Split acinclude.m4 into separate files in m4/
Drop AM_CHECK_PYTHON_HEADERS (no longer used) and split the others
according to their upstreams.

Otherwise, compiler.m4 won't get included in tarballs.
2011-02-17 18:21:16 +00:00
Simon McVittie
a4102ba51f Merge branch 'leak-fixes-33126'
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-17 17:19:15 +00:00
Simon McVittie
9a97f82079 Import compiler.m4 and lcov.am from telepathy-glib, and use them to replace gcov
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
2011-02-17 17:07:12 +00:00
Simon McVittie
f6e2c958a0 Don't ignore all files in m4, just the libtool ones
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
2011-02-17 17:06:41 +00:00
Simon McVittie
d5e4fc13e8 Don't distribute dbus-daemon.1 in the tarball
It's generated by configure.

Also use a more normal way to distribute man pages that are actually
source, and use man1_MANS rather than auto-detecting the section from
the man page, which is best-practice and slightly faster.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34292
2011-02-17 16:31:44 +00:00
Simon McVittie
2f4c7dd5ba Don't distribute dbus-arch-deps.h in the tarball
It's generated by configure and specific to a system, so there's no point.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34292
2011-02-17 16:18:31 +00:00
Simon McVittie
f8d0012ab1 Remove references to dbus-md5, which hasn't been used for at least 8 years
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34292
2011-02-17 16:16:12 +00:00
Simon McVittie
2acfe412b6 DBusTransport: don't copy DBusAuth's GUID to expected_guid
There was previously a leak in _dbus_transport_get_is_authenticated, if
we hit OOM when copying the server's actual GUID. This would fail the
"SHA1 connection test" if _dbus_iterate was modified to allocate and free
one extra pointer per iteration.

Rather than adding OOM handling everywhere, if we avoid strdup'ing the
GUID, and just re-fetch the const string from the DBusAuth object on demand
instead, we go back to a situation where _dbus_transport_get_is_authenticated
can't fail.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-16 14:47:08 +00:00
Simon McVittie
d9af45a1fa update_desktop_file_entry: stylistic fixes based on Colin's review 2011-02-16 14:47:08 +00:00
Simon McVittie
75cfd97fc2 update_desktop_file_entry: unify cleanup code for success and failure cases
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-16 14:47:08 +00:00
Simon McVittie
fbecc33435 update_desktop_file_entry: don't double-free strings if added to entry before failure
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-16 14:47:08 +00:00
Simon McVittie
65f61236d7 update_desktop_file_entry: free @exec on error
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-16 14:47:08 +00:00
Simon McVittie
d95cc488a8 update_desktop_file_entry: make scope of exec_tmp as short as possible
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-16 14:47:08 +00:00
Simon McVittie
fb704ba78f update_desktop_file_entry: use _dbus_strdup for something we'll dbus_free
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
2011-02-16 14:47:08 +00:00
Simon McVittie
02b0fa5792 NEWS so far for 1.4.4 2011-02-16 12:37:59 +00:00
Lennart Poettering
509a2e899a build-sys: ignore -Waddress message so that build works on gcc/rawhide
Newer gccs warn if you compare an address of a variable that is allocated
on the stack or is static with NULL. Since we compile dbus with -Werror
this causes the build to fail since we do this check all the time due to
macros such as _DBUS_ASSERT_ERROR_IS_SET().
2011-02-15 13:29:31 +01:00
Matthias Clasen
51e0e91115 Fix syslog string processing
squash_string_nonprintable didn't actually modify the string.

Reviewed-By: Colin Walters <walters@verbum.org>
2011-02-14 11:32:03 -05:00
Colin Walters
66a09fa7c3 bus: Raise file descriptor limit to match configuration
The default configuration has hardcoded 2048 complete connections,
and 64 incomplete.  We need at least that number of file descriptors,
plus some for internal use.

In the bus, attempt to call setrlimit() before we drop privileges.
Practically speaking for this means the system bus gets it, the
session bus doesn't.

http://bugs.freedesktop.org/show_bug.cgi?id=33474

Reviewed-By: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-03 13:25:34 -05:00
Simon McVittie
a0e8ae3b77 Merge branch 'dist-30285' into dbus-1.4
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-02 15:15:02 +00:00
Simon McVittie
9fee6d735e Merge branch 'serverdata-33277' into dbus-1.4
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-02 15:14:31 +00:00
Simon McVittie
f7ecd2fb8b Ignore files produced by make dist 2011-02-01 18:04:35 +00:00
Simon McVittie
27f29026c2 Don't distribute generated files that embed our builddir
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=30285
2011-02-01 18:04:21 +00:00
Simon McVittie
3a380137c0 bus-test: add support for only running one test
This is much quicker when valgrinding.

Reviewed-by: Colin Walters <walters@verbum.org>
2011-02-01 11:47:43 +00:00
Simon McVittie
743e79d1dc dbus_bus_set_unique_name, dbus_bus_get_unique_name: remember to unlock on OOM
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
Reviewed-by: Colin Walters <walters@verbum.org>
2011-02-01 11:41:02 +00:00
Simon McVittie
7480dfdb2a If a file included via <includedir/> is invalid, syslog and skip it
This is more graceful than failing entirely (our previous behaviour),
but more visible than ignoring it completely (the previous behaviour
patched in by Debian and derivatives).

Based on a patch from Daniel Silverstone back in 2004, which was meant
to be temporary; I think it makes sense to change this permanently,
since files in *.d are typically supplied by other packages, whose bugs
shouldn't be able to bring down dbus-daemon.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19186
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230231
Reviewed-by: Colin Walters <walters@verbum.org>
2011-01-31 19:16:00 +00:00
Alban Crequy
4d93cc858c Implement message type in match_rule_to_string
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-01-31 15:31:11 +00:00
Simon McVittie
ab058c4a31 Opt-in to thread safety on Solaris
Alternatively, get a better C library. :-)

See also:
<http://lists.freedesktop.org/archives/dbus/2010-November/013796.html>,
<http://lists.freedesktop.org/archives/dbus/2010-December/013902.html>.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33464
Reviewed-by: Colin Walters <walters@verbum.org>
2011-01-27 17:53:45 +00:00
Simon McVittie
799cef5f9e _dbus_server_new_for_tcp_socket: fix error handling
This is one of the patches from Maemo's dbus package. It seems to do all
of:

* fix some documentation
* remove unreached code to delete/free the nonce file from
  _dbus_server_new_for_socket - doing that on failure violates
  least-astonishment anyway
* in _dbus_server_new_for_tcp_socket, never fail without setting @error
* if we fail after creating the nonce file, delete it
* if we fail after allocating the nonce file struct, free it

Origin: vendor, Maemo
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-01-26 18:55:00 +00:00
Simon McVittie
96a6d14376 Make _dbus_directory_get_next_file use readdir, not readdir_r
This isn't thread-safe or reentrant, but it turns out we don't need
either of those properties, and readdir_r is a real pain to use correctly,
particularly in the presence of FUSE filesystems that might implement
statfs() wrong.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=8284
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=15922
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-01-25 13:18:15 +00:00
Simon McVittie
a431ced679 test/name-test: remove dangling references to test-names.c, which is absent
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-01-25 13:18:03 +00:00
Simon McVittie
d855baed00 fix check for 32-bit integers if short is 32 bits long
In practice, this won't happen for years, but we might as well be correct.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-01-25 13:17:44 +00:00
Simon McVittie
460e6282d6 _dbus_loop_iterate: if the kernel says a fd is bad, stop watching it
Again, this shouldn't happen - modules are responsible for cleaning up
their watches - but the failure mode here is really bad: if we leave an
invalid fd in the set, every poll() call will instantly return, marking
it as POLLNVAL. The result is that dbus-daemon busy-loops on poll()
without responding to I/O, so the bad watch will probably never be
cleared up.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32992
Bug-NB: NB#200248
Reviewed-by: Colin Walters <walters@verbum.org>
2011-01-21 15:01:37 +00:00
Simon McVittie
f3ed53a30f _dbus_loop_iterate: cleanup: make more use of a temporary variable
It was added by the previous commit.

Reviewed-by: Colin Walters <walters@verbum.org>
2011-01-21 15:01:24 +00:00
Simon McVittie
f740396874 _dbus_loop_iterate: if a watch has been invalidated, skip it
This shouldn't happen - other modules are responsible for cleaning up
their watches - but the bug fixed in my last commit has been present for
several years and I'm sure it's not the only one, so for robustness,
let's refuse to watch obviously-wrong file descriptors.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32992
Bug-NB: NB#200248
Reviewed-by: Colin Walters <walters@verbum.org>
2011-01-21 15:01:16 +00:00
Simon McVittie
ca18baf83a dbus-spawn: don't leave bad file descriptors being watched
The code called from handle_watch() might close either or both of the
sockets we're watching, without cleaning up the DBusWatch. This results
in invalid file descriptors being passed to _dbus_poll(), which could
end up busy-looping on a POLLNVAL condition until the babysitter loses
its last ref (which automatically clears up both watches).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32992
Bug-NB: NB#200248
Reviewed-by: Colin Walters <walters@verbum.org>
2011-01-21 15:00:25 +00:00