Commit afb520a6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

LDAP_SCOPE SUBORDINATE implementation

parent c7f1759e
......@@ -1229,7 +1229,9 @@ re_encode_request( LDAP *ld,
scope = LDAP_SCOPE_BASE;
break;
case LDAP_SCOPE_SUBTREE:
#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
case LDAP_SCOPE_SUBORDINATE:
#endif
scope = LDAP_SCOPE_SUBTREE;
break;
}
......
......@@ -246,11 +246,13 @@ static int str2scope( const char *p )
} else if ( strcasecmp( p, "subtree" ) == 0 ) {
return LDAP_SCOPE_SUBTREE;
#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
} else if ( strcasecmp( p, "subordinate" ) == 0 ) {
return LDAP_SCOPE_SUBORDINATE;
} else if ( strcasecmp( p, "children" ) == 0 ) {
return LDAP_SCOPE_SUBORDINATE;
#endif
}
return( -1 );
......@@ -350,7 +352,9 @@ char * ldap_url_desc2str( LDAPURLDesc *u )
case LDAP_SCOPE_BASE:
case LDAP_SCOPE_ONELEVEL:
case LDAP_SCOPE_SUBTREE:
#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
case LDAP_SCOPE_SUBORDINATE:
#endif
len += sizeof("subordinate");
if( !sep ) sep = 3;
break;
......@@ -420,10 +424,12 @@ char * ldap_url_desc2str( LDAPURLDesc *u )
strcpy( &s[sofar], "sub" );
sofar += sizeof("sub") - 1;
break;
#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
case LDAP_SCOPE_SUBORDINATE:
strcpy( &s[sofar], "children" );
sofar += sizeof("children") - 1;
break;
#endif
}
if( sep < 4 ) goto done;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment