summaryrefslogtreecommitdiffstats
path: root/source4/libnet/libnet_unbecome_dc.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-08 00:09:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:59 -0500
commit6011531ac644bfae87cbce31a340e2c1e6ef929a (patch)
tree68e89a92f5a6b5978427b962e8101ad062381255 /source4/libnet/libnet_unbecome_dc.c
parentbe69066736c23f40d9131e608ead94874208da05 (diff)
downloadsamba-6011531ac644bfae87cbce31a340e2c1e6ef929a.tar.gz
samba-6011531ac644bfae87cbce31a340e2c1e6ef929a.tar.xz
samba-6011531ac644bfae87cbce31a340e2c1e6ef929a.zip
r20073: update the computer_dn_str after ldb_rename()
metze (This used to be commit c40bc7d287664d67415ae0a8b7a272732172ec40)
Diffstat (limited to 'source4/libnet/libnet_unbecome_dc.c')
-rw-r--r--source4/libnet/libnet_unbecome_dc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index bc29501ac46..ffec396e21d 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -328,11 +328,16 @@ static NTSTATUS unbecomeDC_ldap_move_computer(struct libnet_UnbecomeDC_state *s)
}
ret = ldb_rename(s->ldap.ldb, old_dn, new_dn);
- talloc_free(r);
if (ret != LDB_SUCCESS) {
+ talloc_free(r);
return NT_STATUS_LDAP(ret);
}
+ s->dest_dsa.computer_dn_str = ldb_dn_alloc_linearized(s, new_dn);
+ NT_STATUS_HAVE_NO_MEMORY(s->dest_dsa.computer_dn_str);
+
+ talloc_free(r);
+
return NT_STATUS_OK;
}