From: Ralph Boehme Date: Mon, 4 Nov 2019 18:27:41 +0000 (+0100) Subject: smbdotconf: mark "ldap group suffix" with constant="1" X-Git-Tag: ldb-2.1.0~518 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71e9c6e48b57f568b04eb829511492aff41745b9;p=thirdparty%2Fsamba.git 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 --- 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)