]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "ldap idmap 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/ldapidmapsuffix.xml
source3/param/loadparm.c

index 1fe7e8ae3889a76f9764a98a5882d9830b3b2a5f..2690af83779b1b6ec240bff306044f7abe79849b 100644 (file)
@@ -2,6 +2,7 @@
                  context="G"
                  type="string"
                  function="_ldap_idmap_suffix"
+                 constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index 984c048001ff64611a3b29d42b35740472e22df5..0c212ab5fe5043fee10104751b5d00fe79d12a9c 100644 (file)
@@ -2620,7 +2620,7 @@ const char *lp_ldap_idmap_suffix(TALLOC_CTX *ctx)
        if (Globals._ldap_idmap_suffix[0])
                return append_ldap_suffix(ctx, Globals._ldap_idmap_suffix);
 
-       return lp_string(ctx, Globals.ldap_suffix);
+       return talloc_strdup(ctx, Globals.ldap_suffix);
 }
 
 /**