History log of /external/dbus/dbus/dbus-transport.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0d2584b4a1bed3ccb3c83682abb453d3ff2b68a4 21-May-2010 Jing Yu <jingyu@google.com> Remove gcc-4.5 compilation errors:
external/dbus/dbus/dbus-transport.c: In function '_dbus_transport_open':
external/dbus/dbus/dbus-transport.c:356:7: error: the comparison will always evaluate as 'false' for the address of 'tmp_error' will never be NULL [-Werror=address]

The key problem is that the macro _DBUS_ASSERT_ERROR_IS_CLEAR
and _DBUS_ASSERT_ERROR_IS_SET try to first check if &tmp_error==NULL.
gcc-4.5 reports an error, if tmp_error is a local stack variable
since &tmp_error will never be NULL.
gcc-4.4 and earlier versions are not as strict as gcc-4.5. We start
to see this type of errors from gcc-4.5.

This patch simply remove the "&tmp_error==NULL" comparisons only if
tmp_error is a local stack variable without changing anything else.
There may be better changes. But this patch is very consertative.
It keeps original comparison orders without making any assumption.

Change-Id: Ib16a6482765247f25ac6458e06861b077ed88ed5
/external/dbus/dbus/dbus-transport.c
d5217348517e6b00a04e500ca460daf6cc928cd9 26-Mar-2010 Ralf Habacker <ralf.habacker@freenet.de> Cleaned up _dbus_verbose calls: function names and code line numbers are printed by default.
/external/dbus/dbus/dbus-transport.c
dbecdeabb20e0ce11121819c63373f0afba57c58 19-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Consistently include <config.h> in all C source files and never in header files.
/external/dbus/dbus/dbus-transport.c
8c5456c337c65d43f0a2bc1be14beb6391441239 22-Apr-2009 Tor Lillqvist <tml@iki.fi> dbus/dbus-transport.c: _dbus_credentials_get_windows_sid might return NULL (cherry picked from commit 8d8d5fa1babc8f51f1d1bb95b8116850978c60d9)
/external/dbus/dbus/dbus-transport.c
ef86bcedc8ec33b77b710a0e1ff84b4ae2539bc1 22-Apr-2009 Tor Lillqvist <tml@iki.fi> dbus/dbus-transport.c: fix {our,auth}_identity mismatch (cherry picked from commit e15f1cde3b5893357f640e360f64c0a1ae37f93b)
/external/dbus/dbus/dbus-transport.c
37019e9d271390fa8c62c1aae62d30bb9068adaa 16-Jul-2009 Thiago Macieira <thiago@kde.org> Merge branch 'fd-passing'

Conflicts:
dbus/dbus-connection.c
dbus/dbus-message-util.c
dbus/dbus-sysdeps-unix.c
5baf2f856a9c6625993234855b07680da1c8916f 11-Jul-2009 Tobias Mueller <fdo-bugs@cryptobitch.de> Bug 21161 - Update the FSF address

No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-transport.c
bfad32422f1f78bce4de1e88a4afb5cc295bb877 20-May-2009 Lennart Poettering <lennart@poettering.net> unix-fd: add logic to count unix fds the same way as allocated memory

This make all counters count both bytes of memory and unix fds.
/external/dbus/dbus/dbus-transport.c
c200e0304d6f53a0fd47f524386b02b27c0c45f6 24-Apr-2009 Lennart Poettering <lennart@poettering.net> auth: add fd passing negotiation support

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.
/external/dbus/dbus/dbus-transport.c
a0cc21f8bb6752ffe0ee5f4f5b575dc50d6d46ae 22-Apr-2009 Lennart Poettering <lennart@poettering.net> unix-fd: add message encoding/decoding for unix fds

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.
/external/dbus/dbus/dbus-transport.c
3c89788fa483ebda858ab66797e2834af94b798f 21-Apr-2009 Kjartan Maraas <kmaraas@gnome.org> Bug 19502 - Sparse warning cleanups

This patch makes various things that should be static static,
corrects some "return FALSE" where it should be NULL, etc.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-transport.c
ab1eb1fd5a26affa2383b0eb7e292efd83ec2546 05-Jun-2008 Colin Walters <walters@verbum.org> Bug 15740: Solaris/ADT auditing support (simon zheng)

* bus/driver.c: Add GetAdtAuditSessionData method
which returns audit data for a connection.
* configure.in: Detect ADT auditing support
* dbus/dbus-auth.c: Read ADT auditing creds.
* dbus/dbus-connection.c: Implement
dbus_connection_get_adt_audit_session_data.
* dbus/dbus-connection.h: Export it.
* dbus/dbus-credentials.c: Add support for
gathering adt_audit_data and retrieving it
via _dbus_credentials_get_adt_audit_data.
* dbus/dbus-credentials.h: Add
DBUS_CREDENTIAL_ADT_AUDIT_DATA_ID.
* dbus/dbus-protocol.h: New error
DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN.
* dbus/dbus-sysdeps.c: Support for reading
audit credentials via ADT API.
* dbus/dbus-transport.c: New function
_dbus_transport_get_adt_audit_session_data
to retrieve credentials.
* dbus/dbus-transport.h: Export it.
/external/dbus/dbus/dbus-transport.c
ca87b90981e88623589b7d1d42ce5bafcb644213 03-Apr-2008 John (J5) Palmieri <johnp@redhat.com> fix memleak due to autolaunch and recursive calls to _dbus_open_transport

* Patch from Sumit <sumitskj_20@yahoo.com>, comments added

* dbus/dbus-transport.c(_dbus_transport_open): fix mem leak
/external/dbus/dbus/dbus-transport.c
f55897af74ac072d3447e5cf513d0f4718b142c7 10-Oct-2007 Simon McVittie <simon.mcvittie@collabora.co.uk> Use DBUS_ERROR_INIT instead of dbus_error_init wherever it's clearly equivalent
/external/dbus/dbus/dbus-transport.c
d012387afef0ba02185ebe27bc6bb15551912e92 14-Jul-2007 Havoc Pennington <hp@redhat.com> 2007-07-13 Havoc Pennington <hp@redhat.com>

* Add indent-tabs-mode: nil to all file headers.
/external/dbus/dbus/dbus-transport.c
62c638249ecc1a3ae3e4388fc9f4a45a80e34587 21-Jun-2007 Ralf Habacker <ralf.habacker@freenet.de> * dbus/dbus-tranport.c (auth_via_default_rules): made the verbose spam cross-platform
/external/dbus/dbus/dbus-transport.c
54b943432c7c947db88066751dd36a372cc9a618 18-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-18 Havoc Pennington <hp@redhat.com>

* doc/dbus-specification.xml: document org.freedesktop.DBus.GetId()

* bus/driver.c (bus_driver_handle_get_id): implement org.freedesktop.DBus.GetId()

* bus/bus.c (bus_context_new): generate a unique ID for each bus context

* dbus/dbus-connection.c (dbus_connection_get_server_id): new function

* dbus/dbus-bus.c (dbus_bus_get_id): new function

* dbus/dbus-server.c (dbus_server_get_id): new function
/external/dbus/dbus/dbus-transport.c
98f19852078cf03f8b50a93d49d83b85c0dd400b 18-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-18 Havoc Pennington <hp@redhat.com>

* dbus/dbus-watch.c (dbus_watch_get_socket)
(dbus_watch_get_unix_fd): new API to match DBusConnection
(dbus_watch_get_fd): deprecate this

Throughout: just s/dbus_watch_get_fd/dbus_watch_get_socket/g for
now since all the transports use sockets anyway
/external/dbus/dbus/dbus-transport.c
e3d30a03225dd1d26012ecd39b09e4ccf91befb5 13-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-13 Havoc Pennington <hp@redhat.com>

* configure.ac, bus/selinux.c, dbus/dbus-sysdeps-unix-util.c: add
libaudit support, no clue what this means really but now we have
it. Patches from Fedora package.

* bus/bus.c (bus_context_new): move selinux initialization after
changing to daemon user, patch from Fedora package

* dbus/dbus-transport.c (auth_via_unix_user_function): fix a typo
/external/dbus/dbus/dbus-transport.c
94125e89b6be74cb20100d5321a98aa6529187a9 12-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-12 Havoc Pennington <hp@redhat.com>

* dbus/dbus-auth.c (sha1_handle_second_client_response)
(handle_server_data_anonymous_mech): add the process ID from
socket credentials, if available, even if not using EXTERNAL

* dbus/dbus-transport.c (auth_via_default_rules): support
allow_anonymous flag

* dbus/dbus-connection.c (dbus_connection_get_is_anonymous)
(dbus_connection_set_allow_anonymous): new API for controlling
anonymous access
/external/dbus/dbus/dbus-transport.c
7be5fd95cdccdca28937804f32ca8b1308887d09 10-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* bus/policy.c (bus_policy_create_client_policy): gracefully
continue if the connection has no unix user - just don't apply
any unix user dependent rules.

* bus/config-parser.c: remove dbus-userdb.h usage

* bus/bus.c: remove dbus-userdb.h usage

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
support Windows user function; also, fix the logic for checking
auth as root in the default auth code (broken in the previous
commit)

* dbus/dbus-connection.c
(dbus_connection_set_windows_user_function): new function
(dbus_connection_get_windows_user): new function
/external/dbus/dbus/dbus-transport.c
23832672266bb4ff23b66247c0cfa1a2ed0cc97b 09-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* bus/dispatch.c (check_get_connection_unix_process_id): adapt
since sysdeps-unix.h stuff isn't included anymore

* bus/bus.c (bus_context_new): use more abstract functions to
change user, so they can be no-ops on Windows

* dbus/dbus-credentials.c, dbus/dbus-credentials.h,
dbus/dbus-credentials-util.c: new files containing a fully opaque
DBusCredentials data type to replace the old not opaque one.

* configure.in (DBUS_UNIX): define DBUS_UNIX to match DBUS_WIN on
windows

* dbus/dbus-userdb.h: prohibit on Windows, next step is to clean
up the uses of it in bus/*.c and factor out the parts of
cookie auth that depend on it
/external/dbus/dbus/dbus-transport.c
f1ca9b89e92de4d876dc5e7e85710c4d2dc87638 17-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-17 Havoc Pennington <hp@redhat.com>

* dbus/dbus-internals.c (_dbus_warn_check_failed): new function to
be used for return_if_fail type warnings; prefixes the pid, and
fatal by default.
/external/dbus/dbus/dbus-transport.c
f6fa010403cb2badd88ce096ae91f664418508d1 30-Sep-2006 Thiago Macieira <thiago@kde.org> * configure.in: add DBUS_BINDIR as a #define to C source code.

* tools/dbus-launch.c
* tools/dbus-launch.h
* tools/dbus-launch-x11.c:
* tools/dbus-launch.1: Add the --autolaunch option to
dbus-launch, which makes it scan for an existing session
started with --autolaunch. With that option, it also creates
an X11 window and saves the bus address and PID to it.

* dbus/dbus-sysdeps.h:
* dbus/dbus-sysdeps-unix.c (_dbus_get_autolaunch_address): Add
a function that runs "dbus-launch --autolaunch" to retrieve
the running D-Bus session address (or start one if none was running)

* dbus/dbus-transport.c: Add the handler for the "autolaunch:"
address protocol, which tries to get the running session from
dbus-launch.

* dbus/dbus-bus.c:
* dbus/dbus-internals.h: Make "autolaunch:" be the default
D-Bus session bus address.

* dbus/dbus-connection.c: Fix horrible typo in error message.
/external/dbus/dbus/dbus-transport.c
1ececca7e15adc20d3f922aeb81af74c6f98e980 17-Sep-2006 Havoc Pennington <hp@redhat.com> 2006-09-17 Havoc Pennington <hp@redhat.com>

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
fix so that if unix_user_function is set on windows, we still
do the default check that the auth identity matches the bus identity
/external/dbus/dbus/dbus-transport.c
fe4715b656237b89767b5dc0cba4c107541b6e0d 16-Sep-2006 Havoc Pennington <hp@redhat.com> 2006-09-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-transport.c (_dbus_transport_open): modify to delegate
to _dbus_transport_open_platform_specific,
_dbus_transport_open_socket,
and _dbus_transport_open_debug_pipe

* dbus/dbus-transport-protected.h: add _dbus_transport_open_platform_specific
/external/dbus/dbus/dbus-transport.c
e001455a0300cc1df17684a028049c8c33e4f575 16-Sep-2006 Havoc Pennington <hp@redhat.com> 2006-09-16 Havoc Pennington <hp@redhat.com>

Attempt auditing public API to remove all cases where a Unix
function returns weird emulated goo to Windows. This probably
breaks the bus daemon on Windows, to fix it again we may
need to stop processing unix-specific config options on Windows,
and may need to add Windows-specific public API or config options.

* configure.in (LT_CURRENT, LT_AGE): increment current and age,
to reflect added interfaces; should not break soname.

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated): do
not invoke unix user function on Windows. Kind of a hacky fix, but
we don't want a "unix uid" leaking out on Windows.

* dbus/dbus-connection.c (dbus_connection_get_socket): add new API
to get the socket fd on Windows or UNIX
(dbus_connection_get_unix_fd): make this always fail on Windows
/external/dbus/dbus/dbus-transport.c
8027efc97b4bec85f674570f878919cb72456745 16-Sep-2006 Havoc Pennington <hp@redhat.com> voc Pennington <hp@redhat.com>

* dbus/dbus-server.c (dbus_server_listen): change how this works
to be able to delegate to a set of handlers that can succeed,
fail, or choose not to handle. Allows us to have
dbus_server_listen_platform_specific.

* dbus/dbus-server-socket.c (_dbus_server_new_for_tcp_socket):
factor out the tcp socket stuff to be used on windows, leaving
unix domain socket only in dbus-socket-unix.c

* dbus/dbus-transport-socket.c
(_dbus_transport_new_for_tcp_socket): factor out the tcp socket
stuff to be used on windows, leaving unix domain socket only
in dbus-transport-unix.c

* dbus/dbus-connection.c (dbus_connection_get_unix_user): insert
temporary hack to be sure this fails on windows
(dbus_connection_get_unix_process_id): ditto
/external/dbus/dbus/dbus-transport.c
5ee4ac1a303b3c66ff300eef55abd5f5d312cc0a 25-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-transport.c: fix invalid deref when checking if
a vtable method exists (Patch from Christian Ehrlicher
<ch dot ehrlicher at gmx dot de>)
/external/dbus/dbus/dbus-transport.c
7652304bff969afb3969603149bb385efe861fe8 03-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * s/D-BUS/D-Bus/g
/external/dbus/dbus/dbus-transport.c
4db285c800a68245ad7593e606ca8cb2c21a1329 06-May-2005 Havoc Pennington <hp@redhat.com> 2005-05-05 Havoc Pennington <hp@redhat.com>

* configure.in (LT_*): add notes on how the libtool versioning
works to save thinking. Increment soname to indicate protocol
breakage (though really the library interface hasn't changed I
guess)

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
verify the GUID received from server matches what we were
expecting, if we had an expectation

* dbus/dbus-auth.c (send_ok): send GUID along with the OK command
(_dbus_auth_get_guid_from_server): new function
(send_begin): parse the OK args

* doc/dbus-specification.xml: add GUID to the auth protocol
/external/dbus/dbus/dbus-transport.c
ee27481d7b7d6d9a4f41b7d641a2618dedf676dd 26-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-26 Havoc Pennington <hp@redhat.com>

* doc/TODO: remove the "guid" item

* test/glib/test-profile.c (no_bus_thread_func): use open_private
(with_bus_thread_func): use open_private

* dbus/dbus-connection.c (dbus_connection_open_private): new
function that works like the old dbus_connection_open()
(dbus_connection_open): now returns an existing connection if
possible

* dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
through the GUID to the transport

* dbus/dbus-server.c (_dbus_server_init_base): keep around the
GUID in hex-encoded form.

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
pass GUID argument in to the transport

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
guid argument

* dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument

* dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
/external/dbus/dbus/dbus-transport.c
f349e6b8c50ea6faa48c8261198cf1b07bf59a79 13-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
fix a double-unlock

* dbus/dbus-connection.c
(_dbus_connection_detach_pending_call_unlocked): add this

Initial semi-correct pass through to fix thread locking; there are
still some issues with the condition variable paths I'm pretty
sure

* dbus/dbus-server.c: add a mutex on DBusServer and appropriate
lock/unlock calls

* dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
rename to add _unlocked
(struct DBusConnection): move "dispatch_acquired" and
"io_path_acquired" to use only one bit each.
(CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
(dbus_connection_set_watch_functions): hacky fix to reentrancy
(_dbus_connection_add_watch, _dbus_connection_remove_watch)
(_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
(_dbus_connection_remove_timeout)
(_dbus_connection_toggle_timeout): drop lock when calling out to
user functions; done in a hacky/bad way.
(_dbus_connection_send_and_unlock): add a missing unlock
(_dbus_connection_block_for_reply): add a missing unlock

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
drop lock in a hacky probably unsafe way to call out to user
function
/external/dbus/dbus/dbus-transport.c
3ed9db546e1143bc9aa2d83a6f423fdd81227352 28-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-27 Havoc Pennington <hp@redhat.com>

* dbus/dbus-arch-deps.h.in: add 16/32-bit types

* configure.in: find the right type for 16 and 32 bit ints as well
as 64

* dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
the 16-bit types so people don't have to stuff them in 32-bit or
byte arrays.
/external/dbus/dbus/dbus-transport.c
dbdea921b5967ed25b24a9e5af5d6a3db54c5ec7 26-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-25 Havoc Pennington <hp@redhat.com>

The primary change here is to always write() once before adding
the write watch, which gives us about a 10% performance increase.

* dbus/dbus-transport-unix.c: a number of modifications to cope
with removing messages_pending
(check_write_watch): properly handle
DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
messages_pending stuff
(check_read_watch): properly handle WAITING_FOR_MEMORY and
AUTHENTICATED cases
(unix_handle_watch): after writing, see if the write watch can be
removed
(unix_do_iteration): assert that write_watch/read_watch are
non-NULL rather than testing that they aren't, since they
aren't allowed to be NULL. check_write_watch() at the end so
we add the watch if we did not finish writing (e.g. got EAGAIN)

* dbus/dbus-transport-protected.h: remove messages_pending call,
since it resulted in too much inefficient watch adding/removing;
instead we now require that the transport user does an iteration
after queueing outgoing messages, and after trying the first
write() we add a write watch if we got EAGAIN or exceeded our
max bytes to write per iteration setting

* dbus/dbus-string.c (_dbus_string_validate_signature): add this
function

* dbus/dbus-server-unix.c (unix_finalize): the socket name was
freed and then accessed, valgrind flagged this bug, fix it

* dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
as the last valid field plus 1, where really it is equal to the
last valid field. Corrects some message corruption issues.

* dbus/dbus-mainloop.c: verbosity changes

* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
instead of aborting in one of the test codepaths

* dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
caused not printing the pid ever again if a verbose was missing
the newline at the end
(_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE

* dbus/dbus-connection.c: verbosity changes;
(dbus_connection_has_messages_to_send): new function
(_dbus_connection_message_sent): no longer call transport->messages_pending
(_dbus_connection_send_preallocated_unlocked): do one iteration to
try to write() immediately, so we can avoid the write watch. This
is the core purpose of this patchset
(_dbus_connection_get_dispatch_status_unlocked): if disconnected,
dump the outgoing message queue, so nobody will get confused
trying to send them or thinking stuff is pending to be sent

* bus/test.c: verbosity changes

* bus/driver.c: verbosity/assertion changes

* bus/dispatch.c: a bunch of little tweaks to get it working again
because this patchset changes when/where you need to block.
/external/dbus/dbus/dbus-transport.c
43605a6f4e78a8c28afb4b1e924dff0301e0e95c 10-Aug-2004 Havoc Pennington <hp@redhat.com> 2004-08-09 Havoc Pennington <hp@redhat.com>

* COPYING: switch to Academic Free License version 2.1 instead of
2.0, to resolve complaints about patent termination clause.
/external/dbus/dbus/dbus-transport.c
1e9b185b0c274ef0d684b1e43418388225321e72 30-Jul-2004 Havoc Pennington <hp@redhat.com> 2004-07-24 Havoc Pennington <hp@redhat.com>

SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>

* bus/selinux.c, bus/selinux.h: new file encapsulating selinux
functionality

* configure.in: add --enable-selinux

* bus/policy.c (bus_policy_merge): add FIXME to a comment

* bus/main.c (main): initialize and shut down selinux

* bus/connection.c: store SELinux ID on each connection, to avoid
repeated getting of the string context and converting it into
an ID

* bus/bus.c (bus_context_get_policy): new accessor, though it
isn't used
(bus_context_check_security_policy): check whether the security
context of sender connection can send to the security context of
recipient connection

* bus/config-parser.c: add parsing for <selinux> and <associate>

* dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
implement dbus_connection_get_unix_fd()

* dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
function, used by the selinux stuff
/external/dbus/dbus/dbus-transport.c
c9c0adce43caa00345ad2aeb55822eabde523c2c 19-Jul-2004 David Zeuthen <davidz@redhat.com> 2004-07-19 David Zeuthen <david@fubar.dk>

* dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN

* bus/dispatch.c:
(check_get_connection_unix_user): Debug says GetProperty; but the
method is called GetConnectionUnixUser
(check_get_connection_unix_process_id): New function
(bus_dispatch_test): Actually call check_get_connection_unix_user();
also call check_get_connection_unix_process_id()

* bus/driver.c:
(bus_driver_handle_get_connection_unix_process_id): New function,
handles GetConnectionUnixProcessID on the org.freedesktop.DBus
interface

* dbus/dbus-auth.c:
(handle_server_data_external_mech): Set pid from the credentials
obtained from the socket

* dbus/dbus-connection.c:
(dbus_connection_get_unix_process_id): New function

* dbus/dbus-connection.h:
Add prototype for dbus_connection_get_unix_process_id

* dbus/dbus-transport.c:
(_dbus_transport_get_unix_process_id): New function

* dbus/dbus-transport.h:
Add prototype for _dbus_transport_get_unix_process_id
/external/dbus/dbus/dbus-transport.c
c614e5b4b12c771422da809014904fccccd442c8 18-May-2004 Kristian Høgsberg <krh@redhat.com> * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
filter against auth->allowed_mechs; we only add allowed mechs in
record_mechanisms().

* dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
ALLOWED_MECHS to auth-script format so we can set the list of
allowed mechanisms.

* data/auth/client-out-of-mechanisms.auth-script: New test to
check client disconnects when it is out of mechanisms to try.

* dbus/dbus-auth.c (process_command): Remove check for lines
longer that 1 MB; we only buffer up maximum 16 kB.

* dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
assume there might be unused bytes.

* dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
client-out-of-mechs, it is handled in process_reject(). Move check
for max failures to send_rejected(), as it's a server-only thing.
/external/dbus/dbus/dbus-transport.c
a1df3040f29223eddaa3ace0fe018fcb28cddcd9 02-Dec-2003 Richard Hult <richard@imendio.com> 2003-12-02 Richard Hult <richard@imendio.com>

* Update AFL version to 2.0 throughout the source files to reflect
the update that was done a while ago.
/external/dbus/dbus/dbus-transport.c
9f1a60dbba69844c0a04b3dd86280352736187ce 27-Nov-2003 Mikael Hallendal <micke@imendio.com> 2003-11-26 Mikael Hallendal <micke@imendio.com>

* bus/*.[ch]:
* dbus/*.[ch]:
* glib/*.[ch]: Made ref functions return the pointer
/external/dbus/dbus/dbus-transport.c
a63411cb3d101cef3e3fa5061001733b26d58fe1 26-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-26 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c: fix docs to properly describe the
disconnected message
(_dbus_connection_notify_disconnected): remove this function;
we can't synchronously add the disconnected message, we have to
do it after we've queued any remaining real messages
(_dbus_connection_get_dispatch_status_unlocked): queue the
disconnect message only if the transport has finished queueing all
its real messages and is disconnected.
(dbus_connection_disconnect): update the dispatch status here
/external/dbus/dbus/dbus-transport.c
a683a80c409cc4f2e57ba6a3e60d52f91b8657d0 21-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-21 Havoc Pennington <hp@pobox.com>

Get matching rules mostly working in the bus; only actually
parsing the rule text remains. However, the client side of
"signal connections" hasn't been started, this patch is only the
bus side.

* dbus/dispatch.c: fix for the matching rules changes

* bus/driver.c (bus_driver_handle_remove_match)
(bus_driver_handle_add_match): send an ack reply from these
method calls

* glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
arguments, reported by Seth Nickell

* bus/config-parser.c (append_rule_from_element): support
eavesdrop=true|false attribute on policies so match rules
can be prevented from snooping on the system bus.

* bus/dbus-daemon-1.1.in: consistently use terminology "sender"
and "destination" in attribute names; fix some docs bugs;
add eavesdrop=true|false attribute

* bus/driver.c (bus_driver_handle_add_match)
(bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
messages

* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
rid of broadcast service concept, signals are just always broadcast

* bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
mostly implement matching rules stuff (currently only exposed as signal
connections)
/external/dbus/dbus/dbus-transport.c
a70b042f0dcebb10689975c65a2c45b52b7a4437 04-Jun-2003 Havoc Pennington <hp@redhat.com> 2003-06-04 Havoc Pennington <hp@pobox.com>

* dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
using unix:abstract=/foo, and when listening in a tmpdir
i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.

* dbus/dbus-transport.c (_dbus_transport_open): support
unix:abstract=/foo

* dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
support abstract sockets

* dbus/dbus-transport-unix.c
(_dbus_transport_new_for_domain_socket): support abstract sockets

* dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
toggle as an argument, implement abstract namespace support
(_dbus_listen_unix_socket): ditto

* configure.in: add --enable-abstract-sockets and implement
a configure check for autodetection of the right value.
/external/dbus/dbus/dbus-transport.c
27b694f6e109c78c633ddb8d96f524e46e536f4e 09-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
data from getting written, and there wasn't a good reason to
use _exit really.

* test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
dbus_verbose lines in test coverage
(main): add list of functions sorted by # of untested blocks
to the coverage report

* dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS

* dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage

* dbus/dbus-message-handler.c (_dbus_message_handler_test):
extend test coverage

* test/data/auth/cancel.auth-script: test canceling an
authentication

* dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
aren't used. in CVS history if we end up needing them.
/external/dbus/dbus/dbus-transport.c
e8d396efef695b9868b0112c4a6266c97678fa8a 27-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-27 Havoc Pennington <hp@pobox.com>

Unbreak my code...

* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
report correct status if we finish processing authentication
inside this function.

* bus/activation.c (try_send_activation_failure): use
bus_transaction_send_error_reply

* bus/connection.c (bus_connection_get_groups): return an error
explaining the problem

* bus/bus.c (bus_context_check_security_policy): implement
restriction here that inactive connections can only send the
hello message. Also, allow bus driver to send anything to
any recipient.

* bus/connection.c (bus_connection_complete): create the
BusClientPolicy here instead of on-demand.
(bus_connection_get_policy): don't return an error

* dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
sender field in message being replied to

* bus/bus.c (bus_context_check_security_policy): fix silly typo
causing it to return FALSE always

* bus/policy.c (bus_client_policy_check_can_send): fix bug where
we checked sender rather than destination
/external/dbus/dbus/dbus-transport.c
4b87aa40dfba668f8622873f2ea420b098704e41 25-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-25 Havoc Pennington <hp@redhat.com>

* dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
where we used >= 0 instead of != DBUS_UID_UNSET.
/external/dbus/dbus/dbus-transport.c
4b45f17965f3262eb9b3bb49c015af79781c6882 17-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
list of size counters
(_dbus_message_loader_putback_message_link): put back a popped link

* dbus/dbus-connection.c
(dbus_connection_set_max_live_messages_size): rename
max_received_size
(dbus_connection_get_outgoing_size): get size of outgoing
queue
(_dbus_connection_set_connection_counter): remove this cruft
/external/dbus/dbus/dbus-transport.c
777707ed8dff6958972a93894a87ec1945c65c14 14-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
callbacks

* test/data/valid-config-files/debug-allow-all.conf.in: allow all
users

* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
fix to only recover unused bytes if we're already authenticated
(_dbus_transport_get_is_authenticated): fix to still mark us
authenticated if there are unused bytes.

* bus/dispatch.c: implement security policy checking

* bus/connection.c (bus_transaction_send_from_driver): new

* bus/bus.c (bus_context_check_security_policy): new

* bus/dispatch.c (send_service_nonexistent_error): delete this,
now we just set the DBusError and it gets converted to an error
reply.

* bus/connection.c (allow_user_function): enable code using actual
data from the config file

* bus/policy.c (list_allows_user): handle wildcard rules for
user/group connection perms
/external/dbus/dbus/dbus-transport.c
b09b7ca33cbaa7eae4f56b9cd699c8d0283dd754 13-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-12 Havoc Pennington <hp@pobox.com>

* bus/config-parser.c (bus_config_parser_new): fix a memleak

* dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
the pid/gid/uid, just for paranoia.

* test/break-loader.c (randomly_do_n_things): find a byte
containing a type code, and randomly change it to a different
type code.
/external/dbus/dbus/dbus-transport.c
51781f541094a4936d47119cd62682e0431c41e9 10-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c: lots of fixes

* dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
(_dbus_loop_iterate): remove old "quit if no callbacks" code,
that was crack, broke the test service.

* dbus/dbus-transport.c (_dbus_transport_open): fix error
handling to avoid piling up errors if we get a failure on the
first address.

* dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
pid in assertion failures.

* dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
to some fixed size of file descriptor array. Don't return TRUE
anytime a timeout exists, that led to lots of busy loop silliness
in the tests.
/external/dbus/dbus/dbus-transport.c
e45e4382274149ca60c11f068ccca719f3598074 06-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-06 Havoc Pennington <hp@pobox.com>

* bus/bus.c (bus_context_new): fix wrong handling of
server_data_slot_unref() in the error case.

* dbus/dbus-internals.h (_dbus_assert): change so it passes
"(condition) != 0" to _dbus_real_assert so that
"_dbus_assert (pointer)" doesn't cause a warning

* bus/main.c (main): accept --print-address option to print out
the message bus address

* dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this

* dbus/dbus-transport.c (_dbus_transport_open): special error for
"tmpdir" option to unix: address on client side

* dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
to unix: address

* configure.in (TEST_SOCKET_DIR): locate a temporary directory
we can use to create sockets in the test suite.

* bus/main.c (signal_handler): on SIGTERM, exit the daemon
cleanly. To be used for testing.

* dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()

* dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
handle trying to call this when there's no servers active
/external/dbus/dbus/dbus-transport.c
44ed933284589134603913b05f55ca55e8c5a566 01-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
function

* dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new

* dbus/dbus-internals.c (_dbus_dup_string_array): new function

* dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
socket 0777, and unlink any existing socket.

* bus/bus.c (bus_context_new): change our UID/GID and fork if
the configuration file so specifies; set up auth mechanism
restrictions

* bus/config-parser.c (bus_config_parser_content): add support
for <fork> option and fill in code for <auth>

* bus/system.conf.in: add <fork/> to default configuration,
and limit auth mechanisms to EXTERNAL

* doc/config-file.txt (Elements): add <fork>

* dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
(_dbus_change_identity): new function
/external/dbus/dbus/dbus-transport.c
fa05de9230d62e7c427b5313796fc6ccd4d0ff60 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@redhat.com>

Fix some annoying DBusString API and fix all affected code.

* dbus/dbus-string.c (_dbus_string_init): get rid of annoying
max_length argument
(_dbus_string_get_data): change to return string instead of using
an out param
(_dbus_string_get_const_data): ditto
(_dbus_string_get_data_len): ditto
(_dbus_string_get_const_data_len): ditto
/external/dbus/dbus/dbus-transport.c
29c71168cd17b11eed65023c97aff401d5305b01 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
(_dbus_transport_new_for_tcp_socket): these didn't need the "server"
argument since they are always client side

* dbus/dbus-server.c (dbus_server_get_address): new function

* bus/main.c (main): take the configuration file as an argument.

* test/data/valid-config-files/debug-allow-all.conf: new file to
use with dispatch.c tests for example

* bus/test-main.c (main): require test data dir

* bus/bus.c (bus_context_new): change this to take a
configuration file name as argument

* doc/config-file.txt (Elements): add <servicedir>

* bus/system.conf, bus/session.conf: new files

* dbus/dbus-bus.c (dbus_bus_get): look for system bus on
well-known socket if none set

* configure.in: create system.conf and session.conf
/external/dbus/dbus/dbus-transport.c
ce4fd314c6be9bfee16a172d5ca34e5097d309fc 25-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-24 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
file

* dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
NULL argument for "message" if the error is a well-known one,
fill in a generic message in this case.

* dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
favor of DBusError

* bus/test.c (bus_test_flush_bus): add

* bus/policy.c (bus_policy_test): test code stub
/external/dbus/dbus/dbus-transport.c
a26607ab68bf0878f23d2dbddec781b4b760d034 23-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-23 Havoc Pennington <hp@pobox.com>

* bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
policies code

* dbus/dbus-hash.h: add ULONG hash keys

* dbus/dbus-sysdeps.c (_dbus_get_groups): new
(_dbus_get_group_id): new function
/external/dbus/dbus/dbus-transport.c
b6ffea177fccb6cc4e65992da7d8b390054277f7 21-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-20 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
new function
(dbus_connection_get_unix_user): new function
/external/dbus/dbus/dbus-transport.c
b4a1100f4f81534e2aac0141afda750f318223d4 17-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
the watch

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
add some missing dbus_set_result

* bus/dispatch.c (bus_dispatch_add_connection): handle failure to
alloc the DBusMessageHandler

* dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
the transport here, since we call this from the finalizer; it
resulted in a double-finalize.

* dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
where we tried to use transport->connection that was NULL,
happened when transport was disconnected early on due to OOM

* bus/*.c: adapt to handle OOM for watches/timeouts

* dbus/dbus-transport-unix.c: port to handle OOM during
watch handling

* dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
reference to unused bytes instead of a copy

* dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
out of memory

* dbus/dbus-connection.c (dbus_connection_handle_watch): return
FALSE on OOM

* dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
of memory
/external/dbus/dbus/dbus-transport.c
ebb57e719c32becd95a1efe3dd269c21e5a011b6 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
this. always run the test suite before commit...

* bus/*: adapt to DBusConnection API changes

* glib/dbus-gmain.c: adapt to DBusConnection API changes,
requires renaming stuff to avoid dbus_connection_dispatch name
conflict.

* dbus/dbus-transport.c (_dbus_transport_queue_messages): new
function

* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
separate from _dbus_message_loader_return_buffer()

* dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
this, because it's now always broken to use; the number of
messages in queue vs. the number still buffered by the message
loader is undefined/meaningless. Should use
dbus_connection_get_dispatch_state().
(dbus_connection_dispatch): rename from
dbus_connection_dispatch_message
/external/dbus/dbus/dbus-transport.c
f587ce7845edb0eb01451368d01b5bc86b5904cd 15-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-15 Havoc Pennington <hp@pobox.com>

Make it pass the Hello handling test including all OOM codepaths.
Now to do other messages...

* bus/services.c (bus_service_remove_owner): fix crash when
removing owner from an empty list of owners
(bus_registry_ensure): don't leave service in the list of
a connection's owned services if we fail to put the service
in the hash table.

* bus/connection.c (bus_connection_preallocate_oom_error): set
error flag on the OOM error.

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
handle _dbus_transport_set_connection failure

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
to create watches up front and simply enable/disable them as
needed.
(unix_connection_set): this can now fail on OOM

* dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
of enabling/disabling a watch or timeout.

* bus/loop.c (bus_loop_iterate): don't touch disabled
watches/timeouts

* glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
/external/dbus/dbus/dbus-transport.c
169238e99a4a163c89eb053250daeedf5f73e5cd 15-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-14 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
transport, tests more of the real codepath. Set up clients
with bus_setup_debug_client.

* bus/test.c (bus_setup_debug_client): function to set up debug
"clients" on the main loop

* dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
support

* dbus/dbus-server.c (dbus_server_listen): add debug-pipe
server type

* dbus/dbus-server-debug.c: support a debug server based on pipes

* dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
(_dbus_close): new function

* configure.in: check for socketpair
/external/dbus/dbus/dbus-transport.c
942a69b1cd53fc1c1a1835aaf25101b03b9527e5 05-Mar-2003 Anders Carlsson <andersca@codefactory.se> 2003-03-05 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-transport.c: (_dbus_transport_open):
Remove duplicate "tcp" entry.

* doc/dbus-specification.sgml:
Clarify some things.
/external/dbus/dbus/dbus-transport.c
7265423411609c14ddb9e6643463b840afcaa09b 26-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply_and_block): fix crash
where we ref'd the outgoing message instead of the returned reply

* dbus/dbus-transport-unix.c (do_authentication): check read watch
at the end of this function, so if we didn't need to read for
authentication, we reinstall it for receiving messages

* dbus/dbus-message.c (dbus_message_new_reply): allow replies to
a NULL sender for peer-to-peer case

* dbus/dbus-transport-unix.c (check_read_watch): handle
!authenticated case correctly

* glib/dbus-gmain.c: add support for DBusServer

* dbus/dbus-server.c: add data slot support

* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
return values and handle errors

* dbus/dbus-dataslot.c: factor out the data slot stuff from
DBusConnection

* Doxyfile.in (INPUT): add glib subdir

* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
setup_with_g_main instead of hookup_with_g_main; write docs
/external/dbus/dbus/dbus-transport.c
6180d6954c41a2412c166e5a9e8a2851cf39c6d1 19-Feb-2003 Mikael Hallendal <micke@codefactory.se> 2003-02-19 Mikael Hallendal <micke@codefactory.se>

* dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
Added to create a transport connecting using a tcp/ip socket.

* dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
to a tcp socket at given host and port.
(_dbus_listen_tcp_socket): added to listen on tcp socket for given
hostname and port.

* dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.

* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
Added to create a server listening on a TCP/IP socket.
/external/dbus/dbus/dbus-transport.c
fe4018941190f8bf020e4a8ed2999c212e0e113d 15-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-15 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-threads.c:
* dbus/dbus-threads.h:
Add condvars. Remove static mutext from API.
Implement static mutexes by initializing them from threads_init.

* glib/dbus-gthread.c:
* qt/dbus-qthread.cpp:
Update with the thread api changes.


* dbus/dbus-list.c:
* dbus/dbus-list.h:
Turn StaticMutex into normal mutex + init function.
Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
_dbus_list_append_link, _dbus_list_prepend_link


* dbus/dbus-sysdeps.c:
* dbus/dbus-sysdeps.h:
New type dbus_atomic_t, and new functions _dbus_atomic_inc,
_dbus_atomic_dec. Only slow fallback implementation at the moment.

* dbus/dbus-protocol.h:
Add DBUS_MESSAGE_LOCAL_DISCONNECT define

* dbus/dbus-message.c:
Make ref/unref atomic.
Fix some docs.

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
* dbus/dbus-connection.h:
Make threadsafe.
Change _peek to _borrow,_return & _steal_borrowed.
Change disconnect callback to event.
Make dbus_connection_dispatch_messages reentrant.

* dbus/dbus-transport.c:
Don't ref the connection on calls to the transport
implementation.

* dbus/dbus-message-handler.c:
Make threadsafe.

* glib/dbus-gmain.c:
Don't use peek_message anymore

* test/Makefile.am:
* test/debug-thread.c:
* test/debug-thread.h:
Simple thread implementation that asserts() on deadlocks in
single-threaded code.

* test/bus-test.c:
(main) Call debug_threads_init.

* test/watch.c:
Use disconnect message instead of disconnect callback.

* bus/connection.c:
* bus/connection.h:
Don't call dbus_connection_set_disconnect_function. Instead export
bus_connection_disconnect.

* bus/dispatch.c:
Call bus_connection_disconnect when we get a disconnected message.
/external/dbus/dbus/dbus-transport.c
6d22cfa65a3b77e91d2282d52d37bab9fff3db8d 01-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-02 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-server.c: (dbus_server_listen):
* dbus/dbus-transport.c: (_dbus_transport_open):
ifdef out the calls to the debug transport and server.
/external/dbus/dbus/dbus-transport.c
6fc53eb13073722f6f44d0af869c7ff1eb3f206e 31-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-server.c (dbus_server_listen): @todo about how we need
a better way to report errors here. e.g. "unix address lacks
path" or something. also "no such file" when the path doesn't
exist, etc.

* dbus/dbus-address.c (dbus_address_entries_free): add @todo about
leaking list nodes
(dbus_parse_address): add @todo about documenting address format,
and allowing , and ; to be escaped
/external/dbus/dbus/dbus-transport.c
5ebb5748c2a7587c734eeed9c66f2a1fc0635d09 30-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-30 Anders Carlsson <andersca@codefactory.se>

* dbus/Makefile.am:
Add dbus-address.[ch]

* dbus/dbus-address.c: (dbus_address_entry_free),
(dbus_address_entries_free), (create_entry),
(dbus_address_entry_get_method), (dbus_address_entry_get_value),
(dbus_parse_address), (_dbus_address_test):
* dbus/dbus-address.h:
New files for dealing with address parsing.

* dbus/dbus-connection.c:
Document timeout functions.

* dbus/dbus-message.c:
Document dbus_message_new_from_message.

* dbus/dbus-server-debug.c:
Document.

* dbus/dbus-server.c: (dbus_server_listen):
Parse address and use correct server implementation.

* dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
* dbus/dbus-string.h:
New function with test.

* dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
* dbus/dbus-test.h:
Add address tests.

* dbus/dbus-transport-debug.c:
Document.

* dbus/dbus-transport.c: (_dbus_transport_open):
Parse address and use correct transport implementation.
/external/dbus/dbus/dbus-transport.c
dec1fa3bd5f106ba5b2c749372231e3dd4bf9e7b 28-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-28 Anders Carlsson <set EMAIL_ADDRESS environment variable>

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_add_timeout),
(_dbus_connection_remove_timeout):
Add functions for adding and removing timeouts.

* dbus/dbus-message.c: (dbus_message_new_from_message):
Add new function that takes a message and creates an exact
copy of it, but with the refcount set to 1.
(check_message_handling):
Fix build error.

* dbus/dbus-server-protected.h:
* dbus/dbus-server.c: (_dbus_server_init_base),
(_dbus_server_finalize_base), (_dbus_server_add_timeout),
(dbus_server_set_timeout_functions):
(_dbus_server_remove_timeout):
New functions so that a server can add and remove timeouts.

(dbus_server_listen):
Add commented out call to dbus_server_debug_new.

* dbus/dbus-timeout.c: (_dbus_timeout_new):
Actually set the handler, doh.

* dbus/dbus-transport.c: (_dbus_transport_open):
Add commented out call to dbus_transport_debug_client_new.

* dbus/Makefile.am:
Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
/external/dbus/dbus/dbus-transport.c
502fbda2201a4e7e50d687f42af29c82e66299bb 19-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c (unix_do_iteration): only do the
reading/writing if read_watch != NULL or write_watch != NULL.

* dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
the message loader code to actually load message->header and
message->body into the newly-created message.

* dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
in OOM case

* dbus/dbus-connection.c (dbus_connection_set_max_message_size)
(dbus_connection_get_max_message_size)
(dbus_connection_set_max_live_messages_size)
(dbus_connection_get_max_live_messages_size): implement some
resource limitation functions

* dbus/dbus-resources.c: new file implementing some of the
resource limits stuff

* dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
missing docs, add @todo to handle OOM etc.

* dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
docs
/external/dbus/dbus/dbus-transport.c
0363701c341796278041fb9ea7de80eaaf41479a 18-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_unref): disconnect the
connection if it hasn't been already.

* dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
replace with DisconnectFunction.
/external/dbus/dbus/dbus-transport.c
01af5ff4101e540a6456bca01d56272e701bea78 04-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-04 Havoc Pennington <hp@pobox.com>

* test/watch.c (error_handler): make it safe if the error handler
is called multiple times (if we s/error handler/disconnect
handler/ we should just guarantee it's called only once)

* dbus/dbus-transport.c (_dbus_transport_disconnect): call the
error handler on disconnect (it's quite possible we should
just change the error handler to a "disconnect handler," I'm
not sure we have any other meaningful errors)

* configure.in: check for getpwnam_r

* dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
mechanism as in SASL spec, using socket credentials

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
(_dbus_send_credentials_unix_socket): new function

* dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
dbus_accept()
(_dbus_write): only check errno if <0 returned
(_dbus_write_two): ditto
/external/dbus/dbus/dbus-transport.c
ff5283ab92c668453fd2f28c1715a1e0e9b949f5 27-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
doh

* dbus/dbus-marshal.c: Add macros to do int swapping in-place and
avoid swap_bytes() overhead (ignoring possible assembly stuff for
now). Main point is because I wanted unpack_uint32 to implement
_dbus_verbose_bytes
(_dbus_verbose_bytes): new function

* dbus/dbus-string.c (_dbus_string_validate_ascii): new function

* dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
mechanism to handle a corrupt message stream
(_dbus_message_loader_new): fix preallocation to only prealloc,
not prelengthen

* dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
(_dbus_string_test): enhance tests for copy/move and fix the
functions

* dbus/dbus-transport-unix.c: Hold references in more places to
avoid reentrancy problems

* dbus/dbus-transport.c: ditto

* dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
leak reference count in no-message case

* test/watch.c (do_mainloop): handle adding/removing watches
during iteration over the watches. Also, ref the connection/server
stored on a watch, so we don't try to mangle a destroyed one.

* dbus/dbus-transport-unix.c (do_authentication): perform
authentication

* dbus/dbus-auth.c (get_state): add a state
AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
(_dbus_auth_get_unused_bytes): append the unused bytes
to the passed in string, rather than prepend

* dbus/dbus-transport.c (_dbus_transport_init_base): create
the auth conversation DBusAuth

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
(_dbus_transport_new_for_domain_socket): when creating a
transport, pass in whether it's a client-side or server-side
transport so we know which DBusAuth to create
/external/dbus/dbus/dbus-transport.c
d4b870e7f91b7018524f7b85dc00b90cc64453bf 12-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-11 Havoc Pennington <hp@pobox.com>

* dbus/dbus-types.h: add dbus_unichar

* dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv

* dbus/dbus-connection.c (dbus_connection_send_message): return
TRUE on success

* dbus/dbus-transport.c: include dbus-watch.h

* dbus/dbus-connection.c: include dbus-message-internal.h

* HACKING: add file with coding guidelines stuff.

* dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
handling here, for security purposes (as in vsftpd). Not actually
using this class yet.

* dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
system/libc usage here, as in vsftpd, for ease of auditing (and
should also simplify portability). Haven't actually moved all the
system/libc usage into here yet.
/external/dbus/dbus/dbus-transport.c
041b0767b284034aee09e9a0de2a3844b8cc546a 25-Nov-2002 Havoc Pennington <hp@redhat.com> 2002-11-24 Havoc Pennington <hp@pobox.com>

* test/echo-client.c, test/echo-server.c: cheesy test
clients.

* configure.in (AC_CHECK_FUNCS): check for writev

* dbus/dbus-message.c (_dbus_message_get_network_data): new
function

* dbus/dbus-list.c (_dbus_list_foreach): new function

* dbus/dbus-internals.c (_dbus_verbose): new function

* dbus/dbus-server.c, dbus/dbus-server.h: public object
representing a server that listens for connections.

* dbus/.cvsignore: create

* dbus/dbus-errors.h, dbus/dbus-errors.c:
public API for reporting errors

* dbus/dbus-connection.h, dbus/dbus-connection.c:
public object representing a connection that
sends/receives messages. (Same object used for
both client and server.)

* dbus/dbus-transport.h, dbus/dbus-transport.c:
Basic abstraction for different kinds of stream
that we might read/write messages from.
/external/dbus/dbus/dbus-transport.c