repl: Specify the target realm in dreplsrv_get_target_principal()
[amitay/samba.git] / source4 / dsdb / repl / drepl_partitions.c
index 8c85ef6f2588d04394754aa5c353b89cde3585c9..c822ba997a84ed6a646093a3cf2b422e7d47f313 100644 (file)
@@ -270,9 +270,9 @@ static NTSTATUS dreplsrv_get_target_principal(struct dreplsrv_service *s,
 
        if (dnsdomain != NULL) {
                *target_principal = talloc_asprintf(mem_ctx,
-                                                   "E3514235-4B06-11D1-AB04-00C04FC2DCD2/%s/%s",
+                                                   "E3514235-4B06-11D1-AB04-00C04FC2DCD2/%s/%s@%s",
                                                    GUID_string(tmp_ctx, &rft->source_dsa_obj_guid),
-                                                   dnsdomain);
+                                                   dnsdomain, dnsdomain);
        }
 
        talloc_free(tmp_ctx);