Commit graph

1884 commits

Author SHA1 Message Date
Lawrence R. Steeger
fc08b432a3 Bug 15412: Add --address option to dbus-send
Signed-off-by: Colin Walters <walters@verbum.org>
2009-01-06 18:20:28 -05:00
Matt McCutchen
6663d1dd35 Bug 18446: Keep umask for session bus
Signed-off-by: Colin Walters <walters@verbum.org>
2009-01-06 18:20:13 -05:00
Diego E. 'Flameeyes' Pettenò
9928648f16 Fix cross-compiling with autotools.
The AC_CANONICAL_TARGET macro and the $target_os variables are used for the
target of compilers and other code-generation tools, and should not be used
during cross-compile of generic software. Replace them with
AC_CANONICAL_HOST and $host_os instead, as they should have been from the
start.

For a breakdown of what host, build and target machines are, please see
http://blog.flameeyes.eu/s/canonical-target .
2009-01-06 17:43:42 -05:00
Peter Breitenlohner
eebad8668d Avoid possible use of uninitialized variable
Signed-off-by: Colin Walters <walters@verbum.org>
2009-01-06 17:43:32 -05:00
Colin Walters
6413acafef Enable -Werror by default with --enable-maintainer-mode, and change warnings
Important compiler warnings were being lost in the noise from warnings
we know about but aren't problems, and moreover made using -Werror
difficult.  Now we expect *all* developers and testers to be using
-Werror.
2009-01-06 17:43:18 -05:00
Colin Walters
4e4f0de8cc Various compiler warning fixes 2009-01-06 17:38:32 -05:00
Colin Walters
eb1ba381f6 Bump for unstable cycle 2008-12-19 15:17:49 -05:00
Colin Walters
427a7be51f Release 1.2.10 2008-12-19 15:17:24 -05:00
Colin Walters
788e592b32 Add requested_reply to send denials, and connection loginfo to "would deny"
The requested_reply field is necessary in send denials too because
it's used in the policy language.  The connection loginfo lack in
"would deny" was just an oversight.
2008-12-18 15:39:18 -05:00
Colin Walters
9a1657e8e1 Add uid, pid, and command to security logs
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.
2008-12-18 15:39:04 -05:00
Colin Walters
c224ba1861 Merge commit '3d6abf64d0abb2718e082e120f14f8f923a4af59' into dbus-1.2 2008-12-16 12:29:04 -05:00
Colin Walters
427ff01f9d Add optional logging on allow rules
This lets us have a backwards compatibility allow rule but still easily
see when that rule is being used.
2008-12-16 12:20:43 -05:00
Colin Walters
8cbe86da90 Add message type to security syslog entries
It's part of the security check, we should have it in the log.
2008-12-12 17:07:01 -05:00
Colin Walters
69ed32cbcc Add syslog of security denials and configuration file reloads
We need to start logging denials so that they become more easily trackable
and debuggable.
2008-12-12 15:18:12 -05:00
Colin Walters
3d6abf64d0 Clean up and clarify default system policy
The former was too reliant on old bugs and was generally unclear.
This one makes explicit exactly what is allowed and not.
2008-12-12 14:50:21 -05:00
Colin Walters
8a80392667 Bump version for unstable cycle 2008-12-09 10:47:25 -05:00
Colin Walters
5301d31f45 Release 1.2.8 2008-12-09 10:46:41 -05:00
Colin Walters
df09db0d42 Another manpage update explicitly mentioning bare send_interface
We need to fix all of the bare send_interface rules; see:
https://bugs.freedesktop.org/show_bug.cgi?id=18961
2008-12-09 10:19:16 -05:00
Colin Walters
120604d272 Add at_console docs to manpage, as well as brief <policy> foreward
We need some sort of general advice here.
2008-12-09 10:19:01 -05:00
Colin Walters
d899734475 Bug 18229: Allow signals
Our previous fix went too far towards lockdown; many things rely
on signals to work, and there's no really good reason to restrict
which signals can be emitted on the bus because we can't tie
them to a particular sender.
2008-12-09 10:17:36 -05:00
Colin Walters
5cd3e9ca3f Release 1.2.6 2008-12-05 11:53:14 -05:00
Tomas Hoger
8fad15265f Bug 18229 - Change system.conf to correctly deny non-reply sends by default
The previous rule <allow send_requested_reply="true"/> was actually
applied to all messages, even if they weren't a reply.  This meant
that in fact the default DBus policy was effectively allow, rather
than deny as claimed.

This fix ensures that the above rule only applies to actual reply
messages.
Signed-off-by: Colin Walters <walters@verbum.org>
2008-12-05 11:39:43 -05:00
Colin Walters
c5526c18ad Infrastructure for testing a "system like" bus in test suite
The tmp-session-like-system.conf bus configuration has a security
policy intended to mirror that of the system bus.  This allows
testing policy rules.
2008-12-05 11:39:36 -05:00
Colin Walters
42d278a267 Bump configure again for git 2008-10-06 18:10:55 -04:00
Colin Walters
15c32cf401 Release 1.2.4 2008-10-06 18:09:51 -04:00
Peter McCurdy
033b67aff0 2008-08-24 Peter McCurdy <pmccurdy@skeptopotamus>
* 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>
2008-10-01 15:01:07 -04:00
Peter McCurdy
c3fe204d31 Bug 17280: Add a prototype for _dbus_credentials_add_adt_audit_data()
* dbus/dbus-credentials.h: Add a prototype for
	_dbus_credentials_add_adt_audit_data()

Signed-off-by: Colin Walters <walters@verbum.org>
2008-10-01 15:00:57 -04:00
Colin Walters
f2922ce4bc Bug 17803: Panic from dbus_signature_validate
* dbus/dbus-marshal-validate.c: Ensure we validate
	a basic type before calling is_basic on it.
	* dbus-marshal-validate-util.c: Test.
2008-10-01 15:00:39 -04:00
Joe Marcus Clarke
008bca5a4e Bug 17061: Handle error return from sysconf correctly
* 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>
2008-10-01 15:00:29 -04:00
Jens Granseuer
e8ea01bd07 Bug 13387: Fix compilation failure with AI_ADDRCONFIG
Signed-off-by: Colin Walters <walters@verbum.org>
2008-10-01 15:00:10 -04:00
Artem Bityutskiy
6531968a0b Bug 17352: synchronize the file before renaming
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>
2008-10-01 14:59:51 -04:00
Colin Walters
4fb1600945 Correctly dist 1.2.3 tarball with docs enabled 2008-08-06 15:58:41 -04:00
Colin Walters
78e3685c41 Bump configure.ac to 1.2.2 2008-08-06 13:21:54 -04:00
Colin Walters
dd6de35b4e Bug 15646: Remove spurious debugging fprintf(stderr 2008-07-28 16:31:09 -04:00
Marc Brockschmidt
9d51f086b0 Bug 16727: Handle ERANGE for getgr; fixes user in many groups
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.
2008-07-28 16:14:18 -04:00
Colin Walters
121c6b13a3 Bug 16294: Don't lose inotify watch when config fails to parse
* bus/dir-watch-inotify.c: Always drop the watch in
	handle_inotify_watch; this ensures we always readd it
	correctly in bus_drop_all_directory_watches.
2008-07-28 12:02:56 -04:00
Colin Walters
892c0a0053 Bug 16838: Use bash instead of sh to avoid breaking on Ubuntu 2008-07-24 16:37:25 -04:00
Colin Walters
d86df0220e Merge branch 'master' of ssh://walters@git.freedesktop.org/git/dbus/dbus 2008-07-24 16:19:34 -04:00
Scott James Remnant
4cbc30465e Bug 16839: Fix bus names in test case so it actually works.
* test/name-test/test-privserver.c (filter_session_message, main),
* test/name-test/test-privserver-client.c (open_shutdown_private_connection):
 Replace TestServer with PrivServer to match the service definition files.
2008-07-24 16:19:14 -04:00
Ray Strode
3bc6840b04 Fix leaks in bus_activation_get_environment error paths
Commit 91306ef938 introduced
two memory leaks on OOM error paths.  In one case the
environment string array wasn't getting freed, and in the
other case it was getting freed with dbus_free instead of
dbus_free_string_array.
2008-07-15 04:01:49 -04:00
Ray Strode
01e50bcd5d Update man page to make the point of the <type> element more clear
There have been a number of patches in the past try to key system
versus session bus policy off of the message bus type, when the
policy should be distinguished from more fine-grained options in the
individulal policy files.  Hopefully, this man page update will make
that more clear.
2008-07-12 13:38:04 -04:00
Ray Strode
37853b6dd0 Add new UpdateActivationEnvironment bus message
It adjusts the environment of activated bus clients.
This is important for session managers that get started
after the session bus daemon and want to influence the
environment of desktop services that are started by the
bus.
2008-07-12 13:38:00 -04:00
Ray Strode
91306ef938 Store what environment to activate with on activation object
We now keep the environment in a hash table member of the
activation object and provide a method
bus_activation_set_environment_variable to modify the
hash table.  This hash table is seeded initially with the
environment of the bus daemon itself.
2008-07-12 13:21:23 -04:00
Ray Strode
8ec1604192 When spawning processes, don't ignore the passed in environment
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.
2008-07-12 00:32:24 -04:00
Ray Strode
0e3ec9cec0 Add new function _dbus_string_split_on_byte
It allows you to turn a string like KEY=VALUE
into two strings key and value.
2008-07-11 23:58:59 -04:00
Ray Strode
417c41f6c1 Add new _dbus_get_environment call
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.
2008-07-11 23:58:53 -04:00
Thiago Macieira
458c6ead85 Merge branch 'dbus-1.2' 2008-06-07 17:48:04 +02:00
Oswald Buddenhagen
d7bb3cf8df Fix inverted return value from dbus_connection_read_write()
* 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>
2008-06-07 17:45:08 +02:00
Colin Walters
ab1eb1fd5a 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.
2008-06-05 17:24:34 -04:00
Colin Walters
81c32a5257 Tweak HACKING to describe test/name-test briefly
* HACKING: Describe test/name-test.
2008-05-30 21:05:48 -04:00