diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index e6c1fa72dcb..b7a745a951e 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -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 diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 4f0b7ac35da..7f8aee068bd 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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);