While porting clixon to the RTOS Blackberry QNX there was memory corruption while reading the yang models from the disk.
Debugging led to the function `clicon_file_dirent` in `clixon_file.c` in which the `struct dirent` is copied into an array.
According to the UNIX `struct dirent` [documentation](https://man7.org/linux/man-pages/man0/dirent.h.0p.html):
> The name of an array of char of an unspecified size should not be
> used as an lvalue. Use of:
>
> sizeof(d_name)
>
> is incorrect; use:
>
> strlen(d_name)
>
> instead.
I adjusted the memory allocation to take the `strlen(dent->d_name)` into account.
w-level general upgrades and as a complement to module-specific upgrade.
* Called on startup after initial XML parsing, but before module-specific upgrades
* Enabled by definign the `.ca_datastore_upgrade`
* [General-purpose upgrade documentation](https://clixon-docs.readthedocs.io/en/latest/backend.html#ge
neral-purpose)
* JSON parse error messages change from ` on line x: syntax error,..` to `json_parse: line x: syntax err
or`
* Unknown-element error message is more descriptive, eg from `namespace is: urn:example:clixon` to: `Fai
led to find YANG spec of XML node: x with parent: xp in namespace urn:example:clixon`.
* C-API parse and validation API more capable
* `xml_spec_populate` family of functions extended with three-value return values
* -1: error, 0: parse OK, 1: parse and YANG binding OK.
* `xml_parse` and `json_parse` API changes
* Three value returns: -1: error, 0: parse OK, 1: parse and YANG binding OK.
* Extended `xml_parse_file2` and `xml_parse_string2` extended API functions with all options available.
* New concept called `yang_bind` that defines how XML symbols are bound to YANG after parsing
* Existing API same except `xml_parse_file` `endtag` argument moved to `xml_parse_file2`
* C-API: Added instrumentation: `xml_size` and `xml_stats_get`.
* Fixed: Enabling modstate (CLICON_XMLDB_MODSTATE), changing a revision on a yang, and restarting made the backend daemon exit at start (thanks Matt)
* Also: ensure to load `ietf-yang-library.yang ` if CLICON_XMLDB_MODSTATE is set
* CLICON_NACM_MODE config option, default is disabled.
* Added username attribute to all rpc:s from frontend to backend
* Added NACM backend module in example