smbdotconf: mark "ldap machine 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/ldapmachinesuffix.xml
source3/param/loadparm.c

index e82675b1e4fd26b30292986ca7a9bb4644dbb6bb..22f66a8a0eb50dec4705b5bb7be94ddaedfba89b 100644 (file)
@@ -2,6 +2,7 @@
                  context="G"
                  type="string"
                  function="_ldap_machine_suffix"
+                 constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 
 <description>
index 0c212ab5fe5043fee10104751b5d00fe79d12a9c..d3b503e32979ea06c1366fc4ca9e561a2abc9cb0 100644 (file)
@@ -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)