param: make 'realm' use the standard 'realm' variable.
authorMichael Adam <obnox@samba.org>
Tue, 12 May 2015 11:41:44 +0000 (13:41 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 30 Jul 2015 23:55:31 +0000 (01:55 +0200)
This way, the generated lp_realm() function matches the param_table.
realm_original is only treated in the special handler now.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/param/loadparm.c
lib/param/param_table.c

index 1369c70f5882f4d394047ecdde1efe6966b98cc9..3d50b727a63ebfb55516a2c9231033a826943c56 100644 (file)
@@ -1085,7 +1085,7 @@ bool handle_realm(struct loadparm_context *lp_ctx, struct loadparm_service *serv
                return false;
        }
 
-       lpcfg_string_set(lp_ctx->globals->ctx, ptr, pszParmValue);
+       lpcfg_string_set(lp_ctx->globals->ctx, &lp_ctx->globals->realm_original, pszParmValue);
        lpcfg_string_set(lp_ctx->globals->ctx, &lp_ctx->globals->realm, upper);
        lpcfg_string_set(lp_ctx->globals->ctx, &lp_ctx->globals->dnsdomain, lower);
 
index 77cd39f7687170e2bd68a64efb2b52b386f37c44..c9a40f81be8e19aa293366cf16482021cc3a3249 100644 (file)
@@ -337,7 +337,7 @@ struct parm_struct parm_table[] = {
                .label          = "realm",
                .type           = P_STRING,
                .p_class        = P_GLOBAL,
-               .offset         = GLOBAL_VAR(realm_original),
+               .offset         = GLOBAL_VAR(realm),
                .special        = handle_realm,
                .enum_list      = NULL,
        },