Blob Blame History Raw
From 5576562cc327cfa6cc77d5962ee8ec85d9ca0ad6 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Mon, 12 Aug 2019 18:49:52 +0200
Subject: [PATCH 078/187] Revert "s4:rpc_server: Use generate_secret_buffer()
 for backupkey wap_key"

This reverts commit 5a62056b4530e4c509444be9164a1fca1dce193f.

Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 38b0695ddac244c67b2a33eb927ad3e95d2e8bd6)
---
 source4/rpc_server/backupkey/dcesrv_backupkey.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/source4/rpc_server/backupkey/dcesrv_backupkey.c b/source4/rpc_server/backupkey/dcesrv_backupkey.c
index d192858e468..a826ae083f4 100644
--- a/source4/rpc_server/backupkey/dcesrv_backupkey.c
+++ b/source4/rpc_server/backupkey/dcesrv_backupkey.c
@@ -1263,8 +1263,7 @@ static WERROR generate_bkrp_server_wrap_key(TALLOC_CTX *ctx, struct ldb_context
 	char *secret_name;
 	TALLOC_CTX *frame = talloc_stackframe();
 
-	/* We need to use a CSPRNG which reseeds for generating session keys. */
-	generate_secret_buffer(wrap_key.key, sizeof(wrap_key.key));
+	generate_random_buffer(wrap_key.key, sizeof(wrap_key.key));
 
 	ndr_err = ndr_push_struct_blob(&blob_wrap_key, ctx, &wrap_key, (ndr_push_flags_fn_t)ndr_push_bkrp_dc_serverwrap_key);
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-- 
2.23.0