s3/loadparm: allocate a fresh sDefault object per lp_ctx
commit7dc2782ab51feb0ed55ab3ee8fe2b6748c404f3f
authorRalph Boehme <slow@samba.org>
Wed, 22 Nov 2017 10:49:57 +0000 (22 11:49 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 5 Dec 2017 09:34:26 +0000 (5 10:34 +0100)
tree6ecd30a297aff301dbeedc25e3a7d0361f87b52c
parente36b1cedc19c92f8d7c65beb8ece8acb2e1ce632
s3/loadparm: allocate a fresh sDefault object per lp_ctx

This is in preperation of preventing direct access to sDefault in all
places that currently modify it.

As currently s3/loadparm is afaict not accessing lp_ctx->sDefault, but
changes sDefault indirectly through lp_parm_ptr() this change is just a
safety measure to prevent future breakage.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13051

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1fc103547023aa1c880713e5b65ec164acb58b54)
source3/param/loadparm.c