| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
If we can use MSG_NOSIGNAL we don't have to play games with SIGPIPE
|
|
|
|
|
|
|
|
|
| |
On Linux send()/sendmsg() know the special flag MSG_NOSIGNAL which if
set makes sure that no SIGPIPE signal is raised when we write to a
socket that has been disconnected.
By using this flag we don't have to play games with SIGPIPE which is
pretty ugly stuff since it touches the global process context.
|
|
|
|
|
| |
Due to some unknown reasons the dbus_new() macros had a semicolon at the
end which makes it impossible to use them in some situations.
|
|
|
|
|
|
|
|
|
| |
These header files include config.h explicitly anyway. These checks are
hence pointless.
Of course one could argue that including config.h from header files
sucks, but D-Bus generally seems not to have a problem with that, so
let's unify this.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bus/bus.c
bus/config-parser-common.c
bus/config-parser-common.h
bus/config-parser.c
bus/connection.c
bus/dbus-daemon.1.in
dbus/dbus-marshal-validate-util.c
dbus/dbus-marshal-validate.c
dbus/dbus-sysdeps-util-unix.c
test/name-test/tmp-session-like-system.conf
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-marshal-validate.c: If an array is fixed size,
skip validation
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| | |
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Extend the current security logs with even more relevant
information than just the message content. This requires
some utility code to look up and cache (as a string)
the data such as the uid/pid/command when a connection is
authenticated.
|
| |
| |
| |
| |
| | |
We need to start logging denials so that they become more easily trackable
and debuggable.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-marshal-recursive.c: A stray comma
between two string literals caused incorrect
output and a compiler warning.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-credentials.h: Add a prototype for
_dbus_credentials_add_adt_audit_data()
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| | |
* dbus/dbus-marshal-validate.c: Ensure we validate
a basic type before calling is_basic on it.
* dbus-marshal-validate-util.c: Test.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-sysdeps-unix.c:
* dbus/dbus-sysdeps-util-unix.c: Cast return
from sysconf temporarily so we actually see
-1.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| | |
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dbus is doing atomic file updates by copying them, changing
the copy, and re-naming them. However, it does not synchronize
the file before re-naming, which results in corruption in
case of unclean reboots. The reason for this is that file-systems
have write-back cache and they postpone writing data to the media.
This patch adds the missed fsync() for the Unix part. I do
not have windows so cannot provide a windows port fix.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| | |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
| |
| |
| |
| | |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some projects want to reuse the DBus message format, without
actually going through a DBusConnection. This set of changes
makes a few functions from DBusMessage public, and adds a new
function to determine the number of bytes needed to demarshal
a message.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous commit had errors in both the test case and
the validation logic. The test case was missing a trailing
comma before the previous one, so we weren't testing the
signature we thought we were.
The validation logic was wrong because if the type was not valid,
we'd drop through the entire if clause, and thus skip returning
an error code, and accept the signature.
|
| |
| |
| |
| |
| |
| |
| | |
We were incorrectly converting the serial to a signed integer
and comparing it to -1.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't safely type-pun from e.g. char * to DBusBasicValue *, because
the latter has higher alignment requirements. Instead, create an
explicit pointer for each case.
Also, we mark each one volatile to sidestep strict aliasing issues, for
the future when we turn on strict aliasing support.
Original patch and review from Jay Estabrook <jay.estabrook@hp.com>.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Extend the current security logs with even more relevant
information than just the message content. This requires
some utility code to look up and cache (as a string)
the data such as the uid/pid/command when a connection is
authenticated.
|
| |
| |
| |
| |
| | |
We need to start logging denials so that they become more easily trackable
and debuggable.
|
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-marshal-validate.c: If an array is fixed size,
skip validation
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| | |
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| | |
* dbus/dbus-marshal-validate.c: Ensure we validate
a basic type before calling is_basic on it.
* dbus-marshal-validate-util.c: Test.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-sysdeps-unix.c: Save errno across cleanup
and use it for errors to ensure we display the right
error message.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-sysdeps-unix.c:
* dbus/dbus-sysdeps-util-unix.c: Cast return
from sysconf temporarily so we actually see
-1.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dbus is doing atomic file updates by copying them, changing
the copy, and re-naming them. However, it does not synchronize
the file before re-naming, which results in corruption in
case of unclean reboots. The reason for this is that file-systems
have write-back cache and they postpone writing data to the media.
This patch adds the missed fsync() for the Unix part. I do
not have windows so cannot provide a windows port fix.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-credentials.h: Add a prototype for
_dbus_credentials_add_adt_audit_data()
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-marshal-recursive.c: A stray comma
between two string literals caused incorrect
output and a compiler warning.
Signed-off-by: Colin Walters <walters@verbum.org>
|
|/
|
|
| |
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Patch originally from Noèl Köthe.
Modified by Colin Walters <walters@verbum.org>
* dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-unix-utils.c:
Use a while() loop to reallocate buffer if we get ERANGE
return. This fixes the case where a user is in a large
number of groups.
|
|
|
|
|
|
|
|
| |
Previously, we'd always call execv() and unconditionally use
the environment of the parent. Now we call execve() with the
passed in environment. For compatibility, we detect if
the passed in environment is NULL and for that case, use the
environment from the parent instead.
|
|
|
|
|
| |
It allows you to turn a string like KEY=VALUE
into two strings key and value.
|
|
|
|
|
|
|
|
| |
It's a wrapper around the environ external variable.
It will be important in the future when we allow
bus clients to modify the environment of future
activated clients. Presently, we just always use the
bus daemon environment wholesale.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-connection.c (_dbus_connection_read_write_dispatch):
The double negation re no_progress_possible was obviously too
confusing: the path for dispatch = FALSE would return an inverted
status. So make it progress_possible and fix the logic.
Signed-off-by: Thiago Macieira <thiago@kde.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-connection.c (_dbus_connection_read_write_dispatch):
Reference the D-Bus connection during the function call since we
call other functions that may free the last reference and we
still expect to be able to check the connection after they return
to decide our own return value.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-connection.c (connection_forget_shared_unlocked):
Remove shared connections which lack a GUID from the list that
caches those, otherwise references to them will remain after
they have been freed.
* test/name-test/test-privserver-client.c: Update test to
try GUID-less connections too.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* dbus/dbus-bus.c (addresses_shutdown_func): Reset initialized back
to FALSE after cleaning up the address list so that it will be
reinitialized again if D-Bus is used after dbus_shutdown()
* test/name-test/test-privserver-client.c: Uncomment part of
test which should now pass.
|