summaryrefslogtreecommitdiff
path: root/source3/libads/ads_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ads_ldap.c')
-rw-r--r--source3/libads/ads_ldap.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source3/libads/ads_ldap.c b/source3/libads/ads_ldap.c
index 97f12de0f7..05b016539e 100644
--- a/source3/libads/ads_ldap.c
+++ b/source3/libads/ads_ldap.c
@@ -37,16 +37,9 @@ NTSTATUS ads_name_to_sid(ADS_STRUCT *ads,
char *exp;
uint32 t;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
- char *escaped_name = escape_ldap_string_alloc(name);
- char *escaped_realm = escape_ldap_string_alloc(ads->config.realm);
-
- if (!escaped_name || !escaped_realm) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
if (asprintf(&exp, "(|(sAMAccountName=%s)(userPrincipalName=%s@%s))",
- escaped_name, escaped_name, escaped_realm) == -1) {
+ name, name, ads->config.realm) == -1) {
DEBUG(1,("ads_name_to_sid: asprintf failed!\n"));
status = NT_STATUS_NO_MEMORY;
goto done;
@@ -84,9 +77,6 @@ NTSTATUS ads_name_to_sid(ADS_STRUCT *ads,
done:
if (res) ads_msgfree(ads, res);
- SAFE_FREE(escaped_name);
- SAFE_FREE(escaped_realm);
-
return status;
}