s3/loadparm: ensure default service options are not changed
authorRalph Boehme <slow@samba.org>
Tue, 21 Nov 2017 13:28:48 +0000 (14:28 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 27 Nov 2017 21:08:17 +0000 (22:08 +0100)
commitea4e6f95ae5c97e8570b8090ee7e7a577b49a8c3
tree2de22473287ee07c2a9f17641bb34e343726bb4a
parent1fc103547023aa1c880713e5b65ec164acb58b54
s3/loadparm: ensure default service options are not changed

Rename sDefault to _sDefault and make it const. sDefault is make a copy
of _sDefault in in the initialisation function lp_load_ex().

As we may end up in setup_lp_context() without going through
lp_load_ex(), sDefault may still be uninitialized at that point, so I'm
initializing lp_ctx->sDefault from _sDefault.

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>
source3/param/loadparm.c