summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-03-07 18:03:54 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-03-07 18:03:54 +0100
commitfc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2 (patch)
treec343b97a8c16fcacd7703adcf4ee6f84fa7ee2a1 /source4/smb_server/smb
parent5a5b50f3dd7d75214184f711c35a7536b64cbbe7 (diff)
parent97a272a4bf1178c1adcc5761d162b74c338dd230 (diff)
downloadsamba-fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2.tar.gz
samba-fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2.tar.bz2
samba-fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit e4da851bd7e7620bbf99efe20a496b1be78ba4e2)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r--source4/smb_server/smb/nttrans.c10
-rw-r--r--source4/smb_server/smb/service.c6
2 files changed, 11 insertions, 5 deletions
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index f6edc407d6..a20c41ba4d 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -460,7 +460,7 @@ static NTSTATUS nttrans_backend(struct smbsrv_request *req,
static void reply_nttrans_send(struct ntvfs_request *ntvfs)
{
struct smbsrv_request *req;
- uint16_t params_left, data_left;
+ uint32_t params_left, data_left;
uint8_t *params, *data;
struct smb_nttrans *trans;
struct nttrans_op *op;
@@ -502,7 +502,7 @@ static void reply_nttrans_send(struct ntvfs_request *ntvfs)
/* we need to divide up the reply into chunks that fit into
the negotiated buffer size */
do {
- uint16_t this_data, this_param, max_bytes;
+ uint32_t this_data, this_param, max_bytes;
uint_t align1 = 1, align2 = (params_left ? 2 : 0);
struct smbsrv_request *this_req;
@@ -573,9 +573,9 @@ void smbsrv_reply_nttrans(struct smbsrv_request *req)
{
struct nttrans_op *op;
struct smb_nttrans *trans;
- uint16_t param_ofs, data_ofs;
- uint16_t param_count, data_count;
- uint16_t param_total, data_total;
+ uint32_t param_ofs, data_ofs;
+ uint32_t param_count, data_count;
+ uint32_t param_total, data_total;
/* parse request */
if (req->in.wct < 19) {
diff --git a/source4/smb_server/smb/service.c b/source4/smb_server/smb/service.c
index 35b3653026..52471c09c9 100644
--- a/source4/smb_server/smb/service.c
+++ b/source4/smb_server/smb/service.c
@@ -36,6 +36,7 @@ static NTSTATUS make_connection_scfg(struct smbsrv_request *req,
{
struct smbsrv_tcon *tcon;
NTSTATUS status;
+ uint64_t ntvfs_caps = 0;
tcon = smbsrv_smb_tcon_new(req->smb_conn, scfg->name);
if (!tcon) {
@@ -44,9 +45,14 @@ static NTSTATUS make_connection_scfg(struct smbsrv_request *req,
}
req->tcon = tcon;
+ if (req->smb_conn->negotiate.client_caps & CAP_LEVEL_II_OPLOCKS) {
+ ntvfs_caps |= NTVFS_CLIENT_CAP_LEVEL_II_OPLOCKS;
+ }
+
/* init ntvfs function pointers */
status = ntvfs_init_connection(tcon, scfg, type,
req->smb_conn->negotiate.protocol,
+ ntvfs_caps,
req->smb_conn->connection->event.ctx,
req->smb_conn->connection->msg_ctx,
req->smb_conn->lp_ctx,