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

smbd: Add conn_using_smb2()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
This commit is contained in:
Volker Lendecke 2024-02-13 12:28:06 +01:00 committed by Martin Schwenke
parent f1bb46ad4e
commit 59d7850ffa
2 changed files with 7 additions and 0 deletions

View File

@ -84,6 +84,12 @@ enum protocol_types conn_protocol(struct smbd_server_connection *sconn)
return PROTOCOL_COREPLUS;
}
bool conn_using_smb2(struct smbd_server_connection *sconn)
{
enum protocol_types proto = conn_protocol(sconn);
return (proto >= PROTOCOL_SMB2_02);
}
/****************************************************************************
Find first available connection slot, starting from a random position.
The randomisation stops problems with the server dying and clients

View File

@ -143,6 +143,7 @@ bool has_other_nonposix_opens(struct share_mode_lock *lck,
int conn_num_open(struct smbd_server_connection *sconn);
bool conn_snum_used(struct smbd_server_connection *sconn, int snum);
enum protocol_types conn_protocol(struct smbd_server_connection *sconn);
bool conn_using_smb2(struct smbd_server_connection *sconn);
connection_struct *conn_new(struct smbd_server_connection *sconn);
bool conn_idle_all(struct smbd_server_connection *sconn, time_t t);
void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint64_t vuid);