Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31095/ldapserver/ldap/ldif
Modified Files: template-dse.ldif.in template.ldif Added Files: template-baseacis.ldif.in template-country.ldif.in template-domain.ldif.in template-locality.ldif.in template-org.ldif.in template-orgunit.ldif.in template-state.ldif.in Log Message: Resolves: bug 248145 Bug Description: Replace ds_newinst binary with perl script Reviewed by: nhosoi (Thanks!) Fix Description: The time has come. We can finally get rid of the instance creation C code once and for all. I've created a DSCreate module that has all of the functionality of the old create_instance.c code, along with a few items from ldap/admin/lib. The way it works is this: it first creates the dse.ldif file using template-dse.ldif and the suffix-db template to create the initial db and suffix. It then adds additional optional configuration depending on what optional features have been enabled. It creates other config files and copies in the schema. It then initializes the database. It uses a template file based on the type of entry implied by the suffix, then adds the default ACIs. If the user chose to do so, it will also create the ou=people, ou=groups, etc. entries. The user can also supply an LDIF file which will be used to populate the initial database, in which case none of the default entries or ACIs will be used. It then starts the server (if desired). I had to create a function makePaths that works like mkdir -p except that it will chown, chgrp, and chmod all paths created. I had to change the other places where instance creation was called to use the new calling semantics. ds_create changed quite a bit, since it can just use an Inf to pass in the information instead of calling ds_newinst as a CGI program. I had to change FileConn to add support for namingContexts (i.e. entries with no parent), and to have it write each change each time, and to return copies of entries when searching, to avoid modifying the tree in place. This makes it act much more like LDAP. I found and fixed a few bugs in Migration along the way that were revealed while integrating the new DSCreate code. Platforms tested: RHEL4, FC6 Flag Day: Yes. New instance creation code and autotool changes. Doc impact: no
--- NEW FILE template-baseacis.ldif.in --- dn: %ds_suffix% changetype: modify add: aci aci: (targetattr!="userPassword")(version 3.0; acl "Enable anonymous access"; allow (read, search, compare) userdn="ldap:///anyone";) aci: (targetattr="carLicense || description || displayName || facsimileTelephoneNumber || homePhone || homePostalAddress || initials || jpegPhoto || labeledURL || mail || mobile || pager || photo || postOfficeBox || postalAddress || postalCode || preferredDeliveryMethod || preferredLanguage || registeredAddress || roomNumber || secretary || seeAlso || st || street || telephoneNumber || telexNumber || title || userCertificate || userPassword || userSMIMECertificate || x500UniqueIdentifier")(version 3.0; acl "Enable self write for common attributes"; allow (write) userdn="ldap:///self";)
--- NEW FILE template-country.ldif.in --- dn: %ds_suffix% objectclass: top objectclass: country c: %naming_value%
--- NEW FILE template-domain.ldif.in --- dn: %ds_suffix% objectclass: top objectclass: domain dc: %naming_value%
--- NEW FILE template-locality.ldif.in --- dn: %ds_suffix% objectclass: top objectclass: locality l: %naming_value%
--- NEW FILE template-org.ldif.in --- dn: %ds_suffix% objectclass: top objectclass: organization o: %naming_value%
--- NEW FILE template-orgunit.ldif.in --- dn: %ds_suffix% objectclass: top objectclass: organizationalUnit ou: %naming_value%
--- NEW FILE template-state.ldif.in --- dn: %ds_suffix% objectclass: top objectclass: locality st: %naming_value%
Index: template-dse.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- template-dse.ldif.in 29 Jun 2007 21:59:13 -0000 1.2 +++ template-dse.ldif.in 13 Jul 2007 18:35:33 -0000 1.3 @@ -9,7 +9,7 @@ nsslapd-certdir: %cert_dir% nsslapd-ldifdir: %ldif_dir% nsslapd-bakdir: %bak_dir% -nsslapd-saslpath: %sasl_path% +nsslapd-instancedir: %inst_dir% nsslapd-accesslog-logging-enabled: on nsslapd-accesslog-maxlogsperdir: 10 nsslapd-accesslog-mode: 600 @@ -22,7 +22,7 @@ nsslapd-accesslog: %log_dir%/access nsslapd-enquote-sup-oc: off nsslapd-localhost: %fqdn% -nsslapd-schemacheck: 1 +nsslapd-schemacheck: on nsslapd-rewrite-rfc1274: off nsslapd-return-exact-case: on nsslapd-ssl-check-hostname: on @@ -493,7 +493,7 @@ nsslapd-plugininitfunc: orderingRule_init nsslapd-plugintype: matchingRule nsslapd-pluginenabled: on -nsslapd-pluginarg0: @configdir@/slapd-collations.conf +nsslapd-pluginarg0: %config_dir%/slapd-collations.conf
dn: cn=HTTP Client,cn=plugins,cn=config objectclass: top
Index: template.ldif =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template.ldif,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- template.ldif 18 Apr 2006 17:39:57 -0000 1.5 +++ template.ldif 13 Jul 2007 18:35:33 -0000 1.6 @@ -37,26 +37,24 @@ # All rights reserved. # END COPYRIGHT BLOCK # -dn: %%%SUFFIX%%% -objectclass: top -aci: (targetattr ="*")(version 3.0; - acl "Configuration Administrators Group";allow (all) (groupdn = "ldap:/// - cn=Configuration Administrators, ou=Groups, ou=TopologyManagement, o=NetscapeRoot");) +dn: %ds_suffix% +changetype: modify +add: aci aci: (targetattr ="*")(version 3.0; acl "Directory Administrators Group";allow (all) (groupdn = "ldap:/// - cn=Directory Administrators, %%%SUFFIX%%%");) + cn=Directory Administrators, %ds_suffix%");)
-dn: cn=Directory Administrators, %%%SUFFIX%%% +dn: cn=Directory Administrators, %ds_suffix% objectClass: top objectClass: groupofuniquenames cn: Directory Administrators
-dn: ou=Groups, %%%SUFFIX%%% +dn: ou=Groups, %ds_suffix% objectclass: top objectclass: organizationalunit ou: Groups
-dn: ou=People, %%%SUFFIX%%% +dn: ou=People, %ds_suffix% objectclass: top objectclass: organizationalunit ou: People @@ -66,48 +64,48 @@ aci: (targetattr !="cn || sn || uid")(t argetfilter ="(ou=Accounting)")(version 3.0;acl "Accounting Managers G roup Permissions";allow (write)(groupdn = "ldap:///cn=Accounting Managers,ou - =groups,%%%SUFFIX%%%");) + =groups,%ds_suffix%");) aci: (targetattr !="cn || sn || uid")(t argetfilter ="(ou=Human Resources)")(version 3.0;acl "HR Group Permiss - ions";allow (write)(groupdn = "ldap:///cn=HR Managers,ou=groups,%%%SUFFIX%%% + ions";allow (write)(groupdn = "ldap:///cn=HR Managers,ou=groups,%ds_suffix% ");) aci: (targetattr !="cn ||sn || uid")(t argetfilter ="(ou=Product Testing)")(version 3.0;acl "QA Group Permiss - ions";allow (write)(groupdn = "ldap:///cn=QA Managers,ou=groups,%%%SUFFIX%%% + ions";allow (write)(groupdn = "ldap:///cn=QA Managers,ou=groups,%ds_suffix% ");) aci: (targetattr !="cn || sn || uid")(t argetfilter ="(ou=Product Development)")(version 3.0;acl "Engineering Group Permissions";allow (write)(groupdn = "ldap:///cn=PD Managers,ou=groups - ,%%%SUFFIX%%%");) + ,%ds_suffix%");)
-dn: ou=Special Users,%%%SUFFIX%%% +dn: ou=Special Users,%ds_suffix% objectclass: top objectclass: organizationalUnit ou: Special Users description: Special Administrative Accounts
-dn: cn=Accounting Managers,ou=groups,%%%SUFFIX%%% +dn: cn=Accounting Managers,ou=groups,%ds_suffix% objectclass: top objectclass: groupOfUniqueNames cn: Accounting Managers ou: groups description: People who can manage accounting entries
-dn: cn=HR Managers,ou=groups,%%%SUFFIX%%% +dn: cn=HR Managers,ou=groups,%ds_suffix% objectclass: top objectclass: groupOfUniqueNames cn: HR Managers ou: groups description: People who can manage HR entries
-dn: cn=QA Managers,ou=groups,%%%SUFFIX%%% +dn: cn=QA Managers,ou=groups,%ds_suffix% objectclass: top objectclass: groupOfUniqueNames cn: QA Managers ou: groups description: People who can manage QA entries
-dn: cn=PD Managers,ou=groups,%%%SUFFIX%%% +dn: cn=PD Managers,ou=groups,%ds_suffix% objectclass: top objectclass: groupOfUniqueNames cn: PD Managers
389-commits@lists.fedoraproject.org