selinux-policy/policy/modules/apps/java.if

71 lines
1.4 KiB
Plaintext
Raw Normal View History

2006-01-12 22:26:46 +00:00
## <summary>Java virtual machine</summary>
2008-11-05 16:10:46 +00:00
########################################
2006-01-12 22:26:46 +00:00
## <summary>
2008-11-05 16:10:46 +00:00
## Role access for java
2006-01-12 22:26:46 +00:00
## </summary>
2008-11-05 16:10:46 +00:00
## <param name="role">
## <summary>
2008-11-05 16:10:46 +00:00
## Role allowed access
## </summary>
2006-01-12 22:26:46 +00:00
## </param>
2008-11-05 16:10:46 +00:00
## <param name="domain">
## <summary>
2008-11-05 16:10:46 +00:00
## User domain for the role
## </summary>
2006-01-12 22:26:46 +00:00
## </param>
#
2008-11-05 16:10:46 +00:00
interface(`java_role',`
2006-01-12 22:26:46 +00:00
gen_require(`
2008-11-05 16:10:46 +00:00
type java_t, java_exec_t;
2006-01-12 22:26:46 +00:00
')
2008-10-17 15:52:39 +00:00
2008-11-05 16:10:46 +00:00
role $1 types java_t;
2008-10-17 15:52:39 +00:00
2006-01-12 22:26:46 +00:00
# The user role is authorized for this domain.
2008-11-05 16:10:46 +00:00
domtrans_pattern($2, java_exec_t, java_t)
allow java_t $2:process signull;
2006-01-12 22:26:46 +00:00
# Unrestricted inheritance from the caller.
2008-11-05 16:10:46 +00:00
allow $2 java_t:process { noatsecure siginh rlimitinh };
2006-01-12 22:26:46 +00:00
2008-11-05 16:10:46 +00:00
allow java_t $2:unix_stream_socket connectto;
allow java_t $2:unix_stream_socket { read write };
2006-01-12 22:26:46 +00:00
')
########################################
## <summary>
## Run java in javaplugin domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
2008-11-05 16:10:46 +00:00
template(`java_domtrans',`
gen_require(`
2008-11-05 16:10:46 +00:00
type java_t, java_exec_t;
')
2008-11-05 16:10:46 +00:00
domtrans_pattern($1, java_exec_t, java_t)
')
########################################
## <summary>
2008-11-05 16:10:46 +00:00
## Execute the java program in the unconfined java domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
2008-11-05 16:10:46 +00:00
interface(`java_domtrans_unconfined',`
gen_require(`
2008-11-05 16:10:46 +00:00
type unconfined_java_t, java_exec_t;
')
2008-11-05 16:10:46 +00:00
domtrans_pattern($1, java_exec_t, unconfined_java_t)
corecmd_search_bin($1)
')