From: guido@trentalancia.net (Guido Trentalancia) Date: Tue, 23 Aug 2016 18:06:23 +0200 Subject: [refpolicy] [PATCH v4] Update for the gnome policy and file contexts In-Reply-To: References: <1471099545.21480.27.camel@trentalancia.net> <1471296811.28802.0.camel@trentalancia.net> <1471704772.17584.9.camel@trentalancia.net> <1471894798.19333.1.camel@trentalancia.net> Message-ID: <1471968383.16002.6.camel@trentalancia.net> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On Mon, 22/08/2016 at 21.15 -0400, Chris PeBenito wrote: > On 08/22/16 15:39, Guido Trentalancia wrote: > > > > Update for the gnome module: > > > > - target the dconf daemon, the gsettings user application, the > > ? gnome-settings-daemon and the at-spi daemon with all the > > ? needed domain transitions; > > - a new gstreamer_orcexec_t type and file context is introduced > > ? to support the OIL Runtime Compiler (ORC) optimized code > > ? execution (used for example by pulseaudio); > > - add support for more permissions needed in gconfd_t and gnome > > ? keyring domains; > > - add support for chat over dbus in the gconfd domain and in the > > ? new domains (dconf, gsettings, etc); > > - add support for a few needed fs and kernel permissions. > > - add support for reading the colord related files in the home > > ? directories (such as the ICC EDID profiles): requires the > > ? recent colord patch; > > - add support for for reading the colord related files in the home > > ? directories in the common user domain template; > > - add support for a new mime_info_t type to be used in the home > > ? directories; > > - includes minor modifications to the consolekit, dbus and > > ? policykit modules to support the new targeted gnome daemons > > ? and applications; > > - modifies the pulseaudio module to introduce new interfaces to > > ? read and write pulseaudio tmpfs files and to use the pulseaudio > > ? file descriptor; > > - provides better module encapsulation (i.e. dbus module). > > > > The support for Gnome2/ORBit-2 (version 2) has been dropped. > > > > This patch depends on the recent colord patch. > > > > Recent changes to the pulseaudio module depends on this patch ! [...] > > > > + type dconf_t, dconf_exec_t, dconf_home_t; > > + type at_spi_t, at_spi_exec_t; > > ? type gconfd_t, gconfd_exec_t, gconf_tmp_t; > > ? type gconf_home_t; > > + type gnome_settings_t, gnome_settings_exec_t; > > + type gnome_settings_daemon_t, > > gnome_settings_daemon_exec_t; > > + type gnome_settings_schemas_t; > > + type gkeyringd_exec_t, gnome_keyring_home_t, > > gnome_keyring_cache_home_t, gnome_keyring_tmp_t; > > + type mime_info_t; > > + type user_dbusd_t; > > This dbus type cannot be referenced directly in this module. It's not a dbus type, although it might resemble that from its naming... It's just a convenience private type used to create a domain for running non-system dbus sessions. > > > > ? optional_policy(` > > + dbus_connect_spec_session_bus(user, dconf_t) > > + dbus_connect_spec_session_bus(user, at_spi_t) > > + dbus_connect_spec_session_bus(user, > > gnome_settings_daemon_t) > > Prefixes can't be hardcoded like this. It's related to the above private type. It is used somewhat similarly to a variable in a program. It's not related to "user" as in the arguments "(user, user_r, user_t)". As already explained, it would fail to compile with a "conflicting type rule" error if I use the $1 argument. > > > > + dbus_connect_system_bus(gnome_settings_daemon_t) > > + dbus_domain_transition(at_spi_t, user_dbusd_t) > > + dbus_domain_transition(gnome_settings_t, > > user_dbusd_t) > > + dbus_send_spec_session_bus(user, dconf_t) > > + dbus_send_spec_session_bus(user, at_spi_t) > > + dbus_send_spec_session_bus(user, > > gnome_settings_daemon_t) > > ? dbus_spec_session_domain($1, $1_gkeyringd_t, > > gkeyringd_exec_t) Regards, Guido