trying to get HEAD building again. If you want the code
[gd/samba-autobuild/.git] / source3 / libads / ads_ldap.c
index 97f12de0f7f82be6a7084dbcf1cb6f62105a44ac..dcceaaeb8351201183f1496f8363649864d172a5 100644 (file)
@@ -34,7 +34,7 @@ NTSTATUS ads_name_to_sid(ADS_STRUCT *ads,
        int count;
        ADS_STATUS rc;
        void *res = NULL;
-       char *exp;
+       char *ldap_exp;
        uint32 t;
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
        char *escaped_name = escape_ldap_string_alloc(name);
@@ -45,15 +45,15 @@ NTSTATUS ads_name_to_sid(ADS_STRUCT *ads,
                goto done;
        }
 
-       if (asprintf(&exp, "(|(sAMAccountName=%s)(userPrincipalName=%s@%s))", 
+       if (asprintf(&ldap_exp, "(|(sAMAccountName=%s)(userPrincipalName=%s@%s))", 
                     escaped_name, escaped_name, escaped_realm) == -1) {
                DEBUG(1,("ads_name_to_sid: asprintf failed!\n"));
                status = NT_STATUS_NO_MEMORY;
                goto done;
        }
 
-       rc = ads_search_retry(ads, &res, exp, attrs);
-       free(exp);
+       rc = ads_search_retry(ads, &res, ldap_exp, attrs);
+       free(ldap_exp);
        if (!ADS_ERR_OK(rc)) {
                DEBUG(1,("name_to_sid ads_search: %s\n", ads_errstr(rc)));
                goto done;
@@ -102,7 +102,7 @@ NTSTATUS ads_sid_to_name(ADS_STRUCT *ads,
                               "sAMAccountType", NULL};
        ADS_STATUS rc;
        void *msg = NULL;
-       char *exp = NULL;
+       char *ldap_exp = NULL;
        char *sidstr = NULL;
        uint32 atype;
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -113,13 +113,13 @@ NTSTATUS ads_sid_to_name(ADS_STRUCT *ads,
                goto done;
        }
 
-       if (asprintf(&exp, "(objectSid=%s)", sidstr) == -1) {
+       if (asprintf(&ldap_exp, "(objectSid=%s)", sidstr) == -1) {
                DEBUG(1,("ads_sid_to_name: asprintf failed!\n"));
                status = NT_STATUS_NO_MEMORY;
                goto done;
        }
 
-       rc = ads_search_retry(ads, &msg, exp, attrs);
+       rc = ads_search_retry(ads, &msg, ldap_exp, attrs);
        if (!ADS_ERR_OK(rc)) {
                status = ads_ntstatus(rc);
                DEBUG(1,("ads_sid_to_name ads_search: %s\n", ads_errstr(rc)));
@@ -146,7 +146,7 @@ NTSTATUS ads_sid_to_name(ADS_STRUCT *ads,
 done:
        if (msg) ads_msgfree(ads, msg);
 
-       SAFE_FREE(exp);
+       SAFE_FREE(ldap_exp);
        SAFE_FREE(sidstr);
 
        return status;