diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-07 18:03:54 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-07 18:03:54 +0100 |
commit | fc2cd5ed638b7b3b0ab2cef21ba032d7d958a0c2 (patch) | |
tree | c343b97a8c16fcacd7703adcf4ee6f84fa7ee2a1 /source4/smb_server | |
parent | 5a5b50f3dd7d75214184f711c35a7536b64cbbe7 (diff) | |
parent | 97a272a4bf1178c1adcc5761d162b74c338dd230 (diff) | |
download | samba-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')
-rw-r--r-- | source4/smb_server/smb/nttrans.c | 10 | ||||
-rw-r--r-- | source4/smb_server/smb/service.c | 6 | ||||
-rw-r--r-- | source4/smb_server/smb2/tcon.c | 4 |
3 files changed, 15 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, diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c index 7f7d558b16..040947f84f 100644 --- a/source4/smb_server/smb2/tcon.c +++ b/source4/smb_server/smb2/tcon.c @@ -245,6 +245,7 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, union smb_tcon const char *service = io->smb2.in.path; struct share_config *scfg; const char *sharetype; + uint64_t ntvfs_caps = 0; if (strncmp(service, "\\\\", 2) == 0) { const char *p = strchr(service+2, '\\'); @@ -283,9 +284,12 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, union smb_tcon } req->tcon = tcon; + 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, |