From: Ralph Boehme Date: Mon, 4 Nov 2019 14:11:04 +0000 (+0100) Subject: smbdotconf: mark "auto services" with substitution="1" X-Git-Tag: ldb-2.1.0~559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e8d600bc6cc12019d986f54d1dd7483a940dacd;p=thirdparty%2Fsamba.git smbdotconf: mark "auto services" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/misc/auto_services.xml b/docs-xml/smbdotconf/misc/auto_services.xml index a7d7f13ffcd..d843d889972 100644 --- a/docs-xml/smbdotconf/misc/auto_services.xml +++ b/docs-xml/smbdotconf/misc/auto_services.xml @@ -1,6 +1,7 @@ preload diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 25cf4eb7785..1919e0bc477 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -3132,13 +3132,15 @@ static bool lpcfg_update(struct loadparm_context *lp_ctx) struct debug_settings settings; int max_protocol, min_protocol; TALLOC_CTX *tmp_ctx; + const struct loadparm_substitution *lp_sub = + lpcfg_noop_substitution(); tmp_ctx = talloc_new(lp_ctx); if (tmp_ctx == NULL) { return false; } - lpcfg_add_auto_services(lp_ctx, lpcfg_auto_services(lp_ctx, tmp_ctx)); + lpcfg_add_auto_services(lp_ctx, lpcfg_auto_services(lp_ctx, lp_sub, tmp_ctx)); if (!lp_ctx->globals->wins_server_list && lp_ctx->globals->we_are_a_wins_server) { lpcfg_do_global_parameter(lp_ctx, "wins server", "127.0.0.1"); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index ccd5d8bd839..5c0adb6f4d6 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3989,7 +3989,9 @@ static bool lp_load_ex(const char *pszFname, } { - char *serv = lp_auto_services(talloc_tos()); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); + char *serv = lp_auto_services(talloc_tos(), lp_sub); lp_add_auto_services(serv); TALLOC_FREE(serv); } diff --git a/source3/printing/load.c b/source3/printing/load.c index 7e25d5a91c7..6a5d4ed97c2 100644 --- a/source3/printing/load.c +++ b/source3/printing/load.c @@ -27,6 +27,8 @@ auto-load some homes and printer services ***************************************************************************/ static void add_auto_printers(void) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); const char *p; int pnum = lp_servicenumber(PRINTERS_NAME); char *str; @@ -40,7 +42,7 @@ static void add_auto_printers(void) if (pnum < 0) return; - auto_serv = lp_auto_services(talloc_tos()); + auto_serv = lp_auto_services(talloc_tos(), lp_sub); str = SMB_STRDUP(auto_serv); TALLOC_FREE(auto_serv); if (str == NULL) {