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

Re: Parsing of *.conf files



Don't forget that strtok_quote() is in two config.c files. One
in SLAPD and one in SLURPD.

--
-
J. R. Heisey

Hallvard B Furuseth wrote:

> JR Heisey writes:
>
> > I have discovered a parsing error when a DN contains a value which
> > contains a comma.
>
> Thanks.  Fix committed to openldap-devel.
>
> > 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.
>
>         diff -u2 old-file new-file
> or      diff -c2 old-file new-file
> or if you got the source from CVS,
>         cvs diff { -u2 or -c2 } filename
>
> The '2' means to output 2 lines of context around each change, which is
> my personal preferrence.  The default is 3 lines.
>
> >      case '\\':
> >          SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1
> > );
> > +        next++; // skip by the escaped character
> >          break;
>
> It needs to check if \ is followed by a null character as well:
>
>         case '\\':
> -           SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
> +           if ( next[1] ) {
> +               SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
> +               next++;         /* skip the escaped character */
> +           }
>             break;
>
> --
> Hallvard


begin:vcard 
n:Heisey;J.R.
tel;fax:408-248-8552
tel;work:408-248-9495 x117
x-mozilla-html:FALSE
url:www.mediagate.com
org:MediaGate Inc.
adr:;;1245 S. Winchester Blvd.;San Jose;CA;95128;USA
version:2.1
email;internet:jr.heisey@mediagate.com
title:Sr. Foundation Engineer
note:Currently working on LDAP client software.
end:vcard