]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Add smb2_srv_init_signing(). Initializes conn->smb2.signing_mandatory.
authorJeremy Allison <jra@samba.org>
Tue, 8 Mar 2022 02:13:11 +0000 (18:13 -0800)
committerDavid Mulder <dmulder@samba.org>
Tue, 8 Mar 2022 22:12:37 +0000 (22:12 +0000)
Not yet used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: David Mulder <dmulder@samba.org>
source3/smbd/signing.c

index eb1bf389b0ff40523e0521c25ac00cbfae0f5bb4..9627372de5d14324b0c867c278dc1dbe3bc4014f 100644 (file)
@@ -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)
 {