Issue 49309 - syntax checking on referint's delay attr
Bug Description: According to the documentation when
referint-update-delay is set to -1, it means that "No check for
referential integrity is performed". However, the server will not accept
such a value. Additionally, if we set a non-numerical value such as
a random string, the server will happily accept it.
The plugin initially sets delay's value to -1 in order to do config
validation. If a config value for delay exists it will update the
appropriate variable. In the end the plugin will check if the value of
delay was changed from -1 to something else. If not, it means that this
value is missing or there was some error.
However this is wrong because we want -1 to be valid as well.
Currently, -1 is the "default error value" for config validation of this
attribute.
Fix Description: Change the "default error value" from -1 to -2 which is
ineed an invalid value. Additionally by using strtol instead of atoi we
can also properly check if the value provided by the user is really a
number or not, and discard it in the second case.
https://pagure.io/389-ds-base/issue/49309
Author: Ilias95
Review by: mreynolds