History log of /external/dbus/dbus/dbus-auth.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4299eb3c0907100fe95d2986984b48d40cc52841 08-Jul-2015 Daniel Erat <derat@google.com> Incorporate upstream changes to v1.6.8.

Squash upstream commits up to and including the v1.6.8
release (upstream commit 1cad15cc).

This repository's changes from upstream are now limited to:

- addition of Android.mk, CleanSpec.mk, config.h, and NOTICE
files
- addition of dbus/dbus-arch-deps.h and removal from
dbus/.gitignore (ebae2d21, f022f55d)
- WANT_PIDFILE #ifdefs added to bus/bus.c to disable writing
dbus-daemon's PID to a file (3100d06a)
- TRACE_LOCKS set to 0 in dbus/dbus-connection.c (88a0ffe5)
- DBUS_ANDROID_LOG added to dbus/dbus-internals.c to use
logcat (7de15def)
- ANDROID_MANAGED_SOCKET added to dbus/dbus-sysdeps-unix.c
to use an SELinux-managed socket rather than a
dbus-daemon-created Unix domain socket (3100d06a)

Bug: 22328216
Change-Id: I793ebdf963d9b0740f0da28f1de593d088f08406
/external/dbus/dbus/dbus-auth.c
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-auth.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-auth.c
492e0ae06a000469ff04ebc567ad7039f7d173e5 07-Dec-2009 Ralf Habacker <ralf.habacker@freenet.de> fixed cmake version macro and string handling
/external/dbus/dbus/dbus-auth.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-auth.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-auth.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-auth.c
7ef60319c7d7c296f555e034b007c2729fd25853 15-Jan-2008 John (J5) Palmieri <johnp@redhat.com> handle SASL EXTERNAL's inital empty responce (FDO Bug #9945)

2008-01-15 John (J5) Palmieri <johnp@redhat.com>

* patch by Magnus Henoch <henoch plus bfdo at dtek dot chalmers dot se>

* dbus/dbus-auth.c (handle_server_data_external_mech): handle SASL
EXTERNAL's inital empty responce (FDO Bug #9945)
/external/dbus/dbus/dbus-auth.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-auth.c
e7c0d217795f4e8eb618f82b9b3e52807436c8f1 14-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps-unix.c (_dbus_credentials_parse_and_add_user):
delete this function since it was effectively the same as
_dbus_credentials_add_from_username()
/external/dbus/dbus/dbus-auth.c
48c6f1472dc315c9572cb1aebf8c7b68a66f5bef 14-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-auth.c: adapt to keyring changes

* dbus/dbus-keyring.c: change to avoid using user ID and home
directory directly; instead use a
keyring-location-from-credentials function in dbus-sysdeps

* fix to use _dbus_append_user_from_current_process() instead of
_dbus_username_from_current_process() or _dbus_append_desired_identity().
/external/dbus/dbus/dbus-auth.c
323790705782bee0d54ea9a342718a49b4ee5be6 14-Jun-2007 Ralf Habacker <ralf.habacker@freenet.de> * reverted global rename of function _dbus_username_from_current_process.
It needs to much tests to verify that the change does not break anything. I had overseen that the signatures are different (** to *) which requires non trivial changes. This is one *major* disadvantage of elumating oop functionality with c. You are responsible for cleaning every object on every function return point, which could be a nightmare if you are not working with dbus all the days.
/external/dbus/dbus/dbus-auth.c
ab4ce38906a6ac696d2c673025ec1a2d1e302b6f 14-Jun-2007 Ralf Habacker <ralf.habacker@freenet.de> * dbus/dbus-auth.c (handle_client_initial_response_cookie_sha1_mech): fixed usage of _dbus_append_desired_identity()
* dbus/dbus-sysdeps.h (_dbus_username_from_current_process): removed prototype
/external/dbus/dbus/dbus-auth.c
eacd8a9ed70050544010064aad33f55c777d7d66 14-Jun-2007 Ralf Habacker <ralf.habacker@freenet.de> * global rename of function dbus_username_from_current_process to _dbus_append_desired_identity
/external/dbus/dbus/dbus-auth.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-auth.c
a789b7b38cb4f4540a41444cbd64bf7ada2d60d2 10-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-string.c (_dbus_string_pop_line): fix this not to
think an empty line is the end of the file.
Also, fix some whitespace.

* dbus/dbus-string-util.c: add more tests for
_dbus_string_pop_line() revealing that it thinks an empty line is
the end of the file, which broke dbus-auth-script.c so
it didn't really run the scripts

* dbus/dbus-auth.c: add ANONYMOUS mechanism

* dbus/dbus-auth-script.c (_dbus_auth_script_run): fix to detect
an empty/no-op auth script; add commands to check that we have or
don't have the expected credentials
/external/dbus/dbus/dbus-auth.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-auth.c
88f69757b93c7112447b97868c7dbde69dc00caa 06-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * doc/TODO, various source files: Audited todo's and FIXME's and
prepended the ones we should be looking at with 1.0. Those
prepended with 1.0? need clerification or might not be needed
for 1.0
/external/dbus/dbus/dbus-auth.c
0ca96ec548a6e4a1e39429f3c0480adfe7e2eab8 30-Nov-2005 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
test/test-segfault.c, test/test-utils.c,
test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
Various cleanup of dead code and compiler warnings (patch from
Kjartan Maraas <kmaraas at gnome.org>)
/external/dbus/dbus/dbus-auth.c
52c7e25e50028684dc4577f2c54d176ca91f18b4 25-Oct-2005 Ross Burton <ross@openedhand.com> Add const keywords
/external/dbus/dbus/dbus-auth.c
5e8110d79aa8c11ad76b3e77791e3e6daca0fa32 11-Sep-2005 Mark McLoughlin <mark@skynet.ie> 2005-09-11 Mark McLoughlin <mark@skynet.ie>

* test/data/auth/fallback.auth-script: we don't
retry the EXTERNAL method when we know its going
to fail anymore.

2005-09-11 Mark McLoughlin <mark@skynet.ie>

* dbus/dbus-connection-internal.h: rename
(add|remove|toggle)_(watch|timeout) to unlocked()

* dbus/dbus-connection.c: ditto.

* dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
Update some callers for the renaming.

2005-09-10 Mark McLoughlin <mark@skynet.ie>

* dbus/dbus-auth.c: (record_mechanisms): don't
retry the first auth mechanism because we know
we're just going to get rejected again.

* dbus/dbus-keyring.c: (_dbus_keyring_reload):
Fix thinko ... and what a nasty little bugger to
track down you were ...

* dbus/dbus-connection.c:
(_dbus_connection_add_watch),
(_dbus_connection_remove_watch): add note about
these needing the connection to be locked.
(_dbus_connection_get_dispatch_status_unlocked):
set status to DATA_REMAINS when we queue the
disconnected message.

* bus/dispatch.c:
(bus_dispatch): fix warning.
(check_existent_service_no_auto_start):
Expect ChildSignaled error too.
(check_existent_hello_from_self): fix another
couple of warnings.
/external/dbus/dbus/dbus-auth.c
c76d24b0072dbe707889bae403668dde0fcd8f9f 01-Aug-2005 Havoc Pennington <hp@redhat.com> some docs cleanups
/external/dbus/dbus/dbus-auth.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-auth.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-auth.c
bf75b24d26fdc9deb856bac1918fa4853c594b03 07-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-07 Havoc Pennington <hp@redhat.com>

* doc/dbus-specification.xml: some more language cleanups; add
stuff about how to deal with invalid protocol and extension
points; add _ to allowed chars in auth commands; add EXTENSION_
auth command prefix
/external/dbus/dbus/dbus-auth.c
7bf62e31a3c820852271768fafc04ba95c31a19f 17-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

This is about it on what can be disabled/deleted from libdbus
easily, back below 150K anyhow. Deeper cuts are more work than
just turning the code off as I've done here.

* dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
signed int convenience funcs

* dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
verbose mode

* dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
things out of libdbus

* dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same

* dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
tests-enabled-only, though it should probably be deleted)

* dbus/dbus-message-util.c: same stuff

* dbus/dbus-auth-util.c: same stuff
/external/dbus/dbus/dbus-auth.c
4c1a2a760b67b4600db3e5b9c2ad0056b5cf32b6 17-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-userdb-util.c: split out part of dbus-userdb.c

* dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
way for stripping down dbus-userdb.c stuff included in libdbus.
Rename _dbus_parse_uid for consistency.
/external/dbus/dbus/dbus-auth.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-auth.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-auth.c
961e6ca41c1e9433055130569ce3492866e2126b 20-Jun-2004 Havoc Pennington <hp@redhat.com> 2004-06-20 Havoc Pennington <hp@redhat.com>

* dbus/dbus-glib-error-enum.h: autogenerate the GError enum
codes from the dbus error names

* glib/dbus-glib.h: move to subdir dbus/ since it's included
as dbus/dbus-glib.h and that breakage is now visible due to
including dbus/dbus-glib.h in dbus-glib-lowlevel.h

* glib/dbus-glib.h: s/gproxy/g_proxy/

* dbus/dbus-shared.h: new header to hold stuff shared with
binding APIs

* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
than dbus-errors.h

* glib/dbus-glib.h (dbus_set_g_error): move to
dbus-glib-lowlevel.h

* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
of stuff to enable this

* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here

* a bunch of other changes with the same basic "separate glib
bindings from dbus.h" theme
/external/dbus/dbus/dbus-auth.c
63de4681299428db8be68bab64b969e0c1229273 02-Jun-2004 Kristian Høgsberg <krh@redhat.com> 2004-06-02 Kristian Høgsberg <krh@redhat.com>

* dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
machine approach. A state is implemented as a function that
handles incoming events as specified for that state.

* doc/dbus-specification.xml: Update auth protocol state machine
specification to match implementation. Remove some leftover
base64 examples.
/external/dbus/dbus/dbus-auth.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-auth.c
6527ee5134d8fef66549cdbb634a79b27aae90fc 18-May-2004 Kristian Høgsberg <krh@redhat.com> 2004-05-18 Kristian Høgsberg <krh@redhat.com>

* dbus/dbus-auth.c: Factor out protocol reply code into functions
send_auth(), send_data(), send_rejected(), send_error(),
send_ok(), send_begin() and send_cancel().
/external/dbus/dbus/dbus-auth.c
d86fc4071ccb8590d922e3456c5c80c0f7bb9d6f 18-May-2004 Kristian Høgsberg <krh@redhat.com> 2004-05-17 Kristian Høgsberg <krh@redhat.com>

Remove base64 encoding, replace with hex encoding. Original patch
from trow@ximian.com, added error handling.

* dbus/dbus-string.c (_dbus_string_base64_encode)
(_dbus_string_base64_decode): Remove.
(_dbus_string_hex_decode): Add end_return argument so we can
distinguish between OOM and invalid hex encoding.
(_dbus_string_test): Remove base64 tests and add test case for
invalid hex.

* dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
Replace base64 with hex.

* test/data/auth/invalid-hex-encoding.auth-script: New test case
for invalid hex encoded data in auth protocol.
/external/dbus/dbus/dbus-auth.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-auth.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-auth.c
46c072e1136ca101aefd5fdae35c457899d55bbb 25-Sep-2003 Mark McLoughlin <mark@skynet.ie> 2003-09-25 Mark McLoughlin <mark@skynet.ie>

* doc/dbus-specification.sgml: don't require header fields
to be 4-byte aligned and specify that fields should be
distinguished from padding by the fact that zero is not
a valid field name.

* doc/TODO: remove re-alignment item and add item to doc
the OBJECT_PATH type.

* dbus/dbus-message.c:
(HeaderField): rename the original member to value_offset
and introduce a name_offset member to keep track of where
the field actually begins.
(adjust_field_offsets): remove.
(append_int_field), (append_uint_field),
(append_string_field): don't align the start of the header
field to a 4-byte boundary.
(get_next_field): impl finding the next marhsalled field
after a given field.
(re_align_field_recurse): impl re-aligning a number of
already marshalled fields.
(delete_field): impl deleting a field of any type and
re-aligning any following fields.
(delete_int_or_uint_field), (delete_string_field): remove.
(set_int_field), (set_uint_field): no need to re-check
that we have the correct type for the field.
(set_string_field): ditto and impl re-aligning any
following fields.
(decode_header_data): update to take into account that
the fields aren't 4-byte aligned any more and the new
way to distinguish padding from header fields. Also,
don't exit when there is too much header padding.
(process_test_subdir): print the directory.
(_dbus_message_test): add test to make sure a following
field is re-aligned correctly after field deletion.

* dbus/dbus-string.[ch]:
(_dbus_string_insert_bytes): rename from insert_byte and
allow the insert of multiple bytes.
(_dbus_string_test): test inserting multiple bytes.

* dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
warning note to docs about having to re-align any
marshalled values following the string.

* dbus/dbus-message-builder.c:
(append_string_field), (_dbus_message_data_load):
don't align the header field.

* dbus/dbus-auth.c: (process_test_subdir): print the
directory.

* test/break-loader.c: (randomly_add_one_byte): upd. for
insert_byte change.

* test/data/invalid-messages/bad-header-field-alignment.message:
new test case.

* test/data/valid-messages/unknown-header-field.message: shove
a dict in the unknown field.
/external/dbus/dbus/dbus-auth.c
85ab0327d82e4945ad16630e583d8cc68df25a90 08-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-07 Havoc Pennington <hp@pobox.com>

* Make Doxygen contented.
/external/dbus/dbus/dbus-auth.c
fe195a911d86d0a71349988360de65cfac1b3f86 02-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
a message type enum to distinguish kinds of message
(DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
that need not be replied to

2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.c: adapt to DBusObjectID changes
(unpack_8_octets): fix no-64-bit-int bug

* dbus/dbus-object-registry.c (validate_id): validate the
connection ID bits, not just the instance ID.

* dbus/dbus-connection.c (_dbus_connection_init_id): initialize
the connection-global 33 bits of the object ID

* dbus/dbus-object-registry.c (info_from_entry): fill in
object ID in the new way

* dbus/dbus-objectid.h: rather than high/low bits, specifically
define server/client/instance bits.
/external/dbus/dbus/dbus-auth.c
ab10ae902d8aa7c2b98fd080a7458127b1b8e648 11-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-11 Havoc Pennington <hp@pobox.com>

Write a "test-profile" that does echo client-server with threads;
profile reveals lock contention, memcpy/realloc of buffers, and
UTF-8 validation as hot spots. 20% of lock contention eliminated
with dbus_atomic_inc/dec implementation on x86. Much remaining
contention is global mempool locks for GList and DBusList.

* dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
x86 implementation

* dbus/dbus-connection.c (struct DBusConnection): use
dbus_atomic_t for the reference count

* dbus/dbus-message.c (struct DBusMessage): declare
dbus_atomic_t values as volatile

* configure.in: code to detect ability to use atomic integer
operations in assembly, from GLib patch

* dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
time, tired of it being wrong in threads and forked processes

* glib/test-profile.c: a little program to bounce messages back
and forth between threads and eat CPU

* dbus/dbus-connection.c: add debug spew macros for debugging
thread locks; include config.h at top; fix deadlock in
dbus_connection_flush()
/external/dbus/dbus/dbus-auth.c
d3fb6f35716ff1d6f6644dea2043d539007811de 18-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-auth.c (record_mechanisms): memleak fixes

* dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
memleaks

* dbus/dbus-keyring.c (add_new_key): fix a memleak, and
on realloc be sure to update the pointer in the keyring

* dbus/dbus-string.c (_dbus_string_zero): compensate for align
offset to avoid writing to unallocated memory

* dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
try the next mechanism, so we properly handle OOM

* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
on OOM.
(_dbus_keyring_new): fix OOM bug
(_dbus_keyring_new_homedir): always set error; impose a maximum
number of keys we'll load from the file, mostly to speed up the
test suite and make its OOM checks more useful, but also for
general sanity.

* dbus/dbus-auth.c (process_error_server): reject authentication
if we get an error from the client
(process_cancel): on cancel, send REJECTED, per the spec
(process_error_client): send CANCEL if we get an error from the
server.
/external/dbus/dbus/dbus-auth.c
e0b284c7e38f0c002b2173d85ab89dc18700867c 18-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
debug spew

* dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
handling problem

* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
about DBUS_TEST_HOMEDIR once

* bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
the environment

* bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
config file so we test the right thing

Throughout: assorted docs improvements
/external/dbus/dbus/dbus-auth.c
88cd5da3c0ec86fed29942b062c2f7bf0f8fda44 18-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-17 Havoc Pennington <hp@redhat.com>

* dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
database usage so it all goes via the DBusUserDatabase cache.
/external/dbus/dbus/dbus-auth.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-auth.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-auth.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-auth.c
bf99381351b802fb3348a24037898222aae631e2 28-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-28 Havoc Pennington <hp@pobox.com>

* bus/test.c (bus_test_flush_bus): remove the sleep from here,
I think it may have just been superstition. Not sure.

* dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
failures that were not being handled.

* dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling

* dbus/dbus-memory.c: add ability to set number of mallocs in a
row that will fail on out-of-memory.

* dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
function for testing out-of-memory handling.

* bus/config-loader-expat.c (memsuite): don't wrap the dbus
allocation functions, they do map exactly to the expat ones.
/external/dbus/dbus/dbus-auth.c
f7c24715b5489b28b47499eb252b941b735fa1bc 17-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-17 Havoc Pennington <hp@pobox.com>

All tests pass, no memleaks, no valgrind complaints.

* bus/test.c: refcount handler_slot

* bus/connection.c (bus_connections_new): refcount
connection_data_slot

* dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
bytes so that auth scripts pass.

* bus/dispatch.c: init message_handler_slot so it gets allocated
properly

* bus/dispatch.c (message_handler_slot_ref): fix memleak

* dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
dealloc server_pipe_hash when no longer used for benefit of
leak checking

* dbus/dbus-auth.c (process_command): memleak fix

* bus/dispatch.c (check_hello_message): memleak fix
/external/dbus/dbus/dbus-auth.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-auth.c
ce173b29fc1e9432cb5956952afdbe775da12415 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

Oops - test code was only testing failure of around 30 of the
mallocs in the test path, but it turns out there are 500+
mallocs. I believe this was due to misguided linking setup such
that there was one copy of dbus_malloc etc. in the daemon and one
in the shared lib, and only daemon mallocs were tested. In any
case, the test case now tests all 500+ mallocs, and doesn't pass
yet, though there are lots of fixes in this patch.

* dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
this so that it doesn't need to allocate memory, since it
has no way of indicating failure due to OOM (and would be
annoying if it did).

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

* bus/Makefile.am: rearrange to create two self-contained
libraries, to avoid having libraries with overlapping symbols.
that was resulting in weirdness, e.g. I'm pretty sure there
were two copies of global static variables.

* dbus/dbus-internals.c: move the malloc debug stuff to
dbus-memory.c

* dbus/dbus-list.c (free_link): free list mempool if it becomes
empty.

* dbus/dbus-memory.c (_dbus_disable_mem_pools): new function

* dbus/dbus-address.c (dbus_parse_address): free list nodes
on failure.

* bus/dispatch.c (bus_dispatch_add_connection): free
message_handler_slot when no longer using it, so
memory leak checkers are happy for the test suite.

* dbus/dbus-server-debug-pipe.c (debug_finalize): free server name

* bus/bus.c (new_connection_callback): disconnect in here if
bus_connections_setup_connection fails.

* bus/connection.c (bus_connections_unref): fix to free the
connections
(bus_connections_setup_connection): if this fails, don't
disconnect the connection, just be sure there are no side
effects.

* dbus/dbus-string.c (undo_alignment): unbreak this

* dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
leaking
(_dbus_auth_new): fix the order in which we free strings
on OOM failure

* bus/connection.c (bus_connection_disconnected): fix to
not send ServiceDeleted multiple times in case of memory
allocation failure

* dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
get the base service name
(dbus_bus_register_client): don't return base service name,
instead store it on the DBusConnection and have an accessor
function for it.
(dbus_bus_register_client): rename dbus_bus_register()

* bus/dispatch.c (check_hello_message): verify that other
connections on the bus also got the correct results, not
just the one sending hello
/external/dbus/dbus/dbus-auth.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-auth.c
29560adcc79a259a0be3511c056ee7453aa26c04 13-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-12 Havoc Pennington <hp@redhat.com>

Mega-patch that gets the message bus daemon initially handling
out-of-memory. Work still needed. Also lots of random
moving stuff to DBusError instead of ResultCode.

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

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): use DBusError

* dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
DBusResultCode

* dbus/dbus-connection.c (dbus_connection_send): drop the result
code here, as the only failure possible is OOM.

* bus/connection.c (bus_connection_disconnect):
rename bus_connection_disconnected as it's a notification only

* bus/driver.c (bus_driver_handle_acquire_service): don't free
"name" on get_args failure, should be done by get_args;
don't disconnect client for bad args, just return an error.
(bus_driver_handle_service_exists): ditto

* bus/services.c (bus_services_list): NULL-terminate returned array

* bus/driver.c (bus_driver_send_service_lost)
(bus_driver_send_service_acquired): send messages from driver to a
specific client to the client's unique name, not to the broadcast
service.

* dbus/dbus-message.c (decode_header_data): reject messages that
contain no name field
(_dbus_message_get_client_serial): rename to
dbus_message_get_serial and make public
(_dbus_message_set_serial): rename from set_client_serial
(_dbus_message_set_reply_serial): make public
(_dbus_message_get_reply_serial): make public

* bus/connection.c (bus_connection_foreach): allow stopping
iteration by returning FALSE from foreach function.

* dbus/dbus-connection.c (dbus_connection_send_preallocated)
(dbus_connection_free_preallocated_send)
(dbus_connection_preallocate_send): new API for sending a message
without possibility of malloc failure.
(dbus_connection_send_message): rename to just
dbus_connection_send (and same for whole function family)

* dbus/dbus-errors.c (dbus_error_free): make this reinit the error

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

* bus/activation.c: handle/return errors

* dbus/dbus-errors.h: add more DBUS_ERROR #define

* dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
(_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
(_dbus_result_from_errno): move to this file
/external/dbus/dbus/dbus-auth.c
7e050c88719553d0c74e3dc68caf7bc50ae99590 05-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-04 Havoc Pennington <hp@pobox.com>

* test/data/auth/*: adapt to changes

* dbus/dbus-auth-script.c (_dbus_auth_script_run): add
USERID_BASE64 and change USERNAME_BASE64 to put in username not
userid

* dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
more stuff from being in a context name, to make the protocol
simpler to deal with

* dbus/dbus-errors.c (dbus_error_has_name): new function
(dbus_error_is_set): new function

* dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1

* dbus/dbus-connection.c (dbus_connection_flush): also read
messages during a flush operation

* dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
/external/dbus/dbus/dbus-auth.c
25d00e5badfe8a7822ce934f46f87b4b768f1011 05-Mar-2003 Anders Carlsson <andersca@codefactory.se> 2003-03-05 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
* dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
(_dbus_keyring_test):
* dbus/dbus-md5.c: (_dbus_md5_compute):
* dbus/dbus-sha.c: (_dbus_sha_compute):
Plug memory leaks.
/external/dbus/dbus/dbus-auth.c
9ada6e2cad0d623fb578f349790a0c62297d2394 18-Feb-2003 Joe Shaw <joeshaw@novell.com> 2003-02-18 Joe Shaw <joe@assbarn.com>

* dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
credentials from our currently running process.
(get_word): Fix a buglet where we were copying the entire length
instead of relative to our position.

* dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
keys on the stack... it's 640k of data.

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
read the credentials byte off the socket, even if we don't have
SO_PEERCRED.
(_dbus_poll): Implement poll() using select() for systems which
don't have it.

* glib/test-dbus-glib.c (main): Print out an error if no
parameters are given.

* test/data/auth/fallback.auth-script: Added. Tests that a client
can fallback to a secondary auth mechanism if the first fails.
/external/dbus/dbus/dbus-auth.c
bf07fc88a330061c59186bf4a11218b5d51aec6f 16-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-16 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-auth.c: (client_try_next_mechanism):
Plug a leak.

* dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
Return TRUE if there's no thread implementation around.

* glib/dbus-gmain.c: (free_source),
(dbus_connection_hookup_with_g_main):
Make sure to remove the GSource when the connection is finalized.
/external/dbus/dbus/dbus-auth.c
0362840f1d4648f240e211e12767ef6990ca2bb6 13-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-13 Havoc Pennington <hp@pobox.com>

* test/data/auth/fail-after-n-attempts.auth-script: new test

* dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
reject the client.
/external/dbus/dbus/dbus-auth.c
5970d04af540af4825958272cba950c0b7dff15d 13-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-auth.c (handle_server_data_external_mech): args to
dbus_credentials_match were backward

* dbus/dbus-auth-script.c (_dbus_auth_script_run): support
NO_CREDENTIALS and ROOT_CREDENTIALS

* dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
into here. Never process more commands after we've reached an
end state; store further data as unused bytes.

* test/data/auth/*: add more auth tests

* dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
command to match exact string and EXPECT_UNUSED to match unused
bytes

* test/Makefile.am (dist-hook): fix to dist all the test stuff
/external/dbus/dbus/dbus-auth.c
c9ea8fac502c6109713aa372c4c8cfafd0b86858 13-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-12 Havoc Pennington <hp@pobox.com>

* dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
\r off of popped lines

* dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
scripts

* dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
SEND, append \r\n
/external/dbus/dbus/dbus-auth.c
3791dcca16cb46b0ff7305beff75d1aa2645940c 13-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-10 Havoc Pennington <hp@pobox.com>

* dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
initial cut at test framework for DBusAuth from laptop.
Doesn't quite work yet but it compiles and I need to get
it off the 266mhz laptop. ;-)

* dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
fix a memleak in error case
/external/dbus/dbus/dbus-auth.c
a07bc460ae1a3d3582a6dac7e48ed1ea117990ef 05-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-02 Havoc Pennington <hp@pobox.com>

* dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
for code to manage cookies in your home directory

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

* dbus/dbus-auth.c (get_state): impose a maximum number of tries
to authenticate, then disconnect the client.
/external/dbus/dbus/dbus-auth.c
af4ef42fa5c2f51e2cac37e196f8f4426b2ba0db 31-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-auth.c: rework to use only REJECTED, no
MECHANISMS

* doc/dbus-sasl-profile.txt: drop MECHANISMS and just
use REJECTED, suggested by Mark McLoughlin
/external/dbus/dbus/dbus-auth.c
42788678e83ec1d82f048f86aff04017b58f072e 26-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-26 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
* dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
(dbus_connection_unref):
* dbus/dbus-marshal.c: (_dbus_marshal_test):
* dbus/dbus-message.c: (dbus_message_unref),
Plug memory leaks.

(dbus_message_get_fields):
Remove debugging printout.

(_dbus_message_loader_return_buffer):
Don't store the header string.

(_dbus_message_test):
Plug leaks.
/external/dbus/dbus/dbus-auth.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-auth.c
b3ef8b0e9bd2719d502c7f2e0cf829e151386162 27-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-auth.c: fixes fixes fixes

* dbus/dbus-transport-unix.c: wire up support for
encoding/decoding data on the wire

* dbus/dbus-auth.c (_dbus_auth_encode_data)
(_dbus_auth_decode_data): append to target string
instead of nuking it.
/external/dbus/dbus/dbus-auth.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-auth.c
2297787455989c9ec47ea899b2ad6f3f6ef72c05 25-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-25 Havoc Pennington <hp@pobox.com>

* doc/dbus-sasl-profile.txt: docs on the authentication protocol,
it is a simple protocol that just maps directly to SASL.

* dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
initial implementation, not actually used yet.

* dbus/dbus-string.c (_dbus_string_find): new function
(_dbus_string_equal): new function
(_dbus_string_base64_encode): new function
(_dbus_string_base64_decode): new function
/external/dbus/dbus/dbus-auth.c