Starting in TrueNAS 12.0 smb configuration relies more heavily on libsmbconf
and registry.tdb. Auxiliary parameters are no longer merely placed directly
into a text file, but must be parsed and applied through libsmbconf.
Additionally, new shares may be generated through vfs_zfs_fsrvp, and
included into the global SMB configuration. This hybrid configuration
necessitates more robust validation and normalization of user-provided
auxiliary parameters. As such, auxiliary parameters are not treated as simple
key-value stores of the form "key = value".
Changes in this regard are as follows:
1) Unnecessary new lines are stripped
2) Validation errors are raised on comments
3) Validation errors are raised on entries that are not of the form "key = value"
Validation for SMB service configuration has been moved into a new separate
function. Checks added for collisions between NetBIOS aliases and workgroups.