summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb2/tcon.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-20Have ntvfs_connect() accept union smb_tcon *tcon instead of char* sharenameSam Liddicott1-7/+7
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>
2008-06-02more updates for new info levelsAndrew Tridgell1-1/+1
(This used to be commit 85d1873ee92fcc7df3addc42ddb8189144901f8b)
2008-03-06ntvfs: pass down the client capabilities into the ntvfs layerStefan Metzmacher1-0/+4
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)
2008-02-183 places where the VFS backend doesn't handle NULL strings.Andrew Tridgell1-0/+5
(This used to be commit cf109460aff5a8437ab7eba05e4d7316a131080e)
2008-02-14Convert SMB and SMB2 code to use a common buffer handling structureAndrew Tridgell1-0/+2
This converts our SMB and SMB2 code to use a common structure "struct request_bufinfo" for information on the buffer bounds of a packet, alignment information and string handling. This allows us to use a common backend for SMB and SMB2 code, while still using all the same string and blob handling functions. Up to now we had been passing a NULL req handle into these common routines from the SMB2 side of the server, which meant that we failed any operation which did a bounds checked string extraction (such as a RenameInformation setinfo call, which is what Vista uses for renaming files) There is still some more work to be done on this - for example we can now remove many of the SMB2 specific buffer handling functions that we had, and use the SMB ones. (This used to be commit ca6d9be6cb6a403a81b18fa6e9a6a0518d7f0f68)
2008-02-13updated SMB2 tcon as per WSPP docsAndrew Tridgell1-17/+11
(This used to be commit 5913e3e549e71affc66c28cacb6563331fb0c790)
2008-02-12updated SMB2 header defines to match WSPP docsAndrew Tridgell1-11/+11
(This used to be commit d2c6ad55eca27f50a38fc6e2a85032eddb3f0aae)
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/+2
(This used to be commit 17637e4490e42db6cdef619286c4d5a0982e9d1a)
2007-10-10r25551: Convert to standard bool type.Jelmer Vernooij1-5/+5
(This used to be commit c9651e2c5c078edee7b91085e936a93625c8d708)
2007-10-10r25035: Fix some more warnings, use service pointer rather than service ↵Jelmer Vernooij1-1/+2
number in more places. (This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
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-10r23045: forward SMB2 oplock breaks to the clientStefan Metzmacher1-2/+49
metze (This used to be commit 577acc198b096a1e182568b6db93c2da132b647e)
2007-10-10r23044: - use uint32_t for handle id'sStefan Metzmacher1-12/+18
- include the session vuid in the SMB2 128-Bit wire handles as SMB2 oplock breaks doesn't include a TID or VUID in the header we need to make sure the handle is unique for the whole TCP connection metze (This used to be commit 7c29b8a7e67c48478399788912b22c287fbd3b4e)
2007-10-10r22866: handle incoming chained smb2 requests in our server code to letStefan Metzmacher1-0/+11
the windows explorer in longhorn beta3 work. metze (This used to be commit 2390c9f24daccec917608cac0870890cdc73cb1c)
2007-10-10r17360: add some commentsStefan Metzmacher1-3/+23
metze (This used to be commit 3d849f9d2565ebcba16653df3ce2060d3b606c50)
2007-10-10r17206: Add a modular API for share configuration.Simo Sorce1-13/+14
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-10r16913: better return the same values as vista beta2Stefan Metzmacher1-2/+16
metze (This used to be commit ae9c007324b04a81fd367e4e72f50275df137d46)
2007-10-10r16912: I messed up the numbers for ipc and print shares...Stefan Metzmacher1-2/+2
This caused vista beta2 to not do any rpc calls against samba4 metze (This used to be commit b42d918d56387a4d5dd27cc4dfc187990195d9c3)
2007-10-10r16911: the TID is only 32 bits...don't overwrite parts of the UID fieldStefan Metzmacher1-1/+1
metze (This used to be commit 7db393e5ea15dd363f83dcf5eb299f2806971f97)
2007-10-10r16910: - don't search the wildcard handleStefan Metzmacher1-0/+8
(a handle with all bits set to 1 is justed for some SMB2 Ioctl calls...) - don't crash if we didn't find the tcon metze (This used to be commit 27087818c7e8cbaadbcd640fe3b0ffc1c3455b04)
2007-10-10r16732: use the given macrosStefan Metzmacher1-30/+5
metze (This used to be commit 6d5c74c38ca4d4a605b619cd7cbbd7e1dccd6b0c)
2007-10-10r15769: this functions belong to params/ so move it.Stefan Metzmacher1-1/+1
metze (This used to be commit 9c4c40772bfd8a8324cd086c2234451d164be5d0)
2007-10-10r15751: thanks to talloc_get_type() I noticed that I used smbsrv_request in ↵Stefan Metzmacher1-4/+4
the smb2srv code metze (This used to be commit 6c304a1a5f5dc6b2d3774682303874444a59b07d)
2007-10-10r15749: - pass in a dummy oplock callbackStefan Metzmacher1-4/+118
- pass in SMB2 ntvfs_handle callbacks metze (This used to be commit 338aee88d4ba3b25b473a456e55dd7ff5c1a4c5d)
2007-10-10r15748: - implement SMB2 TreeConnect server codeStefan Metzmacher1-5/+105
TODO: pass in oplock and handle callbacks, but as we don't do file access yet, it's no problem to skip them metze (This used to be commit 4ae4a742fc2e40b2937d9ce01f2e45f43f7ff1c3)
2007-10-10r15743: use union smb_tconStefan Metzmacher1-16/+17
metze (This used to be commit 012a08cfb9d550a47bed49b18335a038ae19605c)
2007-10-10r15535: fix the buildStefan Metzmacher1-0/+1
metze (This used to be commit 297868325f305c652b14023a698099d5b358d70a)
2007-10-10r15533: with this vista does a fine SMB2 TreeConnect against samba4Stefan Metzmacher1-4/+4
metze (This used to be commit 6c920d21a16e88040818cc8db6ebe918b5669a9b)
2007-10-10r15532: add a BOOL body_dynamic_present, because the body_dynamic_size can be 0Stefan Metzmacher1-2/+2
also if the dynamic flag should be set metze (This used to be commit 7829100e1ee79f4f5d24004af221288e19c09b3e)
2007-10-10r15304: Fix smbd build, more updates on getting --enable-dso to build againJelmer Vernooij1-0/+1
(This used to be commit 3ef9326386ba1c210166302cbcf02d2ed3f19944)
2007-10-10r14456: don't access the smbsrv_tcon inside the ntvfs modulesStefan Metzmacher1-1/+1
metze (This used to be commit 5709c1c4e1a561dd9af98cfefbbbdac9b18765b7)
2007-10-10r12102: for SMB2 we need to allocate tcons per sessionStefan Metzmacher1-1/+1
metze (This used to be commit 4d527ac005086c2db954578b4126ca128e436e01)
2007-10-10r12094: - implement dummy smb2srv_tcon()Stefan Metzmacher1-2/+122
- implement smb2srv_tdis() metze (This used to be commit cb9ddf7997731a4ad21f274fcb2e713614b382ef)
2007-10-10r11789: - add the start of a SMB2 serverStefan Metzmacher1-0/+34
- it does Negprot and SessionSetup yet the rest returns NT_STATUS_NOT_IMPLEMENTED - it's off by default, enable with: smbsrv:enable smb2 = yes - negotition in the SMB Negprot isn't supported yet - it's only tested with smbtorture SMB2-CONNECT not with vista as client metze (This used to be commit 08b31d5f618d2e416cb9812ad3a49754cd7212b8)