[PATCHES] multi-channel: implement network interface info ioctl

Michael Adam obnox at samba.org
Mon Jan 25 11:08:24 UTC 2016


On 2016-01-25 at 11:32 +0100, Stefan Metzmacher wrote:
> Hi Michael,
> 
> >> I think we should filter out disconnected interfaces in the FSCTL call.
> > 
> > Good point.
> > Do you think we can add that as improvements (a little) later on?
> 
> As long as we use xconn->client->server_multi_channel_enabled
> and not enable this code yet.

Ok, here's an addon-patch that achieves this.

Michael
-------------- next part --------------
From 35abaee3e82262617204d60c8f854e0e5ba94a34 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 25 Jan 2016 12:01:44 +0100
Subject: [PATCH] s3:smbd: only process fsctl_network_iface_info if multi
 channel is enabled

This effectively disables it for now.
Ultimately, we may want to remove this restriction.
Hence a separate patch.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/smbd/smb2_ioctl_network_fs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source3/smbd/smb2_ioctl_network_fs.c b/source3/smbd/smb2_ioctl_network_fs.c
index 3d34ca3..1032c64 100644
--- a/source3/smbd/smb2_ioctl_network_fs.c
+++ b/source3/smbd/smb2_ioctl_network_fs.c
@@ -394,6 +394,10 @@ static NTSTATUS fsctl_network_iface_info(TALLOC_CTX *mem_ctx,
 	size_t num_ifaces = iface_count();
 	enum ndr_err_code ndr_err;
 
+	if (!xconn->client->server_multi_channel_enabled) {
+		return NT_STATUS_NOT_SUPPORTED;
+	}
+
 	if (in_input->length != 0) {
 		return NT_STATUS_INVALID_PARAMETER;
 	}
-- 
2.5.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160125/0dbbc7be/signature.sig>


More information about the samba-technical mailing list