ntvfs: pass down the client capabilities into the ntvfs layer
[jelmer/samba4-debian.git] / source / smb_server / smb2 / tcon.c
index 7f7d558b1639f7285f5db30229c687454172d7f5..040947f84f3f7c784be796a6244728b60382d3d5 100644 (file)
@@ -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,