Commit graph

104 commits

Author SHA1 Message Date
Colin Walters
90fe96b187 Fix inotify shutdown
We were incorrectly passing NULL for a DBusList when the usage expected
is a pointer to a NULL DBusList pointer.  Also during dbus_shutdown
we need to actually close the inotify fd, and remove our watch.

Move the shutdown handler out of bus.c and into inotify where we
can do all of this cleanly.
2010-02-02 15:04:45 -05:00
Colin Walters
8a9880ffd2 Clean up inotify watch handling
Substantially based on a patch by Matthias Clasen <mclasen@redhat.com>
kqueue implementation by Joe Marcus Clarke <marcus@freebsd.org>

Previously, when we detected a configuration change (which included
the set of config directories to monitor for changes), we would
simply drop all watches, then readd them.

The problem with this is that it introduced a race condition where
we might not be watching one of the config directories for changes.

Rather than dropping and readding, change the OS-dependent monitoring
API to simply take a new set of directories to monitor.  Implicit
in this is that the OS-specific layer needs to keep track of the
previously monitored set.
2010-02-01 16:22:56 -05:00
Colin Walters
b93476ce07 Don't drop pending activations when reloading configuration
The reload handling for activation simply dropped all knowledge
of pending activations, which was clearly wrong.  Refactor things
so that reload only reloads directories, server address etc.

Based on a patch originally from Matthias Clasen <mclasen@redhat.com>
2010-01-28 17:01:24 -05:00
Matthias Clasen
8343c971cd Bug 25697 - Fix memory leak in policy reload
Signed-off-by: Colin Walters <walters@verbum.org>
2009-12-18 14:29:40 -05:00
Tobias Mueller
dc33f4f774 Bug 21161 - Update the FSF address
No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 5baf2f856a)
2009-07-14 15:39:47 -04:00
James Carter
1f3bcd241e Initialize AVC earlier so we can look up service security contexts
* bus/bus.c: Initialize AVC earlier:
	http://lists.freedesktop.org/archives/dbus/2008-October/010493.html

Signed-off-by: Colin Walters <walters@verbum.org>
2009-01-06 18:22:39 -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
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
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
John (J5) Palmieri
4cc2bfa10e check failed allocation (FDO Bug #12920)
2008-01-15  John (J5) Palmieri  <johnp@redhat.com>

	* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>

	* bus/bus.c (setup_server): check failed allocation (FDO Bug #12920)
2008-01-15 15:49:35 -05:00
John (J5) Palmieri
9db435926f rewrite selinux error handling to not abort due to a NULL read
2008-01-15  John (J5) Palmieri  <johnp@redhat.com>

	* bus/bus.c (bus_context_check_security_policy): rewrite selinux error
	handling to not abort due to a NULL read and to set the error only if
	it is not already set (Based off of FDO Bug #12430)
2008-01-15 14:20:43 -05:00
Havoc Pennington
5340b8de0b audit_init() was not declared in header, causing warnings; fix this and namespace it
2007-10-23  Havoc Pennington  <hp@redhat.com>

	* bus/bus.c (bus_context_new): use the new name here

	* bus/selinux.c (bus_selinux_audit_init): rename from audit_init()
	to avoid possible libc conflict, and declare it in .h file to
	avoid a warning
2007-10-23 14:48:52 -04:00
Havoc Pennington
a8e32b6874 add HAVE_SELINUX around call to audit_init() so things build without selinux
2007-10-19  Havoc Pennington  <hp@redhat.com>

	* bus/bus.c (bus_context_new): put audit_init() in HAVE_SELINUX
2007-10-19 17:20:06 -04:00
Havoc Pennington
53f6713976 do not call audit_init() from bus/ directory from files in dbus/
2007-10-19  Havoc Pennington  <hp@redhat.com>

	* bus/bus.c (bus_context_new): put the audit_init() in here
	instead, which I believe ends up being the same as where it was
	before, though I'm not sure I understand why it goes here.

	* dbus/dbus-sysdeps-util-unix.c (_dbus_change_to_daemon_user):
	remove audit_init() from here, this file can't depend on code in
	bus/ directory
2007-10-19 15:05:27 -04:00
Havoc Pennington
163555c7ab 2007-08-17 Havoc Pennington <hp@redhat.com>
* tools/dbus-launch-x11.c (set_address_in_x11): fix from Michael
	Lorenz to use long not int with XChangeProperty format 32

	* dbus/dbus-sysdeps-util-unix.c
	(_dbus_write_pid_to_file_and_pipe): factor this out, and use the
	same code in _dbus_become_daemon (where the parent writes the pid
	file and to the pid pipe) and in bus_context_new (where the daemon
	writes its own pid file and to its own pid pipe)

	* bus/bus.c (bus_context_new): close the pid pipe after we print
	to it. Also, don't write the pid to the pipe twice when we fork,
	someone reported this bug a long time ago.
2007-08-17 16:43:57 +00:00
Havoc Pennington
79d3004e26 2007-07-24 Havoc Pennington <hp@redhat.com>
* configure.in: add AM_PROG_CC_C_O to allow per-target CPPFLAGS

	* bus/dispatch.c (bus_dispatch_test_conf): Fix up setting
	TEST_LAUNCH_HELPER_CONFIG to include the full path, and enable
	test shell_fail_service_auto_start when use_launcher==TRUE

	* bus/activation-helper-bin.c (convert_error_to_exit_code): pass
	through the INVALID_ARGS error so the test suite works

	* bus/activation.c (handle_activation_exit_error): return
	DBUS_ERROR_NO_MEMORY if we get BUS_SPAWN_EXIT_CODE_NO_MEMORY

	* dbus/dbus-spawn.c (_dbus_babysitter_get_child_exit_status):
	return only the exit code of the child, not the entire thingy from
	waitpid(), and make the return value indicate whether the child
	exited normally (with a status code)

	* bus/bus.c (process_config_first_time_only): _dbus_strdup works
	on NULL so no need to check
	(process_config_every_time): move servicehelper init here, so we
	reload it on HUP or config file change

	* bus/Makefile.am (install-data-hook): remove comment because
	Emacs make mode seems to be grumpy about it
2007-07-24 22:11:00 +00:00
Richard Hughes
6ceffb5918 2007-07-24 Richard Hughes <richard@hughsie.com>
* bus/bus.c: (process_config_first_time_only),
(process_config_every_time), (bus_context_unref),
(bus_context_get_servicehelper):
* bus/bus.h:
Add the concept of a service-helper and allow it's value to be read.
2007-07-24 12:19:59 +00:00
Havoc Pennington
d012387afe 2007-07-13 Havoc Pennington <hp@redhat.com>
* Add indent-tabs-mode: nil to all file headers.
2007-07-14 02:44:01 +00:00
Havoc Pennington
54b943432c 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
2007-06-18 19:32:51 +00:00
Havoc Pennington
e3d30a0322 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
2007-06-13 16:30:43 +00:00
Havoc Pennington
7be5fd95cd 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
2007-06-09 23:41:33 +00:00
Havoc Pennington
2383267226 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
2007-06-09 21:53:20 +00:00
Havoc Pennington
9362aac398 2007-03-11 Havoc Pennington <hp@redhat.com>
* tools/dbus-launch.c (do_close_stderr): fix C89 problem and
	formatting problem

	* Mostly fix the DBusPipe mess.
	- put line break after function return types
	- put space before parens
	- do not pass structs around by value
	- don't use dbus_strerror after calling supposedly cross-platform
	api
	- don't name pipe variables "fd"
	- abstract special fd numbers like -1 and 1
2007-03-12 22:52:40 +00:00
Ralf Habacker
47e318a6e1 * bus/bus.c, bus/bus.h, bus/main.c, bus/test.c, dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-util-unix.c, dbus/dbus-sysdeps-util-win.c, bus/dbus-sysdeps-win.c,dbus/dbus-sysdeps.h: renamed _dbus_xxx_pipe to _dbus_pipe_xxx, completed _dbus_pipe support. 2007-03-10 09:10:36 +00:00
Ralf Habacker
ee51364bd7 * bus/bus.c, dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps.h: rename pipe related write() function calls to _dbus_write_pipe(). 2007-03-08 20:25:15 +00:00
Ray Strode
5d77d1503e 2006-12-19 Ray Strode <rstrode@redhat.com>
* bus/bus.c (process_config_every_time):
	don't overwrite existing bus context activation object
	until after we've checked that the new activation is
	valid.

	* bus/main.c
	(signal_handler), (handle_reload_watch):
	don't call exit() on failure, instead make do and keep
	going.
	(close_reload_pipe): new function to turn off
	hangup-causes-config-reload behavior if an unexpected
	error occurs
2006-12-20 06:18:19 +00:00
Tim Dijkstra
145fb99b6e commit.msg 2006-12-12 21:24:07 +00:00
John (J5) Palmieri
4c31ea9ee2 * bus/bus.c: Missed patch - pass in the context to the directory watch 2006-11-06 16:02:19 +00:00
Havoc Pennington
08079a5bde 2006-09-16 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps-unix.h: small change to Peter's patch to make
	dbus-sysdeps-unix-util.c build, add unix-specific sysdeps header.

	* dbus/dbus-sysdeps.h, dbus-sysdeps-unix.c: patch from Peter
	Kümmel bug #8249 to make the sysdeps.h read/write/open/close
	functions specifically for sockets only, and move generic
	read/write/open/close into unix-specific code.
2006-09-16 15:34:34 +00:00
John (J5) Palmieri
79b1e99664 * Released 0.92
* dbus/dbus-threads.c (dbus_threads_init): change the documentation
  to reflect the init late change

* bus/bus.c (bus_context_new): Check user before we fork so we can
  print out an error message a user will be able to see
2006-08-18 20:24:56 +00:00
John (J5) Palmieri
10b79991cc * missing semicolon 2006-08-08 23:30:39 +00:00
John (J5) Palmieri
9a3145b9f3 These are all patches from Kjartan Maraas <kmaraas at gnome dot org>
with cleanups of bugs found from Coverity reports:

* dbus/dbus-sysdeps-util.c (_dbus_write_pid_file):
  close the file on error to avoid a leak

* bus/expirelist.c (bus_expire_list_test):
  Check for NULL on dbus_new0

* bus/activation.c (update_directory):
  remove dead code

* bus/config-parser.c (merge_service_context_hash, start_selinux_child):
  Fix some leaks

* bus/bus.c (process_config_every_time):
  Fixed a leak

* bus/desktop-file.c (parse_key_value):
  Fixed leak

* bus/selinux.c (bus_selinux_id_table_insert):
  Fixed leak
2006-08-08 23:29:03 +00:00
John (J5) Palmieri
d062db4c27 * bus/bus.c: Fix eavesdropping on method calls 2006-06-07 20:07:34 +00:00
Sjoerd Simons
caf220015b * bus/bus.c: (bus_context_reload_config): Flush the user database cache on
config reload.
   * bus/dbus-daemon.1.in: Also note that SIGHUP flushes the user/group
   information caches
   * dbus/dbus-hash.c: (_dbus_hash_table_remove_all):
   * dbus/dbus-hash.h: Add function to remove all entries from a hash table
   * dbus/dbus-userdb.c: (_dbus_user_database_flush):
   * dbus/dbus-userdb.h: Add function to flush all user/group information
   caches.
2006-03-06 19:06:45 +00:00
David Zeuthen
5e948ff7cd 2005-11-14 David Zeuthen <davidz@redhat.com>
Patch from Timo Hoenig <thoenig@suse.de>.

        * bus/bus.c: I've recently investigated why the automatic reload
        of configuration files does not work as expected.

        Currently, reloading configuration files does only work when
        running dbus-daemon with --nodaemon.  If we are running as daemon
        we're hitting a dnotify bug once we fork the process.

        We're initializing the dnotify fds before calling fork().  Once
        the child process forked it does still have the fds (and they
        still show up in /proc/`pidof dbus-daemon`/fd/) but we're not
        getting SIGIO as changes are made to the configuration files.

        The attached patch moves the initialization of the dnotify fds to
        process_config_postinit().  This is safe for all current code
        paths and solves the dnotify disfunction.  If we're running
        dbus-daemon as daemon the fds for dnotify are now being
        initialized after fork() for the child process.

        * configure.in: The current configure.in check for dnotify probes
        'x$target_os' for being 'xlinux-gnu'.  I've changed the check to
        match for 'xlinux', too. Additionally I have adapted the configure
        option's style to match with the others.
2005-11-14 20:51:25 +00:00
Colin Walters
6b2af67ae1 2005-06-16 Colin Walters <walters@verbum.org>
* bus/bus.c (bus_context_new): Set parser to NULL
	after we unref it (Patch from Chris Boscolo, #2174).
2005-06-16 06:05:09 +00:00
David Zeuthen
1d19fc62e9 2005-06-14 David Zeuthen <davidz@redhat.com>
* bus/bus.c (process_config_every_time): Drop existing conf-dir
        watches (if applicable) and add new watches

        * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
        (main): Setup SIGIO signal handler if using D_NOTIFY

        * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs

        * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
        (merge_included): Also merge conf_dirs list
        (bus_config_parser_unref): Clear conf_dirs list
        (include_dir): Add directory to conf_dirs list
        (bus_config_parser_get_conf_dirs): New function

        * bus/dir-watch.[ch]: New files

        * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]

        * configure.in: Add checks for D_NOTIFY on Linux
2005-06-15 02:31:38 +00:00
John (J5) Palmieri
11fd3b965f * dbus/dbus-connection.c, dbus/dbus-connection.h
(dbus_connection_disconnect): renamed to dbus_connection_close
	for API symmetry with dbus_connection_open
	(_dbus_connection_open_internal):
	s/dbus_connection_disconnect/dbus_connection_close

	* dbus/dbus-bus.c (dbus_bus_get):
	s/dbus_connection_disconnect/dbus_connection_close

	* bus/connection.c (bus_connections_unref,
	bus_connections_setup_connection, bus_connections_expire_incomplete):
	s/dbus_connection_disconnect/dbus_connection_close

	* bus/dispatch.c (bus_dispatch, kill_client_connection,
	kill_client_connection_unchecked, check_hello_connection):
	s/dbus_connection_disconnect/dbus_connection_close

	* bus/bus.c (new_connection_callback):
	s/dbus_connection_disconnect/dbus_connection_close
2005-06-02 17:41:04 +00:00
David Zeuthen
44656f538f 2005-04-13 David Zeuthen <davidz@redhat.com>
* bus/selinux.c: Add c-file-style to top of file
	(log_audit_callback): Don't free the data here anymore
	(bus_selinux_check): Don't take spid and tpid since appending
	that to auxdata may OOM.
	(bus_selinux_allows_acquire_service): Handle OOM and signal back
	to the caller if we are OOM by taking an error object.
	(bus_selinux_allows_send): -do-

	* bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
	and bus_selinux_allows_send

	* bus/bus.c (bus_context_check_security_policy): Pass error and
	pass on OOM thrown by bus_selinux_allows_send()

	* bus/services.c (bus_registry_acquire_service): Pass error and
	pass on OOM thrown by bus_selinux_allows_acquire_service()
2005-04-13 14:27:11 +00:00
Colin Walters
248895207d 2005-02-17 Colin Walters <walters@verbum.org>
* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
	Rename to DBUS_SERVICE_DBUS.
	(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
	(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
	DBUS_INTERFACE_INTROSPECTABLE.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
	DBUS_INTERFACE_PROPERTIES.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
	DBUS_INTERFACE_PEER.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
	DBUS_INTERFACE_LOCAL.

	All other users of those constants have been changed.

	* bus/driver.c (bus_driver_handle_introspect): Use constants.

	* glib/dbus-gobject.c (handle_introspect): Use constants.

	* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
2005-02-17 21:19:49 +00:00
Colin Walters
935a41a04c 2004-11-09 Colin Walters <walters@verbum.org>
* dbus/dbus-string.c (_dbus_string_get_length): New
	function, writes DBusString to C buffer.

	* dbus/dbus-string.h: Prototype it.

	* dbus/dbus-message.c (dbus_message_type_to_string): New
	function, converts message type into C string.

	* dbus/dbus-message.h: Prototype it.

	* bus/selinux.c (bus_selinux_check): Take source pid,
	target pid, and audit data.  Pass audit data to
	avc_has_perm.
	(log_audit_callback): New function, appends extra
	audit information.
	(bus_selinux_allows_acquire_service): Also take
	service name, add it to audit data.
	(bus_selinux_allows_send): Also take message
	type, interface, method member, error name,
	and destination, and add them to audit data.
	(log_cb): Initialize func_audit.

	* bus/selinux.h (bus_selinux_allows_acquire_service)
	(bus_selinux_allows_send): Update prototypes

	* bus/services.c (bus_registry_acquire_service): Pass
	service name to bus_selinux_allows_acquire_service.

	* bus/bus.c (bus_context_check_security_policy): Pass
	additional audit data.  Move assignment of dest
	to its own line.
2004-11-09 06:11:33 +00:00
Colin Walters
cdac3e058b 2004-11-07 Colin Walters <walters@verbum.org>
* bus/bus.c (load_config): Break into three
	separate functions: process_config_first_time_only,
	process_config_every_time, and process_config_postinit.
	(process_config_every_time): Move call of
	bus_registry_set_service_context_table into
	process_config_postinit.
	(process_config_postinit): New function, does
	any processing that needs to happen late
	in initialization (and also on reload).
	(bus_context_new): Instead of calling load_config,
	open config parser here and call process_config_first_time_only
	and process_config_every_time directly.  Later, after
	we have forked but before changing UID,
	invoke bus_selinux_full_init, and then call
	process_config_postinit.
	(bus_context_reload_config): As in bus_context_new,
	load parse file inside here, and call process_config_every_time
	and process_config_postinit.

	* bus/services.h, bus/services.c
	(bus_registry_set_service_context_table): Rename
	from bus_registry_set_sid_table.  Take string hash from config
	parser, and convert them here into SIDs.

	* bus/config-parser.c (struct BusConfigParser): Have
	config parser only store a mapping of service->context
	string.
	(merge_service_context_hash): New function.
	(merge_included): Merge context string hashes instead
	of using bus_selinux_id_table_union.
	(bus_config_parser_new): Don't use bus_selinux_id_table_new;
	simply create a new string hash.
	(bus_config_parser_unref): Unref it.
	(start_selinux_child): Simply insert strings into hash,
	don't call bus_selinux_id_table_copy_over.

	* bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
	(bus_selinux_id_table_copy_over): Delete.
2004-11-07 17:05:19 +00:00
Colin Walters
e430788a6b 2004-10-29 Colin Walters <walters@redhat.com>
* dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
	parameter for fd to write pid to.

	* dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.

	* bus/bus.c (bus_context_new): Pass print_pid_fd
	to _dbus_become_daemon (bug #1720)
2004-10-29 19:59:15 +00:00
David Zeuthen
a24270a451 2004-09-12 David Zeuthen <david@fubar.dk>
Patch from Kay Sievers <kay.sievers@vrfy.org>

	* bus/bus.c (bus_context_new):
	* bus/bus.h:
	* bus/main.c (usage)
	(main):
	Add commandline option --nofork to override configuration file
	setting.
2004-09-12 10:23:42 +00:00
Olivier Andrieu
eb37885909 * bus/bus.c (process_config_first_time_only): get rid of an unused
DBusError that was causing a memoy leak (bug #989).

* dbus/dbus-keyring.c, dbus/dbus-message.c: fix compilation on
  Solaris/Forte C (bug #974)

* bus/main.c (main): plug two minuscule memleaks.
2004-08-10 21:32:25 +00:00
Havoc Pennington
43605a6f4e 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.
2004-08-10 03:07:01 +00:00
Havoc Pennington
1e9b185b0c 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
2004-07-30 05:59:34 +00:00