smbdotconf: mark "ldap user suffix" with constant="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 18:27:41 +0000 (19:27 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:37 +0000 (10:25 +0000)
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 <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/ldap/ldapusersuffix.xml
source3/param/loadparm.c

index 8e6b8a340e4af9529023732ffc0a4ccf5c08783f..85bece3601f36a66b4b0863b2256142d2328c46a 100644 (file)
@@ -2,6 +2,7 @@
                  context="G"
                  type="string"
                  function="_ldap_user_suffix"
+                 constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index d3b503e32979ea06c1366fc4ca9e561a2abc9cb0..0249c7f2b747ed9b281849ceb94ae5b09e312f3a 100644 (file)
@@ -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)