void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
			 struct smbcli_options *options)
{
	options->max_xmit = lpcfg_max_xmit(lp_ctx);
	options->max_mux = lpcfg_maxmux(lp_ctx);
	options->use_spnego = lpcfg_nt_status_support(lp_ctx) && lpcfg_use_spnego(lp_ctx);
	options->signing = lpcfg_client_signing(lp_ctx);
	options->request_timeout = SMB_REQUEST_TIMEOUT;
	options->ntstatus_support = lpcfg_nt_status_support(lp_ctx);
	options->max_protocol = lpcfg_cli_maxprotocol(lp_ctx);
	options->unicode = lpcfg_unicode(lp_ctx);
	options->use_oplocks = true;
	options->use_level2_oplocks = true;
}
Esempio n. 2
0
void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
			 struct smbcli_options *options)
{
	options->max_xmit = lpcfg_max_xmit(lp_ctx);
	options->max_mux = lpcfg_max_mux(lp_ctx);
	options->use_spnego = lpcfg_nt_status_support(lp_ctx) && lpcfg_client_use_spnego(lp_ctx);
	options->signing = lpcfg_client_signing(lp_ctx);
	options->request_timeout = SMB_REQUEST_TIMEOUT;
	options->ntstatus_support = lpcfg_nt_status_support(lp_ctx);
	options->min_protocol = lpcfg_client_min_protocol(lp_ctx);
	options->max_protocol = lpcfg__client_max_protocol(lp_ctx);
	options->unicode = lpcfg_unicode(lp_ctx);
	options->use_oplocks = true;
	options->use_level2_oplocks = true;
	options->smb2_capabilities = SMB2_CAP_ALL;
	options->client_guid = GUID_random();
}
Esempio n. 3
0
/*
 * init the SMB2 protocol related stuff
 */
NTSTATUS smbsrv_init_smb2_connection(struct smbsrv_connection *smb_conn)
{
	NTSTATUS status;

	/* now initialise a few default values associated with this smb socket */
	smb_conn->negotiate.max_send = 0xFFFF;

	/* this is the size that w2k uses, and it appears to be important for
	   good performance */
	smb_conn->negotiate.max_recv = lpcfg_max_xmit(smb_conn->lp_ctx);

	smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));

	smb_conn->config.nt_status_support = true;

	status = smbsrv_init_sessions(smb_conn, UINT64_MAX);
	NT_STATUS_NOT_OK_RETURN(status);

	status = smb2srv_init_pending(smb_conn);
	NT_STATUS_NOT_OK_RETURN(status);

	return NT_STATUS_OK;
	
}