diff options
Diffstat (limited to 'usr/src/lib/libldap5/sources/ldap/common/search.c')
-rw-r--r-- | usr/src/lib/libldap5/sources/ldap/common/search.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/lib/libldap5/sources/ldap/common/search.c b/usr/src/lib/libldap5/sources/ldap/common/search.c index 1235234f8b..2f4cb166cd 100644 --- a/usr/src/lib/libldap5/sources/ldap/common/search.c +++ b/usr/src/lib/libldap5/sources/ldap/common/search.c @@ -1,10 +1,10 @@ /* * Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2017 Nexenta Systems, Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * The contents of this file are subject to the Netscape Public @@ -805,6 +805,16 @@ unescape_filterval( char *val ) for ( s = d = val; *s; s++ ) { if ( escape ) { /* + * need to leave escaped comma as-is, i.e. + * val="CN=Last\, First,OU=..." + */ + if (*s == ',') { + *d++ = '\\'; + *d++ = *s; + escape = 0; + continue; + } + /* * first try LDAPv3 escape (hexadecimal) sequence */ if (( ival = hexchar2int( *s )) < 0 ) { |