summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-09-13 11:40:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:42 -0500
commitdfa62cfa989f29138818fd4badf213fb35e8b48e (patch)
treeb5e27dec85b76b39728da1c8a9d0fd97f34d00cc
parent1d71f023bb4a363637b58a126140c0a5d9c9ea88 (diff)
downloadsamba-dfa62cfa989f29138818fd4badf213fb35e8b48e.tar.gz
samba-dfa62cfa989f29138818fd4badf213fb35e8b48e.tar.bz2
samba-dfa62cfa989f29138818fd4badf213fb35e8b48e.zip
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)
-rw-r--r--source3/libads/ldap.c12
1 files 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);