From 71e9c6e48b57f568b04eb829511492aff41745b9 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 4 Nov 2019 19:27:41 +0100 Subject: [PATCH] smbdotconf: mark "ldap group 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/ldapgroupsuffix.xml | 1 + source3/param/loadparm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs-xml/smbdotconf/ldap/ldapgroupsuffix.xml b/docs-xml/smbdotconf/ldap/ldapgroupsuffix.xml index 7de0fac169e..adcf471a333 100644 --- a/docs-xml/smbdotconf/ldap/ldapgroupsuffix.xml +++ b/docs-xml/smbdotconf/ldap/ldapgroupsuffix.xml @@ -2,6 +2,7 @@ context="G" type="string" function="_ldap_group_suffix" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> This parameter specifies the suffix that is diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5c0adb6f4d6..984c048001f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2612,7 +2612,7 @@ const char *lp_ldap_group_suffix(TALLOC_CTX *ctx) if (Globals._ldap_group_suffix[0]) return append_ldap_suffix(ctx, Globals._ldap_group_suffix); - return lp_string(ctx, Globals.ldap_suffix); + return talloc_strdup(ctx, Globals.ldap_suffix); } const char *lp_ldap_idmap_suffix(TALLOC_CTX *ctx) -- 2.47.3