From 9ed8292a7b2fa08e16e5d98147ecdbe859d85e77 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 4 Nov 2019 19:27:41 +0100 Subject: [PATCH] smbdotconf: mark "ldap machine suffix" with constant="1" Due to the use of append_ldap_suffix() where Globals.ldap_suffix is returned directly, variable substitution isn't supported anyway, so we can just mark this const. Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- docs-xml/smbdotconf/ldap/ldapmachinesuffix.xml | 1 + source3/param/loadparm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs-xml/smbdotconf/ldap/ldapmachinesuffix.xml b/docs-xml/smbdotconf/ldap/ldapmachinesuffix.xml index e82675b1e4f..22f66a8a0eb 100644 --- a/docs-xml/smbdotconf/ldap/ldapmachinesuffix.xml +++ b/docs-xml/smbdotconf/ldap/ldapmachinesuffix.xml @@ -2,6 +2,7 @@ context="G" type="string" function="_ldap_machine_suffix" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0c212ab5fe5..d3b503e3297 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2596,7 +2596,7 @@ const char *lp_ldap_machine_suffix(TALLOC_CTX *ctx) if (Globals._ldap_machine_suffix[0]) return append_ldap_suffix(ctx, Globals._ldap_machine_suffix); - return lp_string(ctx, Globals.ldap_suffix); + return talloc_strdup(ctx, Globals.ldap_suffix); } const char *lp_ldap_user_suffix(TALLOC_CTX *ctx) -- 2.47.3