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

Re: slapadd: which database to open



Hallvard B Furuseth wrote:
Pierangelo Masarati writes:
The inexperienced or incautious user would probably erroneously feel safe when the wrong ldif happens to load in the right, yet unintended database.

I don't quite get it. Which unintended database?

You have "cn=foo" and "cn=bar"; you intend to load "cn=foo"'s LDIF into "cn=foo", but you actually feed "cn=bar"'s LDIF to slapadd. Slapadd succeeds, and you believe you loaded "cn=foo" while you loaded "cn=bar". If an explicit switch must be used, and you feed the wrong LDIF, slapadd errors out (possibly with some explanatory message).


There is only one
database into which any entry will go, based on the DN.

Right. However, slapadd does not behave like that, right now. It always tries to feed database #1 (possibly skipping "cn=Monitor" and any subordinate database).


If you just mean the user slapadds an LDIF he shouldn't have slapadded,
well, though.  The user might do lots of things he didn't intend to,
like accidentally typing rm * instead of rm something*.

rm has noclobber to prevent misuse. slapadd has -b/-n.

Besides, the
slapadd can succeed already since there already is a default database to
try.

Right. I don't quite like that behavior (I don't like defaults, unless they are very intuitive and trivial, and yes, what's intuitive and trivial can be very subjective, so I don't like much defaults)


p.

My favorite approach would be to have slapadd return more sophisticated and useful messages,

That's always good.

With respect to the "smart" behavior Matthew suggests (loading multiple databases within one execution of slapadd), it looks definitely intriguing, but since it quite departs from the current behavior, I'd protect it behind an explicit switch (e.g. -b "", or -n "detect").

If so, I'd prefer -b- and -n-.




Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------