Bug #26031
openIterators broken with “File key-value present with option” method
Description
When using an iterator to add several lines in a file, the compliance output would tend to show that the iterator worked (several lines showing the correct successive iterator values), however the produced file doesn't contains as many lines as should have been generated, and all lines contain the same and last value of the iterator.
Here an iterator is defined to feed several “nameserver” lines in resolv.conf.
The iterator value is defined from a parameter, which value is : 1.1.1.1,8.8.8.8,9.9.9.9
The example technique would be supposed to produce a resolv.conf file containing (at least) :
nameserver 1.1.1.1 nameserver 8.8.8.8 nameserver 9.9.9.9
But we end up with a file containing :
options rotate nameserver 9.9.9.9 nameserver 9.9.9.9
Although the agent output and compliance display seems to show that the 3 proper repairs have been made. See attached screenshots for technique contents and compliance output.
Files
Updated by Michel BOUISSOU 17 days ago
It actually works properly in audit mode, but is broken in enforce mode.