## D-Bus service providing high-level OBEX client and server side functionality.
########################################
##
## Transition to obex.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`obex_domtrans',`
gen_require(`
type obex_t, obex_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, obex_exec_t, obex_t)
')
########################################
##
## Send and receive messages from
## obex over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`obex_dbus_chat',`
gen_require(`
type obex_t;
class dbus send_msg;
')
allow $1 obex_t:dbus send_msg;
allow obex_t $1:dbus send_msg;
')
#######################################
##
## Role access for obex domains
## that executes via dbus-session
##
##
##
## The role associated with the user domain.
##
##
##
##
## The type of the user domain.
##
##
##
##
## User domain prefix to be used.
##
##
#
template(`obex_role',`
gen_require(`
attribute_role obex_roles;
type obex_t, obex_exec_t;
')
########################################
#
# Declarations
#
roleattribute $1 obex_roles;
########################################
#
# Policy
#
allow $2 obex_t:process signal_perms;
ps_process_pattern($2, obex_t)
dbus_session_domain($3, obex_exec_t, obex_t)
obex_dbus_chat($2)
')