Make a seperate template for the refint configuration too
authorAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jul 2008 08:58:56 +0000 (18:58 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jul 2008 08:58:56 +0000 (18:58 +1000)
source/scripting/python/samba/provision.py
source/setup/refint.conf [new file with mode: 0644]
source/setup/slapd.conf

index 301c6ef728562568ac6e3b5feab9bdf751ee6c2b..6eb47c8595d3bf656c172eb432512fea7f407296 100644 (file)
@@ -1264,8 +1264,8 @@ def provision_backend(setup_dir=None, message=None,
                                                      { "MEMBER_ATTR" : str(res[i]["lDAPDisplayName"][0]),
                                                        "MEMBEROF_ATTR" : str(target) })
 
-        memberof_config += """overlay refint
-refint_attributes""" + refint_attributes
+        refint_config = read_and_sub_file(setup_path("refint.conf"),
+                                            { "LINK_ATTRS" : refint_attributes})
     
         setup_file(setup_path("slapd.conf"), paths.slapdconf,
                    {"DNSDOMAIN": names.dnsdomain,
@@ -1273,7 +1273,8 @@ refint_attributes""" + refint_attributes
                     "DOMAINDN": names.domaindn,
                     "CONFIGDN": names.configdn,
                     "SCHEMADN": names.schemadn,
-                    "MEMBEROF_CONFIG": memberof_config})
+                    "MEMBEROF_CONFIG": memberof_config,
+                    "REFINT_CONFIG": refint_config})
         setup_file(setup_path("modules.conf"), paths.modulesconf,
                    {"REALM": names.realm})
         
diff --git a/source/setup/refint.conf b/source/setup/refint.conf
new file mode 100644 (file)
index 0000000..a3a7d3e
--- /dev/null
@@ -0,0 +1,3 @@
+overlay refint
+refint_modifiersName cn=samba-admin,cn=samba
+refint_attributes ${LINK_ATTRS}
index 68e494c27dc32819b8f59c8b599fb45dd1a1bb38..495847f7fe936888073fb79a4e6af053937da2bc 100644 (file)
@@ -40,6 +40,8 @@ include ${LDAPDIR}/modules.conf
 
 defaultsearchbase ${DOMAINDN}
 
+${REFINT_CONFIG}
+
 ${MEMBEROF_CONFIG}
 
 database       ldif