]> git.samba.org - bbaumbach/samba-autobuild/.git/commitdiff
smbdotconf: mark "ldap group 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:36 +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/ldapgroupsuffix.xml
source3/param/loadparm.c

index 7de0fac169e585e83134f297886974077069d41e..adcf471a33399ef2b6d9e74717f9f841ca2d51fd 100644 (file)
@@ -2,6 +2,7 @@
                  context="G"
                  type="string"
                  function="_ldap_group_suffix"
+                 constant="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>This parameter specifies the suffix that is 
index 5c0adb6f4d61ec1823ecfaefe08554c659c809a8..984c048001ff64611a3b29d42b35740472e22df5 100644 (file)
@@ -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)