I have been attempting to get my app to transition to a different domain unsuccessfully,
what is wring with the following:########################################
#
# Declarations
#
require {
type initrc_t;
}
type myapp_t;
type myapp_unit_file_t;
init_daemon_domain(myapp_t, myapp_unit_file_t);
allow initrc_t myapp_unit_file_t : file { read getattr execute open } ;
allow initrc_t myapp_unit_file_t : file { ioctl read getattr lock execute entrypoint open } ;
allow initrc_t myapp_t : process { transition siginh } ;
type myapp_exec_t;
files_type(myapp_exec_t);
allow initrc_t myapp_exec_t : file { read getattr execute open } ;
allow initrc_t myapp_exec_t : file { ioctl read getattr lock execute entrypoint open } ;
allow initrc_t myapp_t : process { transition siginh } ;
allow myapp_t self:fifo_file rw_fifo_file_perms;
allow myapp_t self:unix_stream_socket create_stream_socket_perms;
domain_use_interactive_fds(myapp_t)
#files_read_etc_files(myapp_t)
#miscfiles_read_localization(myapp_t)
#####################################################
## <summary>policy for myapp</summary>
########################################
## <summary>
## Execute TEMPLATE in the myapp domin.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`myapp_domtrans',`
gen_require(`
type myapp_t, myapp_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, myapp_exec_t, myapp_t)
##############################################
/appcl/myapp/apiservice.py -- gen_context(system_u:object_r:myapp_exec_t,s0)
/usr/lib/systemd/system/myapp.service -- gen_context(system_u:object_r:myapp_unit_file_t,s0)
# sesearch --allow -t myapp_t | grep transition
allow initrc_t myapp_t : process { transition siginh } ;
allow myapp_domain daemon : process transition ;
----------------another question -------only for the patient---------------
For those who like reading alot here is where im going with this:invalid context error.
-- selinux mailing list selinux@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/selinux