summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-18 09:01:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:25 -0500
commit90cf33953dcfab988162f9ee53cdc0eb6ff87c28 (patch)
tree1c4d7983fe8886c8ad97cbc404a29937bacc74eb /source4/libcli/ldap
parentf40e69da2633771a42ec2b74fca63bd0b0a37e4a (diff)
downloadsamba-90cf33953dcfab988162f9ee53cdc0eb6ff87c28.tar.gz
samba-90cf33953dcfab988162f9ee53cdc0eb6ff87c28.tar.bz2
samba-90cf33953dcfab988162f9ee53cdc0eb6ff87c28.zip
r7715: ensure we don't print null strings in ldap_errstr()
(This used to be commit dc419fc89973c2d7fa333df389b75cb218e8a848)
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap_client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 7ad45f4eea..e392002a19 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -549,7 +549,9 @@ NTSTATUS ldap_check_response(struct ldap_connection *conn, struct ldap_Result *r
}
conn->last_error = talloc_asprintf(conn, "LDAP error %u - %s <%s> <%s>",
r->resultcode,
- r->dn, r->errormessage, r->referral);
+ r->dn?r->dn:"(NULL)",
+ r->errormessage?r->errormessage:"",
+ r->referral?r->referral:"");
return NT_STATUS_LDAP(r->resultcode);
}