RFC: reduce number of alias parameters

Stefan Metzmacher metze at samba.org
Wed Jan 10 16:57:03 UTC 2018

Am 10.01.2018 um 17:53 schrieb Björn JACKE:
> On 2018-01-10 at 17:25 +0100 Stefan Metzmacher via samba-technical sent off:
>>> this patch finally marks the alias parameters as deprecated. Unfortunately
>>> those have to be matched manually. Also the change for the man page will need a
>>> lot mor manual work. I will send a patch for that later. I send this already now
>>> because I hope that the change will make it into master before rc1 is splitted
>>> off.
>>> review and commit to master would be very welcome.
>> I think we should use FLAG_SYNONYM similar to FLAG_DEPRECATED
>> instead of having a large if statement with explicit checks.
> exactly that is not easiliy possible unless I don't understand what you mean
> exactly here. Deprecating parameters is done via the xml files, a very
> soffisticated mechanism - very neat but very difficult to understand and modify
> the underlying code (at least for me). If you want to do the deprecation of the
> alias parameters in a similar soffisticated way, it would be good if you would
> propose a patch for that :-)

Just something like this:

diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index a18407d..4fbac7a 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -1823,6 +1823,11 @@ bool lpcfg_do_global_parameter(struct
loadparm_context *lp_ctx,

+       if (parm_table[parmnum].flags & FLAG_SYNONYM) {
+               DEBUG(1, ("WARNING: The \"%s\" alias option is
+                         pszParmName));
+       }
        parm_ptr = lpcfg_parm_ptr(lp_ctx, NULL, &parm_table[parmnum]);

        return set_variable(lp_ctx->globals->ctx, NULL, parmnum, parm_ptr,

bin/default/lib/param/param_table_gen.c seems to set


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180110/d682c12c/signature.sig>

More information about the samba-technical mailing list