[PATCH] smblcient doesn't handle STATUS_NOT_SUPPORTED gracefully for FSCTL_VALIDATE_NEGOTIATE_INFO
Jeremy Allison
jra at samba.org
Wed Jun 14 17:30:34 UTC 2017
On Tue, May 30, 2017 at 05:06:47PM +0200, Andreas Schneider via samba-technical wrote:
> Hi,
>
> the attached patch fixes
> https://bugzilla.samba.org/show_bug.cgi?id=12808
>
> Review and push much appreciated.
OK, finally got the time to read and understand
what is going on here :-).
LGTM. RB+. Pushed.
> --
> Andreas Schneider GPG-ID: CC014E3D
> Samba Team asn at samba.org
> www.samba.org
> From 5ec44b7c6cd5a2f51cc5cb1890c2d674162d6bf9 Mon Sep 17 00:00:00 2001
> From: Andreas Schneider <asn at samba.org>
> Date: Tue, 30 May 2017 16:30:33 +0200
> Subject: [PATCH] libcli:smb2: Gracefully handle not supported for
> FSCTL_VALIDATE_NEGOTIATE_INFO
>
> If FSCTL_VALIDATE_NEGOTIATE_INFO is not implemented, e.g. in a SMB2 only
> server then gracefully handle NT_STATUS_NOT_SUPPORTED too.
>
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12808
>
> Signed-off-by: Andreas Schneider <asn at samba.org>
> Signed-off-by: Guenther Deschner <gd at samba.org>
> Pair-Programmed-With: Guenther Deschner <gd at samba.org>
> ---
> libcli/smb/smbXcli_base.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
> index 1ec11a9dec4..74a602dd746 100644
> --- a/libcli/smb/smbXcli_base.c
> +++ b/libcli/smb/smbXcli_base.c
> @@ -5317,6 +5317,21 @@ static void smb2cli_validate_negotiate_info_done(struct tevent_req *subreq)
> tevent_req_done(req);
> return;
> }
> + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
> + /*
> + * The response was signed, but not supported
> + *
> + * This might be returned by older Windows versions or by
> + * NetApp SMB server implementations.
> + *
> + * See
> + *
> + * https://blogs.msdn.microsoft.com/openspecification/2012/06/28/smb3-secure-dialect-negotiation/
> + *
> + */
> + tevent_req_done(req);
> + return;
> + }
> if (tevent_req_nterror(req, status)) {
> return;
> }
> --
> 2.13.0
>
More information about the samba-technical
mailing list