mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
CVE-2023-3347: smbd: inline smb2_srv_init_signing() code in srv_init_signing()
It's now a one-line function, imho the overall code is simpler if that code is just inlined. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15397 Signed-off-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
5f39da8527
commit
6be7bd40f0
@ -52,8 +52,6 @@ struct dcesrv_context;
|
||||
|
||||
/* The following definitions come from smbd/smb2_signing.c */
|
||||
|
||||
bool smb2_srv_init_signing(struct loadparm_context *lp_ctx,
|
||||
struct smbXsrv_connection *conn);
|
||||
bool srv_init_signing(struct smbXsrv_connection *conn);
|
||||
|
||||
/* The following definitions come from smbd/aio.c */
|
||||
|
@ -26,21 +26,10 @@
|
||||
#include "lib/param/param.h"
|
||||
#include "smb2_signing.h"
|
||||
|
||||
bool smb2_srv_init_signing(struct loadparm_context *lp_ctx,
|
||||
struct smbXsrv_connection *conn)
|
||||
{
|
||||
/*
|
||||
* For SMB2 all we need to know is if signing is mandatory.
|
||||
* It is always allowed and desired, whatever the smb.conf says.
|
||||
*/
|
||||
(void)lpcfg_server_signing_allowed(lp_ctx, &conn->smb2.signing_mandatory);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool srv_init_signing(struct smbXsrv_connection *conn)
|
||||
{
|
||||
struct loadparm_context *lp_ctx = NULL;
|
||||
bool ok;
|
||||
bool ok = true;
|
||||
|
||||
lp_ctx = loadparm_init_s3(conn, loadparm_s3_helpers());
|
||||
if (lp_ctx == NULL) {
|
||||
@ -51,7 +40,11 @@ bool srv_init_signing(struct smbXsrv_connection *conn)
|
||||
#if defined(WITH_SMB1SERVER)
|
||||
if (conn->protocol >= PROTOCOL_SMB2_02) {
|
||||
#endif
|
||||
ok = smb2_srv_init_signing(lp_ctx, conn);
|
||||
/*
|
||||
* For SMB2 all we need to know is if signing is mandatory.
|
||||
* It is always allowed and desired, whatever the smb.conf says.
|
||||
*/
|
||||
(void)lpcfg_server_signing_allowed(lp_ctx, &conn->smb2.signing_mandatory);
|
||||
#if defined(WITH_SMB1SERVER)
|
||||
} else {
|
||||
ok = smb1_srv_init_signing(lp_ctx, conn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user