Issue 6000 - slapadd allows to add entry with empty DN
Summary: slapadd allows to add entry with empty DN
Status: VERIFIED SUSPENDED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-05 16:58 UTC by ando@openldap.org
Modified: 2021-08-03 17:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ando@openldap.org 2009-03-05 16:58:57 UTC
Full_Name: Pierangelo Masarati
Version: HEAD/re24
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.72.89.40)
Submitted by: ando


When slapd is configured to host a database with empty suffix (""), an entry
with empty DN can be slapadd'ed, but not ldapadd'ed.  I believe the latter
behavior is appropriate, while the former should be denied.

p.
Comment 1 Howard Chu 2009-03-05 17:08:18 UTC
ando@sys-net.it wrote:
> Full_Name: Pierangelo Masarati
> Version: HEAD/re24
> OS: irrelevant
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (81.72.89.40)
> Submitted by: ando
>
>
> When slapd is configured to host a database with empty suffix (""), an entry
> with empty DN can be slapadd'ed, but not ldapadd'ed.  I believe the latter
> behavior is appropriate, while the former should be denied.

No, you need to be able to slapadd the context entry, in particular to restore 
a contextCSN.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Quanah Gibson-Mount 2009-03-05 17:08:45 UTC
--On Thursday, March 05, 2009 4:58 PM +0000 ando@sys-net.it wrote:

> Full_Name: Pierangelo Masarati
> Version: HEAD/re24
> OS: irrelevant
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (81.72.89.40)
> Submitted by: ando
>
>
> When slapd is configured to host a database with empty suffix (""), an
> entry with empty DN can be slapadd'ed, but not ldapadd'ed.  I believe the
> latter behavior is appropriate, while the former should be denied.

I disagree.  When you configure a database with "", and you slapcat it, it 
generates the empty suffix entry, which is used to store the contextCSN for 
replication.  You *must* be able to export it and reload it for 
sync-replication.  For example, from slapcat:

dn:
objectClass: glue
structuralObjectClass: glue
contextCSN: 20060825091501Z#000000#00#000000
entryCSN: 20060825091501Z#000000#00#000000
modifiersName: uid=zimbra,cn=admins,cn=zimbra
modifyTimestamp: 20060825091501Z
entryUUID: 956a60ba-c8a6-102a-86ac-5d3a048562c0
creatorsName: uid=zimbra,cn=admins,cn=zimbra
createTimestamp: 20060825165749Z


--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Comment 3 ando@openldap.org 2009-03-05 17:13:52 UTC
hyc@symas.com wrote:

>> When slapd is configured to host a database with empty suffix (""), an entry
>> with empty DN can be slapadd'ed, but not ldapadd'ed.  I believe the latter
>> behavior is appropriate, while the former should be denied.
> 
> No, you need to be able to slapadd the context entry, in particular to restore 
> a contextCSN.

OK, but then no corresponding add operation can be performed, as far as 
I understand.  I think we should provide a means to allow this 
operation, e.g. with a specific control.

p.


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
-----------------------------------

Comment 4 ando@openldap.org 2009-03-07 10:31:14 UTC
changed notes
changed state Open to Suspended
Comment 5 Howard Chu 2009-07-29 07:38:15 UTC
changed notes
moved from Incoming to Development
Comment 6 OpenLDAP project 2014-08-01 21:05:00 UTC
intended
needs work protocol-side