1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libsmbclient: Allow server (NetApp) to return STATUS_INVALID_PARAMETER from an echo.

It does this if we send a session ID of zero. The server still replied.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 11 08:44:37 CET 2017 on sn-devel-144
This commit is contained in:
Jeremy Allison 2017-09-08 16:20:34 -07:00
parent 37ac8ad4bf
commit a0f6ea8dec
2 changed files with 17 additions and 2 deletions

View File

@ -6027,7 +6027,13 @@ static void readline_callback(void)
/* Ping the server to keep the connection alive using SMBecho. */
memset(garbage, 0xf0, sizeof(garbage));
status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
if (NT_STATUS_IS_OK(status)) {
if (NT_STATUS_IS_OK(status) ||
NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
/*
* Even if server returns NT_STATUS_INVALID_PARAMETER
* it still responded.
* BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007
*/
return;
}

View File

@ -61,7 +61,16 @@ SMBC_check_server(SMBCCTX * context,
1,
data_blob_const(data, sizeof(data)));
if (!NT_STATUS_IS_OK(status)) {
return 1;
/*
* Some NetApp servers return
* NT_STATUS_INVALID_PARAMETER.That's OK, they still
* replied.
* BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007
*/
if (!NT_STATUS_EQUAL(status,
NT_STATUS_INVALID_PARAMETER)) {
return 1;
}
}
server->last_echo_time = now;
}