enable optionals in base/monolithic

This commit is contained in:
Chris PeBenito 2006-03-23 21:07:57 +00:00
parent 7fd9a6007d
commit 0db866cbf4
2 changed files with 18 additions and 12 deletions

View File

@ -1,3 +1,5 @@
- Enable optional blocks in base module and monolithic policy.
This requires checkpolicy 1.30.1.
- Fix vpn module declaration.
- Numerous fixes from Dan Walsh.
- Change build order to preserve m4 line number information so policy

View File

@ -24,10 +24,16 @@ define(`policy_module',`
# For use in interfaces, to optionally insert a require block
#
define(`gen_require',`
ifdef(`self_contained_policy',`',`
ifdef(`self_contained_policy',`
ifdef(`__in_optional_policy',`
require {
$1
} # end require
')
',`
require {
$1
}
} # end require
')
')
@ -86,17 +92,15 @@ define(`policy_call_depth',0)
# Optional policy handling
#
define(`optional_policy',`
ifdef(`self_contained_policy',`
ifdef(`$1.te',`$2',`$3')
',`
optional {
$2
ifelse(`$3',`',`',`
} else {
$3
')
}
optional {
pushdef(`__in_optional_policy') dnl
$2
popdef(`__in_optional_policy') dnl
ifelse(`$3',`',`',`
} else {
$3
')
}
')
##############################