auth_role(staff_r, staff_t)
')
+ optional_policy(`
+ blueman_dbus_chat(staff_t)
+ ')
+
optional_policy(`
bluetooth_role(staff_r, staff_t)
')
avahi_dbus_chat(unconfined_usertype)
')
+ optional_policy(`
+ blueman_dbus_chat(unconfined_usertype)
+ ')
+
optional_policy(`
certmonger_dbus_chat(unconfined_usertype)
')
auth_role(user_r, user_t)
')
+ optional_policy(`
+ blueman_dbus_chat(staff_t)
+ ')
+
optional_policy(`
bluetooth_role(user_r, user_t)
')
--- /dev/null
+
+/usr/libexec/blueman-mechanism -- gen_context(system_u:object_r:blueman_exec_t,s0)
--- /dev/null
+## <summary>policy for blueman</summary>
+
+########################################
+## <summary>
+## Transition to blueman.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`blueman_domtrans',`
+ gen_require(`
+ type blueman_t, blueman_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ domtrans_pattern($1, blueman_exec_t, blueman_t)
+')
+
+########################################
+## <summary>
+## Send and receive messages from
+## blueman over dbus.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`blueman_dbus_chat',`
+ gen_require(`
+ type blueman_t;
+ class dbus send_msg;
+ ')
+
+ allow $1 blueman_t:dbus send_msg;
+ allow blueman_t $1:dbus send_msg;
+')
--- /dev/null
+policy_module(blueman, 1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+type blueman_t;
+type blueman_exec_t;
+dbus_system_domain(blueman_t, blueman_exec_t)
+
+permissive blueman_t;
+
+########################################
+#
+# blueman local policy
+#
+allow blueman_t self:fifo_file rw_fifo_file_perms;
+
+kernel_read_system_state(blueman_t)
+
+corecmd_exec_bin(blueman_t)
+
+dev_rw_wireless(blueman_t)
+
+domain_use_interactive_fds(blueman_t)
+
+files_read_etc_files(blueman_t)
+files_read_usr_files(blueman_t)
+
+auth_read_passwd(blueman_t)
+
+logging_send_syslog_msg(blueman_t)
+
+miscfiles_read_localization(blueman_t)
+
+optional_policy(`
+ avahi_domtrans(blueman_t)
+')
\ No newline at end of file
manage_dirs_pattern($2, bluetooth_helper_tmpfs_t, bluetooth_helper_tmpfs_t)
manage_files_pattern($2, bluetooth_helper_tmpfs_t, bluetooth_helper_tmpfs_t)
+
+ bluetooth_stream_connect($2)
')
#####################################