Issue 4651 - slapd fails parsing valid slapd.conf
Summary: slapd fails parsing valid slapd.conf
Status: VERIFIED FIXED
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: 2006-08-25 17:15 UTC by tmccubbin@crtllc.com
Modified: 2014-08-01 21:06 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 tmccubbin@crtllc.com 2006-08-25 17:15:11 UTC
Full_Name: Tom McCubbin
Version: 2.3.27 and prior
OS: solaris 10 x86
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (204.252.104.5)


On solaris (& likely BSD) slapd can't handle slapd.conf lines which are greater
than 1024 chars in width.  This stems from the issue that unlike in the gnu libc
stdio which defines BUFSIZ as 8k, sun and bsd uses a BUFSIZ of 1k.

this is causing Hula (http://www.hula-project.org) to fail on solaris beacuse
the schema used has a MAY (...) clause which exceeds the 1024 bufsize.

I have tracked the problem to the following location:

openldap-2.3.27/servers/slapd/config.c

    a static char buffer w/ size BUFSIZ is allocated (buf[BUFSIZ]) and used when
reading lines from the slapd.conf config file.  This should be
changed/corrected.

I have added a simple redef of BUFSIZ in config.c for the time being.

Comment 1 Kurt Zeilenga 2006-08-25 17:42:08 UTC
moved from Incoming to Software Bugs
Comment 2 Kurt Zeilenga 2006-08-25 18:05:39 UTC
changed notes
changed state Open to Test
Comment 3 Kurt Zeilenga 2006-08-25 19:03:54 UTC
I have made a few commits to HEAD to address this issue.
The slapd.conf(5) physical line length is now determined by
LINE_MAX, which by POSIX, should be at least 2048 characters.
I've also updated the slapd.conf(5) manual page to note
that no physical line should be longer than 2000 characters.
slapd.conf(5) containing long physical lines (BUFSIZ before,
2000 now) are not considered valid.

I recommend continuation lines be used well before
approach the (past or current) physical line limit.

-- Kurt

At 10:15 AM 8/25/2006, tmccubbin@crtllc.com wrote:
>Full_Name: Tom McCubbin
>Version: 2.3.27 and prior
>OS: solaris 10 x86
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (204.252.104.5)
>
>
>On solaris (& likely BSD) slapd can't handle slapd.conf lines which are greater
>than 1024 chars in width.  This stems from the issue that unlike in the gnu libc
>stdio which defines BUFSIZ as 8k, sun and bsd uses a BUFSIZ of 1k.
>
>this is causing Hula (http://www.hula-project.org) to fail on solaris beacuse
>the schema used has a MAY (...) clause which exceeds the 1024 bufsize.
>
>I have tracked the problem to the following location:
>
>openldap-2.3.27/servers/slapd/config.c
>
>    a static char buffer w/ size BUFSIZ is allocated (buf[BUFSIZ]) and used when
>reading lines from the slapd.conf config file.  This should be
>changed/corrected.
>
>I have added a simple redef of BUFSIZ in config.c for the time being.

Comment 4 Kurt Zeilenga 2006-10-20 16:51:08 UTC
changed notes
changed state Test to Release
Comment 5 Kurt Zeilenga 2006-10-20 19:13:48 UTC
changed state Release to Closed
Comment 6 Howard Chu 2009-02-17 05:18:47 UTC
moved from Software Bugs to Archive.Software Bugs
Comment 7 OpenLDAP project 2014-08-01 21:06:45 UTC
Fix in HEAD/re23/re24 (use LINE_MAX instead).