From aleksey.kamensky@gmail.com Fri Sep 22 09:09:38 2017 From: aleksey.kamensky@gmail.com To: openldap-bugs@openldap.org Subject: Re: (ITS#8737) LMDB allows creation of multiple databases in same directory Date: Fri, 22 Sep 2017 09:09:36 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4786055067603130104==" --===============4786055067603130104== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable --94eb2c075988d198060559c39077 Content-Type: text/plain; charset=3D"UTF-8" On Wed, Sep 20, 2017 at 7:28 PM, Howard Chu wrote: > aleksey.kamensky(a)gmail.com wrote: > >> Full_Name: Alexey Kamenskiy >> Version: 2.4.45 >> OS: CentOS Linux release 7.3.1611 (Core) >> URL: ftp://ftp.openldap.org/incoming/ >> Submission from: (NULL) (220.248.35.50) >> >> >> Setting up fresh 2.4.45 with MDB noticed that MDB does allow to create >> multiple >> databases in the same directory (noticed by mistake of creating multiple >> MDBs in >> default /var/lib/ldap). >> >> It shows no error and no any warning. After this ALL of the databases are >> writeable and readable. On reading the results returned for all 3 >> databases (and >> not for the DIT specified in ldapsearch -b). >> > > None of the other backends protect from this either. (Nor can they, since > any individual backend doesn't know anything about any other backend's > configuration.) Not a bug. You are right that other backends (I am talking here hdb/bdb) do not explicitly check for this, but those backends will produce error on attempt to read/write into database created in the directory where DB already exists. LMDB just works in this case and returns bad results if try to read. Even if not intentionally those errors serve as a reminder that one should not create two DBs in same directory. And on the other hand saying "not an issue because no one else does it this way" is not a good approach IMO as it only stimulates copying and does not help those offering improvements. --94eb2c075988d198060559c39077 Content-Type: text/html; charset=3D"UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Sep 20, 2017 at 7:28 PM, Howard Chu <hyc(a)symas.com> =3D wrote:
aleksey.kamensky(a)gmail.com wrote:
Full_Name: Alexey Kamenskiy
Version: 2.4.45
OS: CentOS Linux release 7.3.1611 (Core)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (220.248.35.50)


Setting up fresh 2.4.45 with MDB noticed that MDB does allow to create mult=3D iple
databases in the same directory (noticed by mistake of creating multiple MD=3D Bs in
default /var/lib/ldap).

It shows no error and no any warning. After this ALL of the databases are writeable and readable. On reading the results returned for all 3 databases=3D (and
not for the DIT specified in ldapsearch -b).

None of the other backends protect from this either. (Nor can they, since a=3D ny individual backend doesn't know anything about any other backend'=3D ;s configuration.) Not a bug.

You are right=3D that other backends (I am talking here hdb/bdb) do not explicitly check fo=3D r this, but those backends will produce error on attempt to read/write into=3D database created in the directory where DB already exists. LMDB just works=3D in this case and returns bad results if try to read.

<=3D div>Even if not intentionally those errors serve as a reminder that one sho=3D uld not create two DBs in same directory.

And on t=3D he other hand saying "not an issue because no one else does it this wa=3D y" is not a good approach IMO as it only stimulates copying and does n=3D ot help those offering improvements.
=3DC2=3DA0
--94eb2c075988d198060559c39077-- --===============4786055067603130104==--