Issue 7935 - fails to convert slapd.conf including schema with "+" in name
Summary: fails to convert slapd.conf including schema with "+" in name
Status: RESOLVED PARTIAL
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: documentation (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-08 18:03 UTC by Ryan Tandy
Modified: 2014-09-09 15:56 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 Ryan Tandy 2014-09-08 18:03:42 UTC
Full_Name: Ryan Tandy
Version: master, RE24
OS: Debian
URL: 
Submission from: (NULL) (24.68.121.206)


Hi,

Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603544

Steps to reproduce:

ln -s /usr/local/etc/openldap/schema/core.schema core+test.schema
echo 'include ./core+test.schema' > slapd.conf
A0Amkdir slapd.d
slaptest -f slapd.conf -F slapd.d

Before commit d1b38bd ("ITS#6967 normalize schema RDN"), this fails with:

config_build_entry: build "cn={0}core+test" failed: "(null)"
backend_startup_one (type=config, suffix="cn=config"): bi_db_open failed! (-1)

but slapd still works if running with slapd.conf only (-F omitted).

After that commit, slaptest and slapd both crash shortly after rdnNormalize at
bconfig.c:6841. rdnNormalize() fails because the constructed DN is not valid,
but its return value is not checked.

It would be really nice if it would automatically escape or replace
inappropriate characters in the filename, but I'll understand if that's asking
too much. :)

(Alternatively, if there are restrictions on what is considered a valid schema
filename, please document them.)
Comment 1 Quanah Gibson-Mount 2014-09-08 20:27:40 UTC
changed notes
moved from Incoming to Documentation
Comment 2 Quanah Gibson-Mount 2014-09-08 20:27:54 UTC
changed notes
Comment 3 Quanah Gibson-Mount 2014-09-08 20:30:28 UTC
--On Monday, September 08, 2014 7:03 PM +0000 ryan@nardis.ca wrote:

> Full_Name: Ryan Tandy
> Version: master, RE24
> OS: Debian
> URL:
> Submission from: (NULL) (24.68.121.206)
>
>
> Hi,
>
> Debian bug report:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603544

Schema filenames should only be alphanumeric.  Noted to update the 
documentation with this restriction.

--Quanah

--

Quanah Gibson-Mount
Server Architect
Zimbra, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Comment 4 Ryan Tandy 2014-09-08 22:18:06 UTC
On 08/09/14 01:30 PM, quanah@zimbra.com wrote:
> Schema filenames should only be alphanumeric.  Noted to update the
> documentation with this restriction.

OK, noted. Even so, please consider a change along the lines of 
<http://paste.debian.net/119969/>, just to avoid crashing on an 
inappropriate filename.

Comment 5 Howard Chu 2014-09-09 13:41:56 UTC
ryan@nardis.ca wrote:
> On 08/09/14 01:30 PM, quanah@zimbra.com wrote:
>> Schema filenames should only be alphanumeric.  Noted to update the
>> documentation with this restriction.
>
> OK, noted. Even so, please consider a change along the lines of
> <http://paste.debian.net/119969/>, just to avoid crashing on an
> inappropriate filename.

Patched in master, thanks.

-- 
   -- 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 6 OpenLDAP project 2014-09-09 15:56:00 UTC
Schema filenames should only be alphanumeric
Crasher fixed in head, RE25, RE24
Documentation still needs updating.
Comment 7 Quanah Gibson-Mount 2014-09-09 15:56:00 UTC
changed notes
changed state Open to Partial