`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 :)