context="G"
type="boolean"
developer="1"
- generated_function="0"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
- <para>This parameter controls whether or not the server
- will support the raw read SMB requests when transferring data
- to clients.</para>
+ <para>This is ignored if <smbconfoption name="async echo handler"/> is set,
+ because this feature is incompatible with raw read SMB requests</para>
<para>If enabled, raw reads allow reads of 65535 bytes in
- one packet. This typically provides a major performance benefit.
+ one packet. This typically provides a major performance benefit for some very, very old clients.
</para>
<para>However, some clients either negotiate the allowable
<value type="default">yes</value>
<related>write raw</related>
+<related>async echo handler</related>
</samba:parameter>
context="G"
type="boolean"
developer="1"
- generated_function="0"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
- <para>This parameter controls whether or not the server
- will support raw write SMB's when transferring data from clients.
- You should never need to change this parameter.</para>
+ <para>This is ignored if <smbconfoption name="async echo handler"/> is set,
+ because this feature is incompatible with raw write SMB requests</para>
+
+ <para>If enabled, raw writes allow writes of 65535 bytes in
+ one packet. This typically provides a major performance benefit for some very, very old clients.
+ </para>
+
+ <para>However, some clients either negotiate the allowable
+ block size incorrectly or are incapable of supporting larger block
+ sizes, and for these clients you may need to disable raw writes.</para>
+
+<para>In general this parameter should be viewed as a system tuning
+ tool and left severely alone.</para>
</description>
<value type="default">yes</value>
+
+<related>read raw</related>
+<related>async echo handler</related>
</samba:parameter>
#include "lib/param/param_functions.c"
/* These functions remain only in lib/param for now */
-FN_GLOBAL_BOOL(readraw, bReadRaw)
-FN_GLOBAL_BOOL(writeraw, bWriteRaw)
FN_GLOBAL_CONST_STRING(cachedir, szCacheDir)
FN_GLOBAL_CONST_STRING(statedir, szStateDir)
.label = "read raw",
.type = P_BOOL,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(bReadRaw),
+ .offset = GLOBAL_VAR(read_raw),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_ADVANCED,
.label = "write raw",
.type = P_BOOL,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(bWriteRaw),
+ .offset = GLOBAL_VAR(write_raw),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_ADVANCED,
bool lp_idmap_default_range(uint32_t *low, uint32_t *high);
const char *lp_idmap_backend(const char *domain_name);
const char *lp_idmap_default_backend (void);
-bool lp_readraw(void);
-bool lp_writeraw(void);
int lp_security(void);
int lp_smb2_max_credits(void);
int lp_cups_encrypt(void);
Globals.winbind_sealed_pipes = true;
Globals.require_strong_key = true;
Globals.server_schannel = Auto;
- Globals.bReadRaw = true;
- Globals.bWriteRaw = true;
+ Globals.read_raw = true;
+ Globals.write_raw = true;
Globals.null_passwords = false;
Globals.obey_pam_restrictions = false;
Globals.syslog = 1;
char lp_ ## fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
-static FN_GLOBAL_BOOL(_readraw, bReadRaw)
-static FN_GLOBAL_BOOL(_writeraw, bWriteRaw)
-
/* If lp_statedir() and lp_cachedir() are explicitely set during the
* build process or in smb.conf, we use that value. Otherwise they
* default to the value of lp_lock_directory(). */
return lp_widelinks_internal(snum);
}
-bool lp_writeraw(void)
-{
- if (lp_async_smb_echo_handler()) {
- return false;
- }
- return lp__writeraw();
-}
-
-bool lp_readraw(void)
-{
- if (lp_async_smb_echo_handler()) {
- return false;
- }
- return lp__readraw();
-}
-
int lp_server_role(void)
{
return lp_find_server_role(lp__server_role(),
static void reply_lanman1(struct smb_request *req, uint16 choice)
{
- int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
int secword=0;
time_t t = time(NULL);
struct smbd_server_connection *sconn = req->sconn;
+ uint16_t raw;
+ if (lp_async_smb_echo_handler()) {
+ raw = 0;
+ } else {
+ raw = (lp_read_raw()?1:0) | (lp_write_raw()?2:0);
+ }
sconn->smb1.negprot.encrypted_passwords = lp_encrypt_passwords();
static void reply_lanman2(struct smb_request *req, uint16 choice)
{
- int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
int secword=0;
time_t t = time(NULL);
struct smbd_server_connection *sconn = req->sconn;
+ uint16_t raw;
+ if (lp_async_smb_echo_handler()) {
+ raw = 0;
+ } else {
+ raw = (lp_read_raw()?1:0) | (lp_write_raw()?2:0);
+ }
sconn->smb1.negprot.encrypted_passwords = lp_encrypt_passwords();
capabilities |= CAP_LARGE_FILES;
- if (lp_readraw() && lp_writeraw())
+ if (!lp_async_smb_echo_handler() && lp_read_raw() && lp_write_raw())
capabilities |= CAP_RAW_MODE;
if (lp_nt_status_support())
****************************************************************************/
static void reply_coreplus(struct smbsrv_request *req, uint16_t choice)
{
- uint16_t raw = (lpcfg_readraw(req->smb_conn->lp_ctx)?1:0) | (lpcfg_writeraw(req->smb_conn->lp_ctx)?2:0);
+ uint16_t raw;
+ if (lpcfg_async_smb_echo_handler(req->smb_conn->lp_ctx)) {
+ raw = 0;
+ } else {
+ raw = (lpcfg_read_raw(req->smb_conn->lp_ctx)?1:0) |
+ (lpcfg_write_raw(req->smb_conn->lp_ctx)?2:0);
+ }
smbsrv_setup_reply(req, 13, 0);
****************************************************************************/
static void reply_lanman1(struct smbsrv_request *req, uint16_t choice)
{
- int raw = (lpcfg_readraw(req->smb_conn->lp_ctx)?1:0) | (lpcfg_writeraw(req->smb_conn->lp_ctx)?2:0);
+ uint16_t raw;
+ if (lpcfg_async_smb_echo_handler(req->smb_conn->lp_ctx)) {
+ raw = 0;
+ } else {
+ raw = (lpcfg_read_raw(req->smb_conn->lp_ctx)?1:0) |
+ (lpcfg_write_raw(req->smb_conn->lp_ctx)?2:0);
+ }
int secword=0;
time_t t = req->request_time.tv_sec;
****************************************************************************/
static void reply_lanman2(struct smbsrv_request *req, uint16_t choice)
{
- int raw = (lpcfg_readraw(req->smb_conn->lp_ctx)?1:0) | (lpcfg_writeraw(req->smb_conn->lp_ctx)?2:0);
int secword=0;
time_t t = req->request_time.tv_sec;
+ uint16_t raw;
+ if (lpcfg_async_smb_echo_handler(req->smb_conn->lp_ctx)) {
+ raw = 0;
+ } else {
+ raw = (lpcfg_read_raw(req->smb_conn->lp_ctx)?1:0) |
+ (lpcfg_write_raw(req->smb_conn->lp_ctx)?2:0);
+ }
req->smb_conn->negotiate.encrypted_passwords = lpcfg_encrypt_passwords(req->smb_conn->lp_ctx);
capabilities |= CAP_LARGE_FILES;
}
- if (lpcfg_readraw(req->smb_conn->lp_ctx) &&
- lpcfg_writeraw(req->smb_conn->lp_ctx)) {
+ if (!lpcfg_async_smb_echo_handler(req->smb_conn->lp_ctx) &&
+ lpcfg_read_raw(req->smb_conn->lp_ctx) &&
+ lpcfg_write_raw(req->smb_conn->lp_ctx)) {
capabilities |= CAP_RAW_MODE;
}