|
Chris PeBenito |
677c4c |
## <summary>Devicekit modular hardware abstraction layer</summary>
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Execute a domain transition to run devicekit.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Dominick Grift |
4b1644 |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed to transition.
|
|
Dominick Grift |
4b1644 |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_domtrans',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_t, devicekit_exec_t;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
domtrans_pattern($1, devicekit_exec_t, devicekit_t)
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Send to devicekit over a unix domain
|
|
Chris PeBenito |
677c4c |
## datagram socket.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_dgram_send',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_t;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
allow $1 devicekit_t:unix_dgram_socket sendto;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Send and receive messages from
|
|
Chris PeBenito |
677c4c |
## devicekit over dbus.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_dbus_chat',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_t;
|
|
Chris PeBenito |
677c4c |
class dbus send_msg;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
allow $1 devicekit_t:dbus send_msg;
|
|
Chris PeBenito |
677c4c |
allow devicekit_t $1:dbus send_msg;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Send and receive messages from
|
|
Chris PeBenito |
677c4c |
## devicekit disk over dbus.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_dbus_chat_disk',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_disk_t;
|
|
Chris PeBenito |
677c4c |
class dbus send_msg;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
allow $1 devicekit_disk_t:dbus send_msg;
|
|
Chris PeBenito |
677c4c |
allow devicekit_disk_t $1:dbus send_msg;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Send signal devicekit power
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_signal_power',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_power_t;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
allow $1 devicekit_power_t:process signal;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Send and receive messages from
|
|
Chris PeBenito |
677c4c |
## devicekit power over dbus.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_dbus_chat_power',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_power_t;
|
|
Chris PeBenito |
677c4c |
class dbus send_msg;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
allow $1 devicekit_power_t:dbus send_msg;
|
|
Chris PeBenito |
677c4c |
allow devicekit_power_t $1:dbus send_msg;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Read devicekit PID files.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_read_pid_files',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_var_run_t;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
files_search_pids($1)
|
|
Chris PeBenito |
677c4c |
read_files_pattern($1, devicekit_var_run_t, devicekit_var_run_t)
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
########################################
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
61738f |
## All of the rules required to administrate
|
|
Chris PeBenito |
677c4c |
## an devicekit environment
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## <param name="domain">
|
|
Chris PeBenito |
677c4c |
## <summary>
|
|
Chris PeBenito |
677c4c |
## Domain allowed access.
|
|
Chris PeBenito |
677c4c |
## </summary>
|
|
Chris PeBenito |
677c4c |
## </param>
|
|
Chris PeBenito |
677c4c |
## <rolecap/>
|
|
Chris PeBenito |
677c4c |
#
|
|
Chris PeBenito |
677c4c |
interface(`devicekit_admin',`
|
|
Chris PeBenito |
677c4c |
gen_require(`
|
|
Chris PeBenito |
677c4c |
type devicekit_t, devicekit_disk_t, devicekit_power_t;
|
|
Chris PeBenito |
61738f |
type devicekit_var_lib_t, devicekit_var_run_t, devicekit_tmp_t;
|
|
Chris PeBenito |
677c4c |
')
|
|
Chris PeBenito |
677c4c |
|
|
Dominick Grift |
47cf98 |
allow $1 devicekit_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
677c4c |
ps_process_pattern($1, devicekit_t)
|
|
Chris PeBenito |
677c4c |
|
|
Dominick Grift |
47cf98 |
allow $1 devicekit_disk_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
677c4c |
ps_process_pattern($1, devicekit_disk_t)
|
|
Chris PeBenito |
677c4c |
|
|
Dominick Grift |
47cf98 |
allow $1 devicekit_power_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
677c4c |
ps_process_pattern($1, devicekit_power_t)
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
admin_pattern($1, devicekit_tmp_t)
|
|
Dominick Grift |
61f406 |
files_list_tmp($1)
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
admin_pattern($1, devicekit_var_lib_t)
|
|
Dominick Grift |
61f406 |
files_list_var_lib($1)
|
|
Chris PeBenito |
677c4c |
|
|
Chris PeBenito |
677c4c |
admin_pattern($1, devicekit_var_run_t)
|
|
Dominick Grift |
61f406 |
files_list_pids($1)
|
|
Chris PeBenito |
677c4c |
')
|