mcs: add additional constraints to databases

Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
Kenton Groombridge 2021-10-13 11:54:23 -04:00
parent 39a19daa3c
commit 814d4d3f38
1 changed files with 19 additions and 0 deletions

View File

@ -166,4 +166,23 @@ mlsconstrain db_language { drop getattr setattr relabelfrom execute }
mlsconstrain db_blob { drop getattr setattr relabelfrom read write import export }
( h1 dom h2 );
mlsconstrain { tcp_socket udp_socket rawip_socket } node_bind
(( h1 dom h2 ) or ( t1 != mcs_constrained_type ));
# The node recvfrom/sendto ops, the recvfrom permission is a "write" operation
# because the subject in this particular case is the remote domain which is
# writing data out the network node which is acting as the object
mlsconstrain { node } { recvfrom sendto }
(( l1 dom l2 ) or ( t1 != msc_constrained_type ));
mlsconstrain { packet peer } { recv }
(( l1 dom l2 ) or
(( t1 != mcs_constrained_type ) and ( t2 != mcs_constrained_type )));
# The netif ingress/egress ops, the ingress permission is a "write" operation
# because the subject in this particular case is the remote domain which is
# writing data out the network interface which is acting as the object
mlsconstrain { netif } { egress ingress }
(( l1 dom l2 ) or ( t1 != mcs_constrained_type ));
') dnl end enable_mcs