From: Ralph Boehme Date: Mon, 4 Nov 2019 18:27:41 +0000 (+0100) Subject: smbdotconf: mark "ldap user suffix" with constant="1" X-Git-Tag: ldb-2.1.0~515 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f618b7c95830b73ac636032e136b11c957139be;p=thirdparty%2Fsamba.git smbdotconf: mark "ldap user 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/ldapusersuffix.xml b/docs-xml/smbdotconf/ldap/ldapusersuffix.xml index 8e6b8a340e4..85bece3601f 100644 --- a/docs-xml/smbdotconf/ldap/ldapusersuffix.xml +++ b/docs-xml/smbdotconf/ldap/ldapusersuffix.xml @@ -2,6 +2,7 @@ context="G" type="string" function="_ldap_user_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 d3b503e3297..0249c7f2b74 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2604,7 +2604,7 @@ const char *lp_ldap_user_suffix(TALLOC_CTX *ctx) if (Globals._ldap_user_suffix[0]) return append_ldap_suffix(ctx, Globals._ldap_user_suffix); - return lp_string(ctx, Globals.ldap_suffix); + return talloc_strdup(ctx, Globals.ldap_suffix); } const char *lp_ldap_group_suffix(TALLOC_CTX *ctx)