DEBUG(10, ("CBRL BLR records (%s):\n", fn));
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
struct smbd_smb2_request *smb2req;
for (smb2req = sconn->smb2.requests; smb2req; smb2req = nextreq) {
blr = get_pending_smb2req_blr(smb2req);
onefs_cbrl_enumerate_blq("onefs_cbrl_find_blr");
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
struct smbd_smb2_request *smb2req;
for (smb2req = sconn->smb2.requests; smb2req; smb2req = nextreq) {
blr = get_pending_smb2req_blr(smb2req);
{
struct smbd_server_connection *sconn = smbd_server_conn;
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
SMB_ASSERT(sconn->smb2.locks.brl_timeout == te);
TALLOC_FREE(sconn->smb2.locks.brl_timeout);
} else {
struct smbd_server_connection *sconn = smbd_server_conn;
struct blocking_lock_record *blr, *blr_cancelled, *next = NULL;
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
cancel_pending_lock_requests_by_fid_smb2(fsp,
br_lck,
close_type);
struct timeval tv_curr = timeval_current();
struct blocking_lock_record *blr, *next = NULL;
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
process_blocking_lock_queue_smb2(tv_curr);
return;
}
int i;
int find_offset = 1;
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) ||
!(conn->params = TALLOC_P(conn, struct share_params))) {
DEBUG(0,("TALLOC_ZERO() failed!\n"));
****************************************************************************/
bool conn_close_all(struct smbd_server_connection *sconn)
{
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
/* SMB2 */
if (sconn->smb2.sessions.list &&
sconn->smb2.sessions.list->tcons.list) {
return;
}
- if (conn->sconn->allow_smb2) {
+ if (conn->sconn->using_smb2) {
conn_free_internal(conn);
return;
}
struct {
bool got_session;
} nbt;
- bool allow_smb2;
+ bool using_smb2;
struct {
struct fd_event *fde;
sepchar = pdp->posix_path ? '/' : '\\';
- if (!sconn->allow_smb2 && (*pathname != sepchar)) {
+ if (!sconn->using_smb2 && (*pathname != sepchar)) {
DEBUG(10,("parse_dfs_path: path %s doesn't start with %c\n",
pathname, sepchar ));
/*
fsp_str_dbg(fsp)));
/* Now send a break to none message to our client. */
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
send_break_message_smb2(fsp, OPLOCKLEVEL_NONE);
} else {
send_break_message_smb1(fsp, OPLOCKLEVEL_NONE);
wait_before_sending_break();
}
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
send_break_message_smb2(fsp, break_to_level2 ?
OPLOCKLEVEL_II : OPLOCKLEVEL_NONE);
} else {
return;
}
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
send_break_message_smb2(fsp, OPLOCKLEVEL_NONE);
} else {
send_break_message_smb1(fsp, OPLOCKLEVEL_NONE);
void invalidate_all_vuids(struct smbd_server_connection *sconn)
{
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
return;
}
{
struct pending_message_list *pml;
- if (smbd_server_conn->allow_smb2) {
+ if (smbd_server_conn->using_smb2) {
remove_deferred_open_message_smb2(mid);
return;
}
struct pending_message_list *pml;
int i = 0;
- if (smbd_server_conn->allow_smb2) {
+ if (smbd_server_conn->using_smb2) {
schedule_deferred_open_message_smb2(mid);
return;
}
{
struct pending_message_list *pml;
- if (smbd_server_conn->allow_smb2) {
+ if (smbd_server_conn->using_smb2) {
return open_was_deferred_smb2(mid);
}
{
struct pending_message_list *pml;
- if (smbd_server_conn->allow_smb2) {
+ if (smbd_server_conn->using_smb2) {
return get_deferred_open_message_state_smb2(smbreq->smb2req,
p_request_time,
pp_state);
goto done;
}
- if (smbd_server_conn->allow_smb2) {
+ if (smbd_server_conn->using_smb2) {
+ /* At this point we're not really using smb2,
+ * we make the decision here.. */
if (smbd_is_smb2_header(inbuf, nread)) {
smbd_smb2_first_negprot(smbd_server_conn, inbuf, nread);
return;
&& CVAL(inbuf, smb_com) != 0x72) {
/* This is a non-negprot SMB1 packet.
Disable SMB2 from now on. */
- smbd_server_conn->allow_smb2 = false;
+ smbd_server_conn->using_smb2 = false;
}
}
struct smbd_server_connection *sconn = smbd_server_conn;
bool ret;
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
/* Don't do keepalives on an SMB2 connection. */
return false;
}
{
struct smbd_server_connection *sconn = smbd_server_conn;
- if (sconn->allow_smb2) {
+ if (sconn->using_smb2) {
/* TODO: implement real idle check */
if (sconn->smb2.sessions.list) {
return true;
if (lp_maxprotocol() == PROTOCOL_SMB2 &&
lp_security() != SEC_SHARE &&
!lp_async_smb_echo_handler()) {
- smbd_server_conn->allow_smb2 = true;
+ /*
+ * We're not making the desion here,
+ * we're just allowing the client
+ * to decide between SMB1 and SMB2
+ * with the first negprot
+ * packet.
+ */
+ smbd_server_conn->using_smb2 = true;
}
/* Ensure child is set to blocking mode */
*
* Replacement for do_lock_spin(). JRA. */
- if (!smbd_server_conn->allow_smb2 &&
+ if (!smbd_server_conn->using_smb2 &&
br_lck && lp_blocking_locks(SNUM(conn)) &&
lp_lock_spin_time() && !blocking_lock &&
NT_STATUS_EQUAL((status),