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

Parsing of *.conf files

I have discovered a parsing error when a DN contains a value
which contains a comma. When excaping the comma or quoting
the value in the .conf file the escaped character is then processed
as if it was not excaped. (Note when quoting the value you
must escape the quote characters because they are contained with
the quoted DN string. I've added one line to the case branch
for a backslash which increments the varaiable 'next'.

example slapd.conf entry

rootdn      "cn=JR Heisey, o=\"Mediagate, Inc.\", c=US"

I don't know much about the Unix tools. I have Cygnus's development
tools but I don't see how to generate the diff output that I've seen
posted to this list.

I will generate an official issue unless someone tells me otherwise.

J. R. Heisey

config.c in ldap\servers\slapd and ldap\servers\slurpd

    strtok_quote( )
     case '\\':
         SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
+        next++; // skip by the escaped character

J. R. Heisey

tel;work:408-248-9495 x117
org:MediaGate Inc.
adr:;;1245 S. Winchester Blvd.;San Jose;CA;95128;USA
title:Sr. Foundation Engineer
note:Currently working on LDAP client software.