Bug #15167
closedInvalid detection of empty strings for edition in Techniques
Description
In the classical agent, we detect if we are to edit files if string are not empty
So, we have a lot of
"edit_content" not => strcmp("${content}", "");
(this is mostly due to historical reasons)
However, in recent version of agents, this fails if the content contains a variable, as promise is not evaluated
for instance
"str1" string => "${foo bar baz}"; "cmp1" expression => strcmp("${str1}", ""); "notcmp1" not => strcmp("${str1}", "");
neither cmp1 nor notcmp1 is defined
we should replace all not => strcmp by the opposite logic in all techniques/generic method
Updated by Nicolas CHARLES over 5 years ago
Techniques to modify:
fileDistribution/checkGenericFileContent/8.0/checkGenericFileContent.st
fileDistribution/fileTemplate/1.0/fileTemplate.st
systemSettings/process/services/1.1/services.st
systemSettings/process/servicesManagement/3.0/servicesManagement.st
systemSettings/userManagement/sudoParameters/3.2/sudoParameters.st
systemSettings/misc/variableFromJsonFile/3.0/variableFromJsonFile.st
systemSettings/misc/variableFromJsonFile/2.0/variableFromJsonFile.st
applications/zmdPackageManagerSettings/3.0/zmdPackageManagerSettings.st
Updated by Nicolas CHARLES over 5 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES over 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1459
Updated by Nicolas CHARLES over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|a686e6481444a12982ef4128faf9490891a2f938.
Updated by Janos Mattyasovszky about 5 years ago
- Related to Bug #15640: Built in File Content technique does not warn about using cfengine variable syntax in file content added
Updated by François ARMAND about 5 years ago
- Fix check changed from To do to Checked
Updated by Vincent MEMBRÉ about 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.13 which was released today.