mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s4:dsdb/repl: make use of dcerpc_binding_set_string_option("target_principal")
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
committed by
Günther Deschner
parent
f67a7cb6b7
commit
fd8834c758
@ -307,6 +307,7 @@ WERROR dreplsrv_out_connection_attach(struct dreplsrv_service *s,
|
||||
if (!conn) {
|
||||
NTSTATUS nt_status;
|
||||
char *binding_str;
|
||||
const char *target_principal = NULL;
|
||||
|
||||
conn = talloc_zero(s, struct dreplsrv_out_connection);
|
||||
W_ERROR_HAVE_NO_MEMORY(conn);
|
||||
@ -324,7 +325,14 @@ WERROR dreplsrv_out_connection_attach(struct dreplsrv_service *s,
|
||||
|
||||
/* use the GC principal for DRS replication */
|
||||
nt_status = dreplsrv_get_target_principal(s, conn->binding,
|
||||
rft, &conn->binding->target_principal);
|
||||
rft, &target_principal);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
return ntstatus_to_werror(nt_status);
|
||||
}
|
||||
|
||||
nt_status = dcerpc_binding_set_string_option(conn->binding,
|
||||
"target_principal",
|
||||
target_principal);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
return ntstatus_to_werror(nt_status);
|
||||
}
|
||||
|
Reference in New Issue
Block a user