1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

ldb:ldb_rename on ldap backends - handle the case when the RDN value is empty

Otherwise we get "<RDN name>=(null),..."
This commit is contained in:
Matthias Dieter Wallnöfer 2010-11-19 23:01:39 +01:00
parent d0993e1278
commit bb679a4da3
2 changed files with 2 additions and 2 deletions

View File

@ -633,7 +633,7 @@ static int ildb_rename(struct ildb_context *ac)
if ((rdn_name != NULL) && (rdn_val != NULL)) {
msg->r.ModifyDNRequest.newrdn =
talloc_asprintf(msg, "%s=%s", rdn_name,
ldb_dn_escape_value(msg, *rdn_val));
rdn_val->length > 0 ? ldb_dn_escape_value(msg, *rdn_val) : "");
} else {
msg->r.ModifyDNRequest.newrdn = talloc_strdup(msg, "");
}

View File

@ -410,7 +410,7 @@ static int lldb_rename(struct lldb_context *lldb_ac)
if ((rdn_name != NULL) && (rdn_val != NULL)) {
newrdn = talloc_asprintf(lldb_ac, "%s=%s", rdn_name,
ldb_dn_escape_value(lldb, *rdn_val));
rdn_val->length > 0 ? ldb_dn_escape_value(lldb, *rdn_val) : "");
} else {
newrdn = talloc_strdup(lldb_ac, "");
}