Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions controls/def.cf
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,33 @@ bundle common def
# Common Controls

# Because in some versions of cfengine bundlesequence in body common
# control does not support does not support iteration over data containers
# we must first pick out the bundles into a shallow container that we can
# then get a regular list from using getvalues().
# control does not support iteration over data containers we must first
# pick out the bundles into a shallow container that we can then get a
# regular list from using getvalues().

"tbse" data => mergedata( "def.control_common_bundlesequence_end" );
"bundlesequence_end" slist => getvalues( tbse );

"tbse" data => mergedata( "def.control_common_bundlesequence_classification" );
"bundlesequence_classification" slist => getvalues( tbse );
"bundlesequence_end" -> { "CFE-4855" }
slist => { },
if => not( isvariable( "def.control_common_bundlesequence_end") ),
comment => concat( "We define an empty list so that the agent will not",
" error about undefined variable when ",
" def.bundlesequence_end is not defined." );
"bundlesequence_end" -> { "CFE-4855" }
slist => getvalues( mergedata( "def.control_common_bundlesequence_end" ) ),
comment => concat( "We define bundlesequence_end from Augments if it's",
" available. This allows for customization without",
" modifying the vendored policy." );

"bundlesequence_classification" -> { "CFE-4855" }
slist => { },
if => not( isvariable( "def.control_common_bundlesequence_classification") ),
comment => concat( "We define an empty list so that the agent will not",
" error about undefined variable when ",
" def.bundlesequence_classification is not defined." );
"bundlesequence_classification" -> { "CFE-4855" }
slist => getvalues( mergedata( "def.control_common_bundlesequence_classification" ) ),
comment => concat( "We define bundlesequence_classification from Augments if it's",
" available. This allows for customization without",
" modifying the vendored policy." );

"control_common_ignore_missing_bundles" -> { "CFE-2773" }
string => ifelse( strcmp( $(control_common_ignore_missing_bundles), "true" ),
Expand Down