I am writing SELinux policies for the first time and I need some clarification

 

  1. I have executable A executes a system() call, spawns a shell and executes a command ‘B’ and consumes the output of command B. Do I have to use domain transition in the above case or what is the correct way to go about it?
  2. In the above case A and B have different SELinux policies. Since A executes B, in SELinux policy of A do I need to make type B_t as a required type?
  3. For process A to do domain_transition to B, do I add b_domain_transition macro in A.if file or in A.te


TiA

zer0 0ne