[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapadd -u (dryrun) option does write database



Hallvard B Furuseth wrote:

`slapadd -u ldif.file' opens database files for writing (be_entry_open,
be_entry_close) and updates its NEXTID file (be_sync).  So we can't just
test an LDIF file with `slapadd -u' before creating a diff against an
LDIF from the current database and feeding that to ldapmodify.  We have
to make a slapd.conf copy with a dummy database directory first.

Looks like a bug to me, but it's deliberate according to the CVS log.
Why?

 servers/slapd/tools/Attic/slapadd.c rev 1.40, Jan 28 2002, by ando:

Check the ldif file without actually creating the db (but inits the
files; maybe I should trim this also). Useful to check LARGE ldif
files which will require TONS on indices without failing at the very
last entry for a silly typo after 45 min. or more :)


I was not aware of this drawback; anyway, this is intended because (at least
at that time) there was no way slapadd could be easily hacked to operate
without an underlying DB.  I'll rework that, and I suggest that in the
meanwhile this option be disabled.  I'll commit a fix in a while.

Ciao, p.




SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497