From dfa62cfa989f29138818fd4badf213fb35e8b48e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 13 Sep 2006 11:40:21 +0000 Subject: r18464: Solaris has LDAP_SCOPE_ONELEVEL. Linux seems to have it as well. Fix a C++ compat warning. Volker (This used to be commit 351e583f66714562eca1f40429bfee70f06d281c) --- source3/libads/ldap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 57275dda55..7ea605df60 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -2925,13 +2925,14 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname) ads_memfree(ads, hostnameDN); if (rc != LDAP_SUCCESS) { const char *attrs[] = { "cn", NULL }; - void *msg_sub; + LDAPMessage *msg_sub; /* we only search with scope ONE, we do not expect any further * objects to be created deeper */ - status = ads_do_search_retry(ads, hostnameDN, LDAP_SCOPE_ONE, - "(objectclass=*)", attrs, &res); + status = ads_do_search_retry(ads, hostnameDN, + LDAP_SCOPE_ONELEVEL, + "(objectclass=*)", attrs, &res); if (!ADS_ERR_OK(status)) { SAFE_FREE(host); @@ -2963,8 +2964,9 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname) } /* there should be no subordinate objects anymore */ - status = ads_do_search_retry(ads, hostnameDN, LDAP_SCOPE_ONE, - "(objectclass=*)", attrs, &res); + status = ads_do_search_retry(ads, hostnameDN, + LDAP_SCOPE_ONELEVEL, + "(objectclass=*)", attrs, &res); if (!ADS_ERR_OK(status) || ( (ads_count_replies(ads, res)) > 0 ) ) { SAFE_FREE(host); -- cgit