summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb/service.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-20Have ntvfs_connect() accept union smb_tcon *tcon instead of char* sharenameSam Liddicott1-1/+2
This change brings ntvfs_connect into compliance with other ntvfs functions which take an ntvfs module, an ntvfs request and an smb io union. It now becomes the responsibility of ntvfs modules to examine tcon->generic.level themselves and derive the share name and any other options directly; e.g. const char *sharename; switch (tcon->generic.level) { case RAW_TCON_TCON: sharename = tcon->tcon.in.service; break; case RAW_TCON_TCONX: sharename = tcon->tconx.in.path; break; case RAW_TCON_SMB2: default: return NT_STATUS_INVALID_LEVEL; } if (strncmp(sharename, "\\\\", 2) == 0) { char *p = strchr(sharename+2, '\\'); if (p) { sharename = p + 1; } } service.c smbsrv_tcon_backend() is called before ntvfs_connect and fills in some of the tcon->..out values. For the case of RAW_TCON_TCONX, it filles out tcon->tconx.out.tid and tcon->tconx.out.options For the case of RAW_TCON_TCON it fills out tcon->tcon.out.tid and tcon->tcon.out.max_xmit Thus the ntvfs_connect function for vfs modules may override these values if desired, but are not required to. ntvfs_connect functions are required to fill in the tcon->tconx.out.*_type fields, for RAW_TCON_TCONX, perhaps something like: if (tcon->generic.level == RAW_TCON_TCONX) { tcon->tconx.out.fs_type = ntvfs->ctx->fs_type; tcon->tconx.out.dev_type = ntvfs->ctx->dev_type; } Signed-off-by: Sam Liddicott <sam@liddicott.com> (I fixed the ntvfs_connect() in the smb_server/smb2/ and the RAW_TCON_SMB2 switch case in the modules) Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-04-23Add async support for reply_tcon* and ntvfs_connectSam Liddicott1-20/+1
smbsrv_tcon_backend no longer creates the ntvfs_request wrapper, so smbsrv_reply_tcon* can now do this and then invoke ntvfs_connect in the typical manner using SMBSRV_SETUP_NTVFS_REQUEST and SMBSRV_CALL_NTVFS_BACKEND Previously smbsrv_tcon_backend has been responsible for instantiating the ntvfs_module_context to service a tree-connect request, and then create an ntvfs_request wrapper around the smbsrv_request and pass this to ntvfs_connect for the newly created ntvfs. These actions could not be invoked asynchronously. This meant that any client requests made while instantiating the ntvfs module, including any composite's used during authentication (or related client connections for the case of proxy modules) would block other ntvfs modules and requests in the current process as they executed a nested event loop to await completion. Signed-off-by: Sam Liddicott <sam@liddicott.com> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-06ntvfs: pass down the client capabilities into the ntvfs layerStefan Metzmacher1-0/+6
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)
2007-12-21r26355: Eliminate global_loadparm in more places.Jelmer Vernooij1-1/+1
(This used to be commit 5d589a0d94bd76a9b4c9fc748854e8098ea43c4d)
2007-12-21r26353: Remove use of global_loadparm.Jelmer Vernooij1-0/+1
(This used to be commit 17637e4490e42db6cdef619286c4d5a0982e9d1a)
2007-12-21r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and ↵Jelmer Vernooij1-1/+1
wbsrv_connection. (This used to be commit 7c008664238ed966cb82adf5b25b22157bb50730)
2007-10-10r25398: Parse loadparm context to all lp_*() functions.Jelmer Vernooij1-1/+1
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
2007-10-10r25026: Move param/param.h out of includes.hJelmer Vernooij1-0/+2
(This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31)
2007-10-10r24494: add comment to remind me to look at the flags on a tconxStefan Metzmacher1-0/+2
metze (This used to be commit deefefeadfc4c5c3448ac378e1910fb75df0dc77)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
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)
2007-10-10r22381: fix memory leakStefan Metzmacher1-1/+1
metze (This used to be commit 4bfe900d1b4bd037ce0115cf34761066f667beb6)
2007-10-10r17206: Add a modular API for share configuration.Simo Sorce1-28/+29
Commit the classic backwards compatible module which is the default one (This used to be commit a89cc346b9296cb49929898d257a064a6c2bae86)
2007-10-10r16950: remove the smb mid from the ntvfs layer and keep a list of pendingStefan Metzmacher1-1/+0
requests on the smbsrv_connection, to be able to match then on ntcancel metze (This used to be commit 04f0d3d03179b6060fd013b867d13caa92ec6460)
2007-10-10r15769: this functions belong to params/ so move it.Stefan Metzmacher1-1/+1
metze (This used to be commit 9c4c40772bfd8a8324cd086c2234451d164be5d0)
2007-10-10r15747: move some functions to the protocol independend part of theStefan Metzmacher1-42/+1
smb server metze (This used to be commit 79af05551fe5f7b364c9f515ba4db54dd72907f8)
2007-10-10r15734: This is a major change to the NTVFS subsystem:Stefan Metzmacher1-1/+13
- 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)
2007-10-10r14541: separate smbsrv_request and ntvfs_request,Stefan Metzmacher1-2/+11
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)
2007-10-10r14487: split smbsrv_request into two parts, one will be moved to ntvfs_requestStefan Metzmacher1-0/+23
but I don't to get the commit to large, to I'll do this tomorrow... metze (This used to be commit 10e627032d7d04f1ebf6efed248c426614f5aa6f)
2007-10-10r14485: mark smb commands as need session and need tcon explicit,Stefan Metzmacher1-5/+0
so we only need to check in one global place and can't forget in other places... metze (This used to be commit 742be8e075651c3b7e502ec6da01286fd7a2d4ca)
2007-10-10r14456: don't access the smbsrv_tcon inside the ntvfs modulesStefan Metzmacher1-15/+28
metze (This used to be commit 5709c1c4e1a561dd9af98cfefbbbdac9b18765b7)
2007-10-10r13866: prefix more functions with smbsrv_Stefan Metzmacher1-1/+1
metze (This used to be commit bb083f17c961964dd99185ae4194596ccaafd4a8)
2007-10-10r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.Jelmer Vernooij1-0/+1
(This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1)
2007-10-10r12102: for SMB2 we need to allocate tcons per sessionStefan Metzmacher1-1/+1
metze (This used to be commit 4d527ac005086c2db954578b4126ca128e436e01)
2007-10-10r11786: move all SMB protocol specific stuff to smb_server/smb/Stefan Metzmacher1-0/+194
metze (This used to be commit 5fea278cb65076cea71bb6c921e51c4feffc37d7)