diff --git a/policy/support/loadable_module.spt b/policy/support/loadable_module.spt index 1719673..2d31e62 100644 --- a/policy/support/loadable_module.spt +++ b/policy/support/loadable_module.spt @@ -128,10 +128,10 @@ define(`dflt_or_overr',`ifdef(`$1',$1,$2)') # This needs to be reworked so expressions # with parentheses can work. -define(`delcare_required_symbols',` +define(`declare_required_symbols',` ifelse(regexp($1, `\w'), -1, `', `dnl bool regexp($1, `\(\w+\)', `\1'); -delcare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl +declare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl ') dnl ') @@ -140,16 +140,7 @@ delcare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl # Tunable declaration # define(`gen_tunable',` - ifdef(`self_contained_policy',` - bool $1 dflt_or_overr(`$1'_conf,$2); - ',` - # loadable module tunable - # declaration will go here - # instead of bool when - # loadable modules support - # tunables - bool $1 dflt_or_overr(`$1'_conf,$2); - ') + bool $1 dflt_or_overr(`$1'_conf,$2); ') ############################## @@ -157,24 +148,12 @@ define(`gen_tunable',` # Tunable policy handling # define(`tunable_policy',` - ifdef(`self_contained_policy',` - if (`$1') { - $2 - ifelse(`$3',`',`',`} else { - $3 - ')} - ',` - # structure for tunables - # will go here instead of a - # conditional when loadable - # modules support tunables - gen_require(` - delcare_required_symbols(`$1') - ') - if (`$1') { - $2 - ifelse(`$3',`',`',`} else { - $3 - ')} + gen_require(` + declare_required_symbols(`$1') ') + if (`$1') { + $2 + ifelse(`$3',`',`',`} else { + $3 + ')} ') diff --git a/support/comment_move_decl.sed b/support/comment_move_decl.sed index 1d098d5..20ffa6c 100644 --- a/support/comment_move_decl.sed +++ b/support/comment_move_decl.sed @@ -5,9 +5,10 @@ /require \{/,/} # end require/b nextline /optional \{/,/} # end optional/b nextline -/^[[:blank:]]*(attribute|type(alias)?) / s/^/# this line was moved by the build process: &/ +/^[[:blank:]]*(attribute|type(alias)?) /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*(port|node|netif|genfs)con /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*fs_use_(xattr|task|trans) /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*sid /s/^/# this line was moved by the build process: &/ +/^[[:blank:]]*bool /s/^/# this line was moved by the build process: &/ :nextline diff --git a/support/get_type_attr_decl.sed b/support/get_type_attr_decl.sed index 52a11ab..a113f21 100644 --- a/support/get_type_attr_decl.sed +++ b/support/get_type_attr_decl.sed @@ -5,7 +5,7 @@ /require \{/,/} # end require/b nextline /optional \{/,/} # end optional/b nextline -/^[[:blank:]]*(attribute|type(alias)?) /{ +/^[[:blank:]]*(attribute|type(alias)?|bool) /{ s/^[[:blank:]]+// p }