fix corenetwork so the ifdef enable_mls survives to regular processing.
This commit is contained in:
parent
6c63996d9b
commit
49317e6b49
@ -188,7 +188,7 @@ network_node(unspec, s0, ::, ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
|
|||||||
type netif_t, netif_type;
|
type netif_t, netif_type;
|
||||||
sid netif gen_context(system_u:object_r:netif_t,s0 - s15:c0.c255)
|
sid netif gen_context(system_u:object_r:netif_t,s0 - s15:c0.c255)
|
||||||
|
|
||||||
ifdef(`enable_mls',`
|
build_option(`enable_mls',`
|
||||||
network_interface(lo, lo,s0 - s15:c0.c255)
|
network_interface(lo, lo,s0 - s15:c0.c255)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
@ -5,6 +5,26 @@
|
|||||||
#
|
#
|
||||||
define(`shiftn',`ifelse($1,0,`shift($*)',`shiftn(decr($1),shift(shift($*)))')')
|
define(`shiftn',`ifelse($1,0,`shift($*)',`shiftn(decr($1),shift(shift($*)))')')
|
||||||
|
|
||||||
|
#
|
||||||
|
# build_option(option_name,true,[false])
|
||||||
|
#
|
||||||
|
# makes an ifdef. hacky quoting changes because with
|
||||||
|
# regular quoting, the macros in $2 and $3 will not be expanded
|
||||||
|
#
|
||||||
|
define(`build_option',`dnl
|
||||||
|
changequote([,])dnl
|
||||||
|
[ifdef(`$1',`]
|
||||||
|
changequote(`,')dnl
|
||||||
|
$2
|
||||||
|
changequote([,])dnl
|
||||||
|
[',`]
|
||||||
|
changequote(`,')dnl
|
||||||
|
$3
|
||||||
|
changequote([,])dnl
|
||||||
|
[')]
|
||||||
|
changequote(`,')dnl
|
||||||
|
')
|
||||||
|
|
||||||
define(`declare_netifs',`dnl
|
define(`declare_netifs',`dnl
|
||||||
netifcon $2 gen_context(system_u:object_r:$1,$3) gen_context(system_u:object_r:unlabeled_t,$3)
|
netifcon $2 gen_context(system_u:object_r:$1,$3) gen_context(system_u:object_r:unlabeled_t,$3)
|
||||||
ifelse(`$4',`',`',`declare_netifs($1,shiftn(3,$*))')dnl
|
ifelse(`$4',`',`',`declare_netifs($1,shiftn(3,$*))')dnl
|
||||||
@ -14,7 +34,7 @@ ifelse(`$4',`',`',`declare_netifs($1,shiftn(3,$*))')dnl
|
|||||||
# network_interface(if_name,linux_interface,mls_sensitivity)
|
# network_interface(if_name,linux_interface,mls_sensitivity)
|
||||||
#
|
#
|
||||||
define(`network_interface',`
|
define(`network_interface',`
|
||||||
gen_require(`type unlabeled_t')
|
gen_require(``type unlabeled_t;'')
|
||||||
type $1_netif_t alias netif_$1_t, netif_type;
|
type $1_netif_t alias netif_$1_t, netif_type;
|
||||||
declare_netifs($1_netif_t,shift($*))
|
declare_netifs($1_netif_t,shift($*))
|
||||||
')
|
')
|
||||||
|
Loading…
Reference in New Issue
Block a user