Issue #315 has been updated by Nick Milas.

<pre>
[root@vdev openldap]# cat /usr/local/openldap/etc/openldap/slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /usr/local/openldap/etc/openldap/schema/core.schema
include         /usr/local/openldap/etc/openldap/schema/cosine.schema
include         /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
include         /usr/local/openldap/etc/openldap/schema/nis.schema
include         /usr/local/openldap/etc/openldap/schema/eduperson.schema
include         /usr/local/openldap/etc/openldap/schema/postfix.schema
include         /usr/local/openldap/etc/openldap/schema/dyngroup.schema
include         /usr/local/openldap/etc/openldap/schema/misc.schema
include         /usr/local/openldap/etc/openldap/schema/ppolicy.schema
include         
/usr/local/openldap/etc/openldap/schema/schac-20090326-1.4.0.schema
include         /usr/local/openldap/etc/openldap/schema/dnsdomain2.schema
include         /usr/local/openldap/etc/openldap/schema/proftpd-quota.schema

pidfile         /usr/local/openldap/var/run/slapd.pid
argsfile        /usr/local/openldap/var/run/slapd.args

# Load dynamic backend modules:
modulepath /usr/local/lib

monitoring on

loglevel sync

sizelimit unlimited

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################

database        bdb
suffix          "dc=example,dc=com"
rootdn          "cn=Manager,dc=example,dc=com"

rootpw          secret

########
# ACLs #
########
include /usr/local/openldap/etc/openldap/acl.conf

directory    /usr/local/openldap/var/openldap-data

overlay auditlog
auditlog /usr/local/openldap/var/openldap-data/ldapaudit.log

index   objectClass              eq,pres
index   employeeType             pres,eq
index   cn                       eq,pres,sub
index   sn,givenname             eq,pres,sub
index   mail                     eq,pres,sub
index   uid                      eq,pres
index   ou                       eq,pres
index   mailacceptinggeneralid   eq,pres
index   owner                    eq 
index   entryCSN,entryUUID       eq
index   vacationActive           eq
index   associatedDomain         pres,eq,sub
index   aRecord                  pres,eq,sub
index   aliasInactive            eq

database monitor
access to *
   by dn.exact="cn=Manager,dc=example,dc=com" write
   by * none

# Allow dynamic lists

overlay dynlist
dynlist-attrset nisMailAlias labeledURI
dynlist-attrset groupOfURLs labeledURI member

# Setup Provider - Allow Consumer Sync

overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100
</pre>
----------------------------------------
Bug #315: Bug in initscript when backup option is used
http://tools.lsc-project.org/issues/315

Author: Nick Milas
Status: New
Priority: Normal
Assigned to: 
Category: OpenLDAP init script
Target version: openldap-initscript-1.3


In initscript (v1.2), the file is not created in the right directory and with 
the right name: 

First scenario (default): directory /var/backups/openldap/openldap-data does 
not exit:

[root@vdev openldap-data]# /etc/init.d/slapd backup
slapd[24391]: [INFO] Using /etc/default/slapd for configuration
slapd[24396]: [INFO] Launching OpenLDAP database backup...
-20110504101402.ldifata saved in /var/backups/openldap/openldap-data
[root@vdev openldap-data]# 
[root@vdev openldap-data]# 
[root@vdev openldap-data]# 
[root@vdev openldap-data]# cd 
/var/backups/openldap/openldap-data^M-20110504101402.ldif 
-20110504101402.ldif: Not a directoryldap-data
[root@vdev openldap-data]# cd /var/backups/openldap/openldap-data
-bash: cd: /var/backups/openldap/openldap-data: No such file or directory
[root@vdev openldap-data]# cd /var/backups/openldap/
[root@vdev openldap]# ls -la
total 1152
drwxr-xr-x 2 ldap ldap    4096 May  4 10:14 .
drwxr-xr-x 3 root root    4096 Mar 28 12:11 ..
-rw-r--r-- 1 root root 1163525 May  4 10:14 openldap-data?-20110504101402.ldif

If we manually create the directory openldap-data: 

[root@vdev openldap]# mkdir openldap-data
[root@vdev openldap]# ls -la
total 1156
drwxr-xr-x 3 ldap ldap    4096 May  4 10:16 .
drwxr-xr-x 3 root root    4096 Mar 28 12:11 ..
-rw-r--r-- 1 root root 1163525 May  4 10:14 20110504101402.ldif
drwxr-xr-x 2 root root    4096 May  4 10:16 openldap-data
[root@vdev openldap]# 
[root@vdev openldap]# 
[root@vdev openldap]# /etc/init.d/slapd backup
slapd[24466]: [INFO] Using /etc/default/slapd for configuration
slapd[24471]: [INFO] Launching OpenLDAP database backup...
-20110504101705.ldifata saved in /var/backups/openldap/openldap-data
[root@vdev openldap]# cd openldap-data
[root@vdev openldap-data]# ls -la
total 8
drwxr-xr-x 2 root root 4096 May  4 10:16 .
drwxr-xr-x 3 ldap ldap 4096 May  4 10:17 ..
[root@vdev openldap-data]# cd ..
[root@vdev openldap]# ls -la
total 2300
drwxr-xr-x 3 ldap ldap    4096 May  4 10:17 .
drwxr-xr-x 3 root root    4096 Mar 28 12:11 ..
-rw-r--r-- 1 root root 1163525 May  4 10:14 20110504101402.ldif
drwxr-xr-x 2 root root    4096 May  4 10:16 openldap-data
-rw-r--r-- 1 root root 1163525 May  4 10:17 openldap-data?-20110504101705.ldif

Nick


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________
ltb-dev mailing list
[email protected]
http://lists.ltb-project.org/listinfo/ltb-dev

Reply via email to