Print this page
NEX-14547 Get UNIX group info. from AD/LDAP with partial RFC2307 schema
NEX-13132 smbd dumping core in nss_ldap.so.1`getbymember
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libldap5/sources/ldap/common/search.c
          +++ new/usr/src/lib/libldap5/sources/ldap/common/search.c
   1    1  /*
   2    2   * Copyright 2001-2002 Sun Microsystems, Inc.  All rights reserved.
   3    3   * Use is subject to license terms.
        4 + *
        5 + * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
   4    6   */
   5    7  
   6      -#pragma ident   "%Z%%M% %I%     %E% SMI"
   7    8  
   8      -
   9    9  /*
  10   10   * The contents of this file are subject to the Netscape Public
  11   11   * License Version 1.1 (the "License"); you may not use this file
  12   12   * except in compliance with the License. You may obtain a copy of
  13   13   * the License at http://www.mozilla.org/NPL/
  14   14   *
  15   15   * Software distributed under the License is distributed on an "AS
  16   16   * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  17   17   * implied. See the License for the specific language governing
  18   18   * rights and limitations under the License.
↓ open down ↓ 779 lines elided ↑ open up ↑
 798  798  static int
 799  799  unescape_filterval( char *val )
 800  800  {
 801  801          int     escape, firstdigit, ival; 
 802  802          char    *s, *d;
 803  803  
 804  804          escape = 0;
 805  805          for ( s = d = val; *s; s++ ) {
 806  806                  if ( escape ) {
 807  807                          /*
      808 +                         * need to leave escaped comma as-is, i.e.
      809 +                         * val="CN=Last\, First,OU=..."
      810 +                         */
      811 +                        if (*s == ',') {
      812 +                                *d++ = '\\';
      813 +                                *d++ = *s;
      814 +                                escape = 0;
      815 +                                continue;
      816 +                        }
      817 +                        /*
 808  818                           * first try LDAPv3 escape (hexadecimal) sequence
 809  819                           */
 810  820                          if (( ival = hexchar2int( *s )) < 0 ) {
 811  821                                  if ( firstdigit ) {
 812  822                                          /*
 813  823                                           * LDAPv2 (RFC1960) escape sequence
 814  824                                           */
 815  825                                          *d++ = *s;
 816  826                                          escape = 0;
 817  827                                  } else {
↓ open down ↓ 202 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX