From 7cc3876efa3b325ca453bc6bff7abbee3970d5f7 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 22 Jul 2024 20:06:33 +0200 Subject: [PATCH] NEWS.adoc, UPGRADING.adoc: document changes of handling for IMMUTABLE, STRING and NUMBER flags [#266] Signed-off-by: Jim Klimov --- NEWS.adoc | 5 +++++ UPGRADING.adoc | 10 ++++++++++ docs/nut.dict | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/NEWS.adoc b/NEWS.adoc index d3bd184fa1..2bab34b76a 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -137,6 +137,11 @@ https://github.com/networkupstools/nut/milestone/11 * `upsd_cleanup()` is now traced, to more easily see that the daemon is exiting (and/or start-up has aborted due to configuration or run-time issues). Warning about "world readable" files clarified. [#2417] + * sanity-check `NUMBER` values that they actually resolve as a `float` + or `long int`; report an un-flagged type as `STRING` if not (previously + blindly defaulted to `NUMBER` always). Debug-print presence of the + `IMMUTABLE` flag in `netget.c::get_type()`, and actually consider it + in the `netset.c::set_var()` method to abort early. [#266] - nut-scanner: * the tool relies on dynamic loading of shared objects (library files) diff --git a/UPGRADING.adoc b/UPGRADING.adoc index 908ce287e9..ece5e7ad83 100644 --- a/UPGRADING.adoc +++ b/UPGRADING.adoc @@ -66,6 +66,16 @@ Changes from 2.8.2 to 2.8.3 and one structure (`nutscan_ipmi_t`) updated in a (hopefully) backwards compatible manner. [PR #2523, issue #2244 and numerous PRs for it] +- The `netset.c::set_var()` was updated to consider the `IMMUTABLE` flag on + values to reject writing into them quickly. This is currently expected + to only impact `override.*` values in vanilla NUT codebase. [#266] + +- The `netset.c::get_type()` was updated to sanity-check `NUMBER`-flagged + values that the strings actually resolve into `float` or `long int` + values. Some codebase does not flag its values properly and warnings + can be emitted (to be reported for upstream NUT to fix these use-cases). + [#266] + - Internal API change for `sendsignalpid()` and `sendsignalfn()` methods, which can impact NUT forks which build using `libcommon.la` and similar libraries. Added new last argument with `const char *progname` (may be diff --git a/docs/nut.dict b/docs/nut.dict index 8a0c0b2b5b..d55e1313b9 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3197 utf-8 +personal_ws-1.1 en 3199 utf-8 AAC AAS ABI @@ -2380,8 +2380,10 @@ nd nds netcat netclient +netget netmask netserver +netset netsh netsnmp netvision