1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3:torture: make use of smb_protocol_types_string() in run_smb2_negprot()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2017-06-19 21:53:49 +02:00
parent 503226406b
commit 5be4d6d50e

View File

@ -246,40 +246,12 @@ bool run_smb2_negprot(int dummy)
} }
protocol = smbXcli_conn_protocol(cli->conn); protocol = smbXcli_conn_protocol(cli->conn);
name = smb_protocol_types_string(protocol);
switch (protocol) { if (protocol >= PROTOCOL_SMB2_02) {
case PROTOCOL_SMB2_02:
name = "SMB2_02";
break;
case PROTOCOL_SMB2_10:
name = "SMB2_10";
break;
case PROTOCOL_SMB2_22:
name = "SMB2_22";
break;
case PROTOCOL_SMB2_24:
name = "SMB2_24";
break;
case PROTOCOL_SMB3_00:
name = "SMB3_00";
break;
case PROTOCOL_SMB3_02:
name = "SMB3_02";
break;
case PROTOCOL_SMB3_10:
name = "SMB3_10";
break;
case PROTOCOL_SMB3_11:
name = "SMB3_11";
break;
default:
break;
}
if (name) {
printf("Server supports %s\n", name); printf("Server supports %s\n", name);
} else { } else {
printf("Server DOES NOT support SMB2\n"); printf("Server DOES NOT support SMB2, only %s\n", name);
return false; return false;
} }