From ef2e26c91b80556af033d3335e55f5dfa6fff31d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Aug 2003 01:53:07 +0000 Subject: first public release of samba4 code (This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f) --- source4/ntvfs/ntvfs_util.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 source4/ntvfs/ntvfs_util.c (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c new file mode 100644 index 0000000000..4036fb0935 --- /dev/null +++ b/source4/ntvfs/ntvfs_util.c @@ -0,0 +1,26 @@ +/* + Unix SMB/CIFS implementation. + NTVFS utility code + Copyright (C) Andrew Tridgell 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +/* + this implements common utility functions that many NTVFS backends may wish to use +*/ + +#include "includes.h" + + -- cgit From 019719595778e0bd0a00781b33407554d1943985 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Oct 2004 21:48:53 +0000 Subject: r3336: use a struct ntvfs_async_state to be able to do async chaning of ntvfs modules the idea is that a passthru module can use ntvfs_async_state_push() before calling ntvfs_next_*() and in the _send function it calls ntvfs_async_state_pop() and then call the upper layer send_fn itself - ntvfs_nbench is now fully async - the ntvfs_map_*() functions and the trans(2) mapping functions are not converted yet metze (This used to be commit fde64c0dc142b53d128c8ba09af048dc58d8ef3a) --- source4/ntvfs/ntvfs_util.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 4036fb0935..929ec037de 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -1,7 +1,7 @@ /* Unix SMB/CIFS implementation. NTVFS utility code - Copyright (C) Andrew Tridgell 2003 + Copyright (C) Stefan Metzmacher 2004 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,4 +23,40 @@ #include "includes.h" +NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, + void *private_data, + void (*send_fn)(struct smbsrv_request *), + struct ntvfs_module_context *ntvfs) +{ + struct ntvfs_async_state *async; + async = talloc_p(req, struct ntvfs_async_state); + if (!async) { + return NT_STATUS_NO_MEMORY; + } + + async->state = req->async_states->state; + async->private_data = private_data; + async->send_fn = send_fn; + async->status = NT_STATUS_INTERNAL_ERROR; + + async->ntvfs = ntvfs; + + DLIST_ADD(req->async_states, async); + + return NT_STATUS_OK; +} + +void ntvfs_async_state_pop(struct smbsrv_request *req) +{ + struct ntvfs_async_state *async; + + async = req->async_states; + + DLIST_REMOVE(req->async_states, async); + + req->async_states->state = async->state; + req->async_states->status = async->status; + + talloc_free(async); +} -- cgit From 3643fb11092e28a9538ef32cedce8ff21ad86a28 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 06:42:15 +0000 Subject: r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a) --- source4/ntvfs/ntvfs_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 929ec037de..bd5a305e20 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "dlinklist.h" NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, void *private_data, -- cgit From aa34fcebf8aa0660574a7c6976b33b3f37985e27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 07:18:24 +0000 Subject: r3466: split out request.h, signing.h, and smb_server.h (This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e) --- source4/ntvfs/ntvfs_util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index bd5a305e20..41e1b04d49 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -23,6 +23,8 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" + NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, void *private_data, -- cgit From 759da3b915e2006d4c87b5ace47f399accd9ce91 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 27 Jan 2005 07:08:20 +0000 Subject: r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0) --- source4/ntvfs/ntvfs_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 41e1b04d49..e360321882 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -33,7 +33,7 @@ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, { struct ntvfs_async_state *async; - async = talloc_p(req, struct ntvfs_async_state); + async = talloc(req, struct ntvfs_async_state); if (!async) { return NT_STATUS_NO_MEMORY; } -- cgit From 0a3c167f6bcf08b2204ca49831ca49eef73dcbf4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 22:51:30 +0000 Subject: r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server. (This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1) --- source4/ntvfs/ntvfs_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index e360321882..ad31865425 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -24,6 +24,7 @@ #include "includes.h" #include "dlinklist.h" #include "smb_server/smb_server.h" +#include "ntvfs/ntvfs.h" NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, -- cgit From 69f7c004fefc4f4e85843bd171fe066167703bb8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 11 Jan 2006 10:53:52 +0000 Subject: r12838: make the ntvfs function public metze (This used to be commit 41a564fdba5969fc7e518439520764fd56cfa280) --- source4/ntvfs/ntvfs_util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index ad31865425..861f266271 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -27,10 +27,10 @@ #include "ntvfs/ntvfs.h" -NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, - void *private_data, - void (*send_fn)(struct smbsrv_request *), - struct ntvfs_module_context *ntvfs) +_PUBLIC_ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, + void *private_data, + void (*send_fn)(struct smbsrv_request *), + struct ntvfs_module_context *ntvfs) { struct ntvfs_async_state *async; @@ -51,7 +51,7 @@ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, return NT_STATUS_OK; } -void ntvfs_async_state_pop(struct smbsrv_request *req) +_PUBLIC_ void ntvfs_async_state_pop(struct smbsrv_request *req) { struct ntvfs_async_state *async; -- cgit From 86497db6113c4ec3210d671c3fcf957d1026098c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 14:31:17 +0000 Subject: r14157: - pass a struct ntvfs_request to the ntvfs layer (for now we just do #define ntvfs_request smbsrv_request, but it's the first step...) - rename ntvfs_openfile() -> ntvfs_open() - fix the talloc hierachie in some places in the ntvfs_map_*() code metze (This used to be commit ed9ed1f48f602354810937c0b0de850b44322191) --- source4/ntvfs/ntvfs_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 861f266271..c7b99d3d24 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -27,10 +27,10 @@ #include "ntvfs/ntvfs.h" -_PUBLIC_ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, +_PUBLIC_ NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs, + struct ntvfs_request *req, void *private_data, - void (*send_fn)(struct smbsrv_request *), - struct ntvfs_module_context *ntvfs) + void (*send_fn)(struct ntvfs_request *)) { struct ntvfs_async_state *async; @@ -51,7 +51,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, return NT_STATUS_OK; } -_PUBLIC_ void ntvfs_async_state_pop(struct smbsrv_request *req) +_PUBLIC_ void ntvfs_async_state_pop(struct ntvfs_request *req) { struct ntvfs_async_state *async; -- cgit From 61fa658ebcaf2856d543d376b120932ad5a082f0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 18 Mar 2006 11:10:21 +0000 Subject: r14541: separate smbsrv_request and ntvfs_request, with this it's now possible to write a ntvfs_test programm like the vfstest in samba3 also smb2 support will be possible later metze (This used to be commit 7253153691e35cd206346fbd4e9b9f95c042f602) --- source4/ntvfs/ntvfs_util.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index c7b99d3d24..a6d1ccd3f3 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -27,6 +27,43 @@ #include "ntvfs/ntvfs.h" +_PUBLIC_ struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, TALLOC_CTX *mem_ctx, + struct auth_session_info *session_info, + uint16_t smbpid, uint16_t smbmid, + struct timeval request_time, + void *private_data, + void (*send_fn)(struct ntvfs_request *), + uint32_t state) +{ + struct ntvfs_request *req; + struct ntvfs_async_state *async; + + req = talloc(mem_ctx, struct ntvfs_request); + if (!req) return NULL; + req->ctx = ctx; + req->async_states = NULL; + req->session_info = session_info; + req->smbpid = smbpid; + req->smbmid = smbmid; + req->statistics.request_time = request_time; + + async = talloc(req, struct ntvfs_async_state); + if (!async) goto failed; + + async->state = state; + async->private_data = private_data; + async->send_fn = send_fn; + async->status = NT_STATUS_INTERNAL_ERROR; + async->ntvfs = NULL; + + DLIST_ADD(req->async_states, async); + + return req; + +failed: + return NULL; +} + _PUBLIC_ NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, void *private_data, @@ -35,9 +72,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs, struct ntvfs_async_state *async; async = talloc(req, struct ntvfs_async_state); - if (!async) { - return NT_STATUS_NO_MEMORY; - } + NT_STATUS_HAVE_NO_MEMORY(async); async->state = req->async_states->state; async->private_data = private_data; -- cgit From ad06a8bd651e3a8b598c92a356ac1ce4117ae72e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 26 Mar 2006 01:23:40 +0000 Subject: r14736: - the ntvfs subsystem should not know about smb_server.h - the process module subsystem should not know about smb_server.h - the smb_server module should not know about process models metze (This used to be commit bac95bb8f4ad35a31ee666f5916ff9b2f292d964) --- source4/ntvfs/ntvfs_util.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index a6d1ccd3f3..52f03430ce 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -23,7 +23,6 @@ #include "includes.h" #include "dlinklist.h" -#include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" -- cgit From 9ef33f5f5c786b83311ca088357fb2f0aa72fc9e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 20 May 2006 08:15:22 +0000 Subject: r15734: This is a major change to the NTVFS subsystem: - to use a struct ntvfs_handle instead of a uint16_t fnum. (to make it independend from the frontend protocol) - the allocation of handles now is provided by the frontend (smbsrv_*) via callbacks and not by each backend module - this also makes sure that file handles are only passed to the ntvfs subsystem when the tcon and session matches, so modules can rely on this and need to check this. - this allows multiple modules in the ntvfs module chain to allocate file handles. This can be used for virtual files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"... - also this will make SMB2 with 128 bit file handles possible metze (This used to be commit 287fc1c22d670f6e568014b420f7f4cb31dc7958) --- source4/ntvfs/ntvfs_util.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 52f03430ce..de19a9c352 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -98,3 +98,100 @@ _PUBLIC_ void ntvfs_async_state_pop(struct ntvfs_request *req) talloc_free(async); } + +_PUBLIC_ NTSTATUS ntvfs_handle_new(struct ntvfs_module_context *ntvfs, + struct ntvfs_request *req, + struct ntvfs_handle **h) +{ + return ntvfs->ctx->handles.create_new(ntvfs->ctx->handles.private_data, req, h); +} + +_PUBLIC_ NTSTATUS ntvfs_handle_set_backend_data(struct ntvfs_handle *h, + struct ntvfs_module_context *ntvfs, + TALLOC_CTX *private_data) +{ + struct ntvfs_handle_data *d; + BOOL first_time = h->backend_data?False:True; + + for (d=h->backend_data; d; d = d->next) { + if (d->owner != ntvfs) continue; + d->private_data = talloc_steal(d, private_data); + return NT_STATUS_OK; + } + + d = talloc(h, struct ntvfs_handle_data); + NT_STATUS_HAVE_NO_MEMORY(d); + d->owner = ntvfs; + d->private_data = talloc_steal(d, private_data); + + DLIST_ADD(h->backend_data, d); + + if (first_time) { + NTSTATUS status; + status = h->ctx->handles.make_valid(h->ctx->handles.private_data, h); + NT_STATUS_NOT_OK_RETURN(status); + } + + return NT_STATUS_OK; +} + +_PUBLIC_ void *ntvfs_handle_get_backend_data(struct ntvfs_handle *h, + struct ntvfs_module_context *ntvfs) +{ + struct ntvfs_handle_data *d; + + for (d=h->backend_data; d; d = d->next) { + if (d->owner != ntvfs) continue; + return d->private_data; + } + + return NULL; +} + +_PUBLIC_ void ntvfs_handle_remove_backend_data(struct ntvfs_handle *h, + struct ntvfs_module_context *ntvfs) +{ + struct ntvfs_handle_data *d,*n; + + for (d=h->backend_data; d; d = n) { + n = d->next; + if (d->owner != ntvfs) continue; + DLIST_REMOVE(h->backend_data, d); + talloc_free(d); + d = NULL; + } + + if (h->backend_data) return; + + /* if there's no backend_data anymore, destroy the handle */ + h->ctx->handles.destroy(h->ctx->handles.private_data, h); +} + +_PUBLIC_ struct ntvfs_handle *ntvfs_handle_search_by_wire_key(struct ntvfs_module_context *ntvfs, + struct ntvfs_request *req, + const DATA_BLOB *key) +{ + return ntvfs->ctx->handles.search_by_wire_key(ntvfs->ctx->handles.private_data, req, key); +} + +_PUBLIC_ DATA_BLOB ntvfs_handle_get_wire_key(struct ntvfs_handle *h, TALLOC_CTX *mem_ctx) +{ + return h->ctx->handles.get_wire_key(h->ctx->handles.private_data, h, mem_ctx); +} + +_PUBLIC_ NTSTATUS ntvfs_set_handle_callbacks(struct ntvfs_context *ntvfs, + NTSTATUS (*create_new)(void *private_data, struct ntvfs_request *req, struct ntvfs_handle **h), + NTSTATUS (*make_valid)(void *private_data, struct ntvfs_handle *h), + void (*destroy)(void *private_data, struct ntvfs_handle *h), + struct ntvfs_handle *(*search_by_wire_key)(void *private_data, struct ntvfs_request *req, const DATA_BLOB *key), + DATA_BLOB (*get_wire_key)(void *private_data, struct ntvfs_handle *handle, TALLOC_CTX *mem_ctx), + void *private_data) +{ + ntvfs->handles.create_new = create_new; + ntvfs->handles.make_valid = make_valid; + ntvfs->handles.destroy = destroy; + ntvfs->handles.search_by_wire_key = search_by_wire_key; + ntvfs->handles.get_wire_key = get_wire_key; + ntvfs->handles.private_data = private_data; + return NT_STATUS_OK; +} -- cgit From 017855b766892090837791822f7380a32c30480d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 21 May 2006 08:24:11 +0000 Subject: r15767: we need to free here metze (This used to be commit 98890052fec7ba4a8bf4e07a6b000d04d768f581) --- source4/ntvfs/ntvfs_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index de19a9c352..fec119b653 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -58,8 +58,8 @@ _PUBLIC_ struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, T DLIST_ADD(req->async_states, async); return req; - failed: + talloc_free(req); return NULL; } -- cgit From 8b4da058bcc49a91b332d2999a34e0bb45e0f680 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 21 May 2006 08:29:56 +0000 Subject: r15768: make it possible that the caller of the ntvfs_subsystem doesn't provide handle callbacks metze (This used to be commit dfd07e6f890ebe11d77d39f65c3f6850c9b9c37e) --- source4/ntvfs/ntvfs_util.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index fec119b653..d99d040378 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -103,6 +103,9 @@ _PUBLIC_ NTSTATUS ntvfs_handle_new(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, struct ntvfs_handle **h) { + if (!ntvfs->ctx->handles.create_new) { + return NT_STATUS_NOT_IMPLEMENTED; + } return ntvfs->ctx->handles.create_new(ntvfs->ctx->handles.private_data, req, h); } @@ -171,6 +174,9 @@ _PUBLIC_ struct ntvfs_handle *ntvfs_handle_search_by_wire_key(struct ntvfs_modul struct ntvfs_request *req, const DATA_BLOB *key) { + if (!ntvfs->ctx->handles.search_by_wire_key) { + return NULL; + } return ntvfs->ctx->handles.search_by_wire_key(ntvfs->ctx->handles.private_data, req, key); } -- cgit From 3b36a857980b1f9fa5a6be0253e85c975f35c13f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 11 Jul 2006 18:15:42 +0000 Subject: r16950: remove the smb mid from the ntvfs layer and keep a list of pending requests on the smbsrv_connection, to be able to match then on ntcancel metze (This used to be commit 04f0d3d03179b6060fd013b867d13caa92ec6460) --- source4/ntvfs/ntvfs_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index d99d040378..5c73b53c1c 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -28,7 +28,7 @@ _PUBLIC_ struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, TALLOC_CTX *mem_ctx, struct auth_session_info *session_info, - uint16_t smbpid, uint16_t smbmid, + uint16_t smbpid, struct timeval request_time, void *private_data, void (*send_fn)(struct ntvfs_request *), @@ -43,7 +43,6 @@ _PUBLIC_ struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, T req->async_states = NULL; req->session_info = session_info; req->smbpid = smbpid; - req->smbmid = smbmid; req->statistics.request_time = request_time; async = talloc(req, struct ntvfs_async_state); -- cgit From 0329d755a7611ba3897fc1ee9bdce410cc33d7f8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 30 Aug 2006 11:29:34 +0000 Subject: r17930: Merge noinclude branch: * Move dlinklist.h, smb.h to subsystem-specific directories * Clean up ads.h and move what is left of it to dsdb/ (only place where it's used) (This used to be commit f7afa1cb77f3cfa7020b57de12e6003db7cfcc42) --- source4/ntvfs/ntvfs_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 5c73b53c1c..fc457f21c4 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -22,7 +22,7 @@ */ #include "includes.h" -#include "dlinklist.h" +#include "lib/util/dlinklist.h" #include "ntvfs/ntvfs.h" -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/ntvfs/ntvfs_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index fc457f21c4..3158bdf1fd 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ /* this implements common utility functions that many NTVFS backends may wish to use -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/ntvfs/ntvfs_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 3158bdf1fd..7432ac2c13 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -112,7 +112,7 @@ _PUBLIC_ NTSTATUS ntvfs_handle_set_backend_data(struct ntvfs_handle *h, TALLOC_CTX *private_data) { struct ntvfs_handle_data *d; - BOOL first_time = h->backend_data?False:True; + bool first_time = h->backend_data?false:true; for (d=h->backend_data; d; d = d->next) { if (d->owner != ntvfs) continue; -- cgit From 87f2925252b910f2f403bdbb3f9158202cb7a2c5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 6 Mar 2008 15:14:08 +0100 Subject: ntvfs: pass down the client capabilities into the ntvfs layer Note that we don't use any protocol specific values here. For now only NTVFS_CLIENT_CAP_LEVEL_II_OPLOCKS is defined others should be defined, when we find out that the ntvfs layer needs to know about it. metze (This used to be commit cc42cd5f6753ca582677fa6f403f0419eec5ab10) --- source4/ntvfs/ntvfs_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 7432ac2c13..ebe8008edd 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -42,6 +42,7 @@ _PUBLIC_ struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, T req->async_states = NULL; req->session_info = session_info; req->smbpid = smbpid; + req->client_caps = ctx->client_caps; req->statistics.request_time = request_time; async = talloc(req, struct ntvfs_async_state); -- cgit From afe3e8172ddaa5e4aa811faceecda4f943d6e2ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 04:53:27 +0200 Subject: Install public header files again and include required prototypes. (This used to be commit 47ffbbf67435904754469544390b67d34c958343) --- source4/ntvfs/ntvfs_util.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/ntvfs/ntvfs_util.c') diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index ebe8008edd..fadbe2b80a 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -25,7 +25,7 @@ #include "ntvfs/ntvfs.h" -_PUBLIC_ struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, TALLOC_CTX *mem_ctx, +struct ntvfs_request *ntvfs_request_create(struct ntvfs_context *ctx, TALLOC_CTX *mem_ctx, struct auth_session_info *session_info, uint16_t smbpid, struct timeval request_time, @@ -62,7 +62,7 @@ failed: return NULL; } -_PUBLIC_ NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, void *private_data, void (*send_fn)(struct ntvfs_request *)) @@ -84,7 +84,7 @@ _PUBLIC_ NTSTATUS ntvfs_async_state_push(struct ntvfs_module_context *ntvfs, return NT_STATUS_OK; } -_PUBLIC_ void ntvfs_async_state_pop(struct ntvfs_request *req) +void ntvfs_async_state_pop(struct ntvfs_request *req) { struct ntvfs_async_state *async; @@ -98,7 +98,7 @@ _PUBLIC_ void ntvfs_async_state_pop(struct ntvfs_request *req) talloc_free(async); } -_PUBLIC_ NTSTATUS ntvfs_handle_new(struct ntvfs_module_context *ntvfs, +NTSTATUS ntvfs_handle_new(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, struct ntvfs_handle **h) { @@ -108,7 +108,7 @@ _PUBLIC_ NTSTATUS ntvfs_handle_new(struct ntvfs_module_context *ntvfs, return ntvfs->ctx->handles.create_new(ntvfs->ctx->handles.private_data, req, h); } -_PUBLIC_ NTSTATUS ntvfs_handle_set_backend_data(struct ntvfs_handle *h, +NTSTATUS ntvfs_handle_set_backend_data(struct ntvfs_handle *h, struct ntvfs_module_context *ntvfs, TALLOC_CTX *private_data) { @@ -137,7 +137,7 @@ _PUBLIC_ NTSTATUS ntvfs_handle_set_backend_data(struct ntvfs_handle *h, return NT_STATUS_OK; } -_PUBLIC_ void *ntvfs_handle_get_backend_data(struct ntvfs_handle *h, +void *ntvfs_handle_get_backend_data(struct ntvfs_handle *h, struct ntvfs_module_context *ntvfs) { struct ntvfs_handle_data *d; @@ -150,7 +150,7 @@ _PUBLIC_ void *ntvfs_handle_get_backend_data(struct ntvfs_handle *h, return NULL; } -_PUBLIC_ void ntvfs_handle_remove_backend_data(struct ntvfs_handle *h, +void ntvfs_handle_remove_backend_data(struct ntvfs_handle *h, struct ntvfs_module_context *ntvfs) { struct ntvfs_handle_data *d,*n; @@ -169,7 +169,7 @@ _PUBLIC_ void ntvfs_handle_remove_backend_data(struct ntvfs_handle *h, h->ctx->handles.destroy(h->ctx->handles.private_data, h); } -_PUBLIC_ struct ntvfs_handle *ntvfs_handle_search_by_wire_key(struct ntvfs_module_context *ntvfs, +struct ntvfs_handle *ntvfs_handle_search_by_wire_key(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const DATA_BLOB *key) { @@ -179,12 +179,12 @@ _PUBLIC_ struct ntvfs_handle *ntvfs_handle_search_by_wire_key(struct ntvfs_modul return ntvfs->ctx->handles.search_by_wire_key(ntvfs->ctx->handles.private_data, req, key); } -_PUBLIC_ DATA_BLOB ntvfs_handle_get_wire_key(struct ntvfs_handle *h, TALLOC_CTX *mem_ctx) +DATA_BLOB ntvfs_handle_get_wire_key(struct ntvfs_handle *h, TALLOC_CTX *mem_ctx) { return h->ctx->handles.get_wire_key(h->ctx->handles.private_data, h, mem_ctx); } -_PUBLIC_ NTSTATUS ntvfs_set_handle_callbacks(struct ntvfs_context *ntvfs, +NTSTATUS ntvfs_set_handle_callbacks(struct ntvfs_context *ntvfs, NTSTATUS (*create_new)(void *private_data, struct ntvfs_request *req, struct ntvfs_handle **h), NTSTATUS (*make_valid)(void *private_data, struct ntvfs_handle *h), void (*destroy)(void *private_data, struct ntvfs_handle *h), -- cgit