From: Jeremy Allison Date: Tue, 8 Mar 2022 02:13:11 +0000 (-0800) Subject: s3: smbd: Add smb2_srv_init_signing(). Initializes conn->smb2.signing_mandatory. X-Git-Tag: tevent-0.12.0~533 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f9d528f3895e2c95d22110e8e7718da30df3c08;p=thirdparty%2Fsamba.git s3: smbd: Add smb2_srv_init_signing(). Initializes conn->smb2.signing_mandatory. Not yet used. Signed-off-by: Jeremy Allison Signed-off-by: David Mulder --- diff --git a/source3/smbd/signing.c b/source3/smbd/signing.c index eb1bf389b0f..9627372de5d 100644 --- a/source3/smbd/signing.c +++ b/source3/smbd/signing.c @@ -232,6 +232,25 @@ bool srv_init_signing(struct smbXsrv_connection *conn) return true; } +#if 0 +static bool smb2_srv_init_signing(struct smbXsrv_connection *conn) +{ + struct loadparm_context *lp_ctx = loadparm_init_s3(conn, loadparm_s3_helpers()); + if (lp_ctx == NULL) { + DBG_DEBUG("loadparm_init_s3 failed\n"); + return false; + } + + /* + * 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); + talloc_unlink(conn, lp_ctx); + return true; +} +#endif + void srv_set_signing_negotiated(struct smbXsrv_connection *conn, bool allowed, bool mandatory) {