| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The timeout handling code subtracts the elapsed time from the timeout
each time a message is received, which drastically reduces the timeout
in circumstances such as service activation.
Correct so that the timeout is never modified, and the elapsed time
instead subtracted where necessary.
Signed-off-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
|
|
|
|
| |
Signed-off-by: Thiago Macieira <thiago@kde.org>
|
|
|
|
| |
Signed-off-by: Thiago Macieira <thiago@kde.org>
|
| |
|
| |
|
|
|
|
|
| |
Otherwise, when compiling with optimisation, the compiler will detect
that b was unused, then use the instructions that i386 supports.
|
|
|
|
|
| |
Library Age = 5 / Current = 8 indicates this development
series. Revision will increase from 0 after 1.4.0 is released.
|
|
|
|
|
| |
This script is not deployed to the builddir, so it cannot be
run with relative paths.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
dbus/dbus-connection.c
dbus/dbus-message-util.c
dbus/dbus-sysdeps-unix.c
|
| |
| |
| |
| |
| |
| | |
We have to use the return value, otherwise GCC optimises the code
by using instructions that don't return anything. That won't
match what we actually use in dbus-sysdeps-unix.c
|
| |
| |
| |
| |
| |
| | |
This simply verifies that we forward unix fds only on connection that
support it. We willr eturn an error if a client attempts to send a
message with unix fds to another client that cannot do it.
|
| |
| |
| |
| | |
in once piece right now
|
| | |
|
| |
| |
| |
| |
| | |
Create configuration settings and enforce message unix fd limits the
same way we do for allocated message memory.
|
| |
| |
| |
| | |
This make all counters count both bytes of memory and unix fds.
|
| |
| |
| |
| |
| |
| | |
glibc knows three bswap_{16|32|64}() calls that internally make use of a
gcc extension to implement faster byteswapping. We should make use of it
if we can.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Newer gccs and intel ccs support a __sync extension for making use of
atomic operations. This patch replaces the handcrafted x86 atomic
operation support with usage of __sync.
__sync is supported by more processors and by more compilers than the
old assembler code. Also, this extension has been available on gcc for
quite a while now for x86, so replacing the old assembler code should
only be a loss when very old compiilers are used.
|
| |
| |
| |
| |
| |
| | |
Trailing whitespace sucks. This change modifies autogen.sh to activate
the example pre-commit that ships with git. It will make sure that from
then on no further commits with trailing whitespace can be made
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds two new directives to the auth protocol:
NEGOTIATE_UNIX_FD is sent by the client after the authentication was
sucessful, i.e. OK was received.
AGREE_UNIX_FD is then sent by the server if it can do unix fd passing as
well.
ERROR is returned when the server cannot or is unwilling to do unix fd
passing.
This should be compatible with existing D-Bus implementations which will
naturally return ERROR on NEGOTIATE_UNIX_FD.
|
| |
| |
| |
| |
| |
| | |
Since all socket users enable FD_CLOEXEC anyway we can just do that in
_dbus_open_socket() and be done with it for all cases. By side effect
this allows us to use SOCK_CLOEXEC and hence close the CLOEXEC race.
|
| |
| |
| |
| | |
This should fix another CLOEXEC race.
|
| |
| |
| |
| |
| | |
Instead of having everyone define _GNU_SOURCE and similar macros
seperately, simply do so centrally by using AC_USE_SYSTEM_EXTENSIONS
|
| |
| |
| |
| |
| |
| |
| | |
All users of full duplex pipes enable FD_CLOEXEC later anyway so let's
just do it as part of _dbus_full_duplex_pipe. By side effect this allows
to make use of SOCK_CLOEXEC which fixes a race when forking/execing from
a different thread at the same time as we ar in this function.
|
| |
| |
| |
| |
| | |
This adds a full test for passing multiple fds across a D-Bus
connection.
|
| |
| |
| |
| |
| |
| |
| |
| | |
do it
Not all of the send function flavours allow returning proper error
codes. For the cases where this is not easily possible the client should
call dbus_connection_can_send_type() first.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is just a wrapper around _dbus_transport_can_pass_unix_fd() however
it is more generic.
The reason for keeping this generic is to ease later addition of more
types without having to add a new API for that.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When appending unix fds to the message a new entry in the fd array will
be allocated and the index to it will be written to the message payload.
When parsing unix fds from the message the index will be read from the
payload and then looked up in the fd array.
When we read fds we put them in a queue first. Since each message knows
how many fds are attached to it we will then pop enough fds from this
queue each time we decode a message from the stream.
This should make sending and receiving more portable since we don't make
any strong requirements on the exact semantics of the SCM_RIGHTS
implementation: as long as fds are recieved in order, none or lost and
the arrive at the same time as at least one byte from the actual message
dat we should be able to handle them correctly.
|
| |
| |
| |
| |
| | |
This is actually pretty boring since we store our fds as indexes that
are stored as uint32_t's.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We introduce a new type code for the unix fds. The data stored in unix
fd fields will be an integer index into the array of fds that are
attached to a specific message. We also introduce a new header field
that stores how many fds belong to the message. And finally we introduce
a new error for messages where the payload and the meta data (i.e. unix
fds read for it) don't match up.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This introduces three new functions:
_dbus_read_socket_with_unix_fds
_dbus_write_socket_with_unix_fds
_dbus_read_socket_with_unix_fds_two
These work exactly like their counterpart sans 'with_unix_fds' except
that they also send/recieve file descriptors along with the actual
payload data.
|
| |
| |
| |
| |
| |
| | |
This function can be used to check if a socket can be used to pass file
descriptors. On platforms that don't support this at all this is
hardcoded to return FALSE.
|
| |
| |
| |
| |
| |
| |
| | |
This is a simple wrapper around dup()-like functionality.
Also handles CLOEXEC and makes sure we don't interfere with the standard
I/O file descriptors 0, 1 and 2.
|
| |
| |
| |
| | |
If we can use MSG_NOSIGNAL we don't have to play games with SIGPIPE
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On Linux send()/sendmsg() know the special flag MSG_NOSIGNAL which if
set makes sure that no SIGPIPE signal is raised when we write to a
socket that has been disconnected.
By using this flag we don't have to play games with SIGPIPE which is
pretty ugly stuff since it touches the global process context.
|
| |
| |
| |
| |
| | |
Due to some unknown reasons the dbus_new() macros had a semicolon at the
end which makes it impossible to use them in some situations.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These header files include config.h explicitly anyway. These checks are
hence pointless.
Of course one could argue that including config.h from header files
sucks, but D-Bus generally seems not to have a problem with that, so
let's unify this.
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
configure.in
|
| | |
| | |
| | |
| | |
| | |
| | | |
Define POSIX_PTHREAD_SEMANTICS earlier so more things use it.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a temporary hack for systems which use DBUS_BINDIR=/bin,
but then move dbus-launch back into /usr/bin. Longer term,
we should explicitly support this in upstream code, or even better
figure out how to move dbus-launch into /bin (e.g. dynamically
load libX11 if available), or have a --with-x11-tools configure
option.
(cherry picked from commit 70c5285eb4b757fdd4e552e002c5d54072492152)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes dbus on FreeBSD and DragonFly systems.
The patch is obtained from FreeBSD ports tree.
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 7bf132c7d15c1d8214b11442f053f7d53bca9a8f)
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit e4b271e2425a36884b5e3e70e6a32d440b41d145)
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 97c58ace430fb58cedfc1e5c83db9759063b6946)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
s/dbus_bus_add_watch/dbus_bus_add_match/
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 249f89181c4db5b15aab15472bb72402527434f5)
|
| | |
| | |
| | |
| | |
| | |
| | | |
The canonical copyright information in the source file says we
allow later versions of the GPL. So note that in COPYING too.
(cherry picked from commit f908daed82d61df44710a8ec681558c6d23b940d)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Patch based on extensive work from Michael Meeks <michael.meeks@novell.com>,
thanks to Dafydd Harries <dafydd.harries@collabora.co.uk>,
Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> and others.
The basic idea with this bug is that we effectively ignore errors
on write. Only when we're done reading from a connection do we
close down a connection. This avoids a race condition where
if a process (such as dbus-send) exited while we still had
data to read in the buffer, we'd miss that data.
(cherry picked from commit 0e36cdd54964c4012acec2bb8e598b85e82d2846)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Split out the process-launching code, which can be reused for
other applications; in particular, a forthcoming patch to parse
output from launchd for MacOS X.
(cherry picked from commit 6b163e95e7a2318a98c16c0d0944337e38e62efa)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On some platforms such as MacOS X and Windows, we can't depend
on an environment variable to determine the address of the
session bus. Create a sysdep function dbus_lookup_session_address
which can be filled in with platform-specific code.
(cherry picked from commit 6478ec6949c6bb794237b43d03b68f80eba1288c)
|