| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c:
(dbus_connection_send_with_reply_and_block):
Decrease connection->n_incoming when removing an entry
from the list.
* dbus/dbus-dict.c: (dbus_dict_entry_free),
(dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
(dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
(dbus_dict_set_byte_array), (dbus_dict_set_string_array),
(dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
(dbus_dict_get_byte_array):
Handle NULL arrays and strings. Also add support for byte arrays.
* dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
(_dbus_marshal_dict), (_dbus_demarshal_byte_array),
(_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
(_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
(_dbus_demarshal_dict), (demarshal_and_validate_len),
(_dbus_marshal_validate_arg), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
Add support for marshalling and demarshalling empty arrays and strings.
* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_string_array),
(dbus_message_iter_get_boolean),
(dbus_message_iter_get_boolean_array),
(dbus_message_iter_get_int32_array),
(dbus_message_iter_get_uint32_array),
(dbus_message_iter_get_double_array),
(dbus_message_iter_get_byte_array),
(dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
(check_message_handling):
Add support for getting empty arrays and dicts.
* dbus/dbus-string.c: (_dbus_string_validate_utf8):
Don't do any validation at all for now, that's better than just checking
for ASCII.
* test/data/valid-messages/emptiness.message:
New test message with lots of empty arrays.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-marshal.c:
(_dbus_marshal_set_string):
Take a length argument so we can marshal the correct string
length.
(_dbus_marshal_dict), (_dbus_demarshal_dict),
(_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
(_dbus_marshal_test):
* dbus/dbus-marshal.h:
Add support for marshalling and demarshalling dicts.
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
Add support for TYPE DICT.
* dbus/dbus-message.c: (set_string_field):
Adjust header padding.
(dbus_message_append_args_valist), (dbus_message_append_dict),
(dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
(dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
(check_message_handling), (check_have_valid_message):
* dbus/dbus-message.h:
Add functions for setting and getting dicts.
* dbus/dbus-protocol.h:
Add DBUS_TYPE_DICT.
* dbus/dbus.h:
Add dbus-dict.h
* doc/dbus-specification.sgml:
Add information about how dicts are marshalled.
* test/data/invalid-messages/dict-with-nil-value.message:
* test/data/invalid-messages/too-short-dict.message:
* test/data/valid-messages/dict-simple.message:
* test/data/valid-messages/dict.message:
Add sample messages containing dicts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/break-loader.c (randomly_set_extreme_ints): add test that
sets really huge and small integers
* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
that length of boolean array fits in the string, and that
string has room for boolean value in single-bool case.
* dbus/dbus-message-builder.c (_dbus_message_data_load): add
optional value to "ALIGN" command which is what to fill the
alignment with.
* test/data/valid-messages/no-padding.message: add regression
test for the message padding problem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (dbus_message_append_boolean),
(dbus_message_append_boolean_array),
(dbus_message_get_args_valist), (_dbus_message_test):
* dbus/dbus-message.h:
* doc/dbus-specification.sgml:
Various fixes as pointed out by Havoc.
* test/data/invalid-messages/bad-boolean-array.message:
* test/data/invalid-messages/bad-boolean.message:
Add invalid boolean value test cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-internals.c: (_dbus_type_to_string):
* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_boolean), (dbus_message_append_boolean_array),
(dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
(dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
(dbus_message_iter_get_double),
(dbus_message_iter_get_boolean_array), (message_iter_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* doc/dbus-specification.sgml:
* test/data/valid-messages/lots-of-arguments.message:
Add support for boolean and boolean array types.
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_iter_get_string_array):
(dbus_message_iter_get_byte_array): Fix up doxygen warnings
* dbus/dbus-sha.c: add implementation of SHA-1 algorithm
* dbus/test/data/sha-1: add US government test suite for SHA-1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
Make string arrays NULL-terminated.
* dbus/dbus-memory.c: (dbus_free_string_array):
* dbus/dbus-memory.h:
New function for freeing NULL-terminated string arrays.
* dbus/dbus-message-builder.c: (append_quoted_string),
(_dbus_message_data_load):
Add support for array types.
* dbus/dbus-message.c: (check_message_handling):
Add more types as test cases.
* dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
(_dbus_string_parse_double):
Add the start offset to the end offset.
* test/data/valid-messages/lots-of-arguments.message:
New test message with lots of arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in:
Add check for nonposix getpwnam_r
* dbus/dbus-mempool.c: (_dbus_mem_pool_new):
Align the pool element size to a sizeof (void *) boundary.
* dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
(_dbus_listen_unix_socket), (_dbus_credentials_from_username):
General Solaris fixes.
* test/data/valid-messages/simplest-manual.message:
Explicitly state that we want little-endian packing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
allow people to avoid setting SIGPIPE to SIG_IGN
(_dbus_connection_new_for_transport): disable SIGPIPE unless
we've been asked not to
|
|
|
|
|
|
|
|
| |
* test/data/valid-messages/standard-acquire-service.message:
* test/data/valid-messages/standard-hello.message:
* test/data/valid-messages/standard-list-services.message:
* test/data/valid-messages/standard-service-exists.message:
Add some standard messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-address.c: (dbus_address_entry_free):
Free key and value lists.
* dbus/dbus-internals.c: (_dbus_type_to_string):
Add the types we didn't have.
* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
Add NIL types.
* dbus/dbus-message.c: (dbus_message_set_sender):
Remove todo about being able to set sender to NULL.
(dbus_message_set_is_error_reply),
(dbus_message_get_is_error_reply):
* dbus/dbus-message.h:
New functions.
* dbus/dbus-protocol.h:
Add error reply flag.
* test/data/valid-messages/opposite-endian.message:
Add NIL type to test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c: use message->byte_order instead of
DBUS_COMPILER_BYTE_ORDER throughout.
(dbus_message_create_header): pad header to align the
start of the body of the message to 8-byte boundary
* dbus/dbus-marshal.h: make all the demarshalers take const
DBusString arguments.
* dbus/dbus-message.c (_dbus_message_loader_return_buffer):
validate message args here, so we don't have to do slow validation
later, and so we catch bad messages as they are incoming. Also add
better checks on header_len and body_len. Also fill in
message->byte_order
* dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
implemented properly)
(_dbus_string_validate_nul): new function to check all-nul
* dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
get_arg_end_pos and remove all validation
(_dbus_marshal_validate_arg): actually do validation here.
|
|
|
|
|
| |
* dbus/dbus-message.c (check_message_handling): function to check
on the loaded message, iterates over it etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-mempool.c (time_for_size): replace printf with
_dbus_verbose
* dbus/dbus-message-builder.c (_dbus_message_data_load): allow
empty lines; fix the SAVE_LENGTH stuff to be
START_LENGTH/END_LENGTH so it actually works; couple other
bugfixes
* test/Makefile.am (dist-hook): add dist-hook for .message files
* dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
can be constant or locked.
(_dbus_string_free): allow freeing a const string as
documented/intended
* dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
* dbus/dbus-test-main.c (main): take an argument which is the
directory containing test data
* dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
argument to this and load all the messages in test/data/
checking that they can be loaded or not loaded as appropriate.
|
|
* dbus/dbus-message-builder.c: implement, completely untested.
* test/data/*: add data to be used in testing.
".message" files are our simple loadable text format.
".message-raw" will be binary dumps of messages.
* dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
|