1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

87 Commits

Author SHA1 Message Date
Stefan Metzmacher
77f335042b s4:ntvfs_generic: check for valid SMB2_LOCK flags
metze
2009-11-18 08:24:13 +01:00
Andrew Tridgell
3c028ff88b s4-smb: declare root_fid as a file handle
In order to implement root_fid in the s4 SMB server we need to declare
it as a handle type, just as for other fnum values in SMB. This
required some extensive (but simple) changes in many bits of code.
2009-10-15 20:03:00 +11:00
Sam Liddicott
131c95edda Upgrade ntvfs_map_*info to ntvfs_map_async_setup/ntvfs_map_async_finish
ntvfs_map_fsinfo, ntvfs_map_qpathinfo, ntvfs_map_qfileinfo used an
old synchronous mapping technique, acceptable on the grounds that
they were only used by the simple vfs which was synchronous.

Other vfs may/do use these functions, and by upgrading them to use the
ntvfs_map_async_setup/ntvfs_map_async_finish framework, they can now be
used asynchronously.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-06-26 14:39:44 +02:00
Stefan Metzmacher
66b2604ef1 s4:ntvfs_generic: use talloc_get_type() to remote compiler warnings
metze
2009-02-13 13:44:36 +01:00
Stefan Metzmacher
71b3582fe4 s4:ntvfs_generic: pass RAW-OPEN again
This is the samba4 version of commit
9391dad85d08bb0939f4db1472c6cf063ebea892

metze
2008-12-18 13:32:49 +01:00
Andrew Tridgell
f4e212323f added some debug code 2008-09-23 12:09:56 +10:00
Stefan Metzmacher
548ed8d958 ntvfs_generic: fix handling of create_options for SMB2
metze
(This used to be commit cbd585d2a1e179615eba773cb07385524369c686)
2008-08-14 13:13:51 +02:00
Andrew Tridgell
538f624fe0 it is not valid to set a UNLOCK flag on a lock request
(This used to be commit 63f315572969e7fc52bdc7c0b38eaaee736d5e2a)
2008-06-03 09:36:02 +10:00
Andrew Tridgell
8da3217d1b smbpid is 32 bit, and update SMB2 locking per MS-SMB2
The UNLOCK bit is only used from the first lock structure
(This used to be commit 9483b7c137b61d3029a1e1e7d8d8d0723b541129)
2008-06-02 11:04:13 +10:00
Andrew Tridgell
c86dc11be6 added support for returning the maximal access MXAC tag in SMB2 create
(This used to be commit 4eb49335d5f0319f9aa47ded5215a2977d3336bf)
2008-05-29 19:16:26 +10:00
Andrew Tridgell
6b70726305 implement the documented SMB2 create blobs in the server
Not all of them are honoured yet, but they are all parsed and the ones
that have SMB equivalents are honoured
(This used to be commit 9fc70e2ed6a54f6d9a0530f4d37c0f8acadb6778)
2008-05-28 16:28:37 +10:00
Andrew Tridgell
8daeee5c5d ensure that we honor SMB2 read min_count properly
(This used to be commit 318038d6f670efffa96d8b0db63f46b3752e1cd3)
2008-05-27 18:20:23 +10:00
Andrew Tridgell
beac55a88f enforce lock ordering in SMB2
(This used to be commit 3bec932a89006521ba74bde7943b8cd5b4a660d8)
2008-05-27 17:22:02 +10:00
Andrew Tridgell
cb36437db2 added support for the output fields of SMB2 close
(This used to be commit 2633bc749792c224acc73a2e4ca723404331c19c)
2008-05-27 16:43:36 +10:00
Andrew Tridgell
848e7c5830 it seems that lock flags are only validated when UNLOCK is set
(This used to be commit d1bde5830cd56042236d72598e5cfe9c7abc4c47)
2008-05-27 16:02:10 +10:00
Andrew Tridgell
506849f600 check invalid create options in the right order
(This used to be commit 73dbfb9b4148dbfdc30518c08db4658d189f4160)
2008-05-27 12:42:43 +10:00
Andrew Tridgell
2ad2bdda89 stricter checks for valid inputs in SMB2 open and lock
(This used to be commit a7b5689a73adde59de28770aa3949660441291ea)
2008-05-26 15:02:43 +10:00
Andrew Tridgell
2e0f61a18a SMB2 read returns NT_STATUS_END_OF_FILE on read past end of file
(This used to be commit 1590494daf5abe43e43402e7602f92267bcda34b)
2008-05-22 23:07:16 +10:00
Andrew Tridgell
4d39976ddd fixed SMB2 locking
- SMB2 locking is different in several ways from SMB locking. To fix
  it properly we will need a new generic mapping structure for
  locking, but for now do a best effort mapping

- added locking to gentest_smb2
(This used to be commit ea6d9cf602302adafe0f9d5f5f90a9b26d1ead6f)
2008-05-21 22:12:20 +10:00
Stefan Metzmacher
39d2302721 ntvfs_generic: map RAW_LOCK_SMB2_BREAK to RAW_LOCK_GENERIC
metze
(This used to be commit b781bb733c9a563457f87c94abe8c91b426c07ee)
2008-04-19 01:54:45 +02:00
Stefan Metzmacher
b2f2c1486e ntvfs_generic: fix mapping the granted oplocks for SMB2
metze
(This used to be commit 60c4a4fc1afe88716ac63d3ea430e07fea7b9991)
2008-04-19 01:54:42 +02:00
Stefan Metzmacher
baad7a7e56 ntvfs_generic: map SMB2 oplock levels to the generic ones
metze
(This used to be commit 9013748273378f88bfc66d3583814f0fee67c40f)
2008-04-17 03:54:26 +02:00
Andrew Tridgell
275f32ae2d fill in unknown fields in SMB2 READ call
(This used to be commit 9b686c138037f613da15168d0722786e00f023e5)
2008-04-14 11:31:17 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf67435904754469544390b67d34c958343)
2008-04-02 04:53:27 +02:00
Andrew Tridgell
158bd784fc missed another spot in the SMB2 create conversion
(This used to be commit df82b0aa6990b59cde20893cb690a8a260526178)
2008-02-13 17:36:41 +11:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
2007-10-10 15:07:55 -05:00
Andrew Tridgell
0479a2f1cb 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)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
37f8c04d90 r22865: handle pending locks in smb2
metze
(This used to be commit 8329fa689521b12e4ce2ac094b3e322fa4ed4bb8)
2007-10-10 14:52:25 -05:00
Stefan Metzmacher
bd93b41d17 r22849: map smb2 lock to the generic level
metze
(This used to be commit fbbb144f8e5271a543c0b47b0105eccd357477ba)
2007-10-10 14:52:24 -05:00
Andrew Tridgell
921f73c7e5 r18835: expand IO limits on SMB2. Samba4 now tops out at 16.7MB IOs.
(This used to be commit 1e34e4d5a1fd3d74080424140e4ab276b6042d12)
2007-10-10 14:19:16 -05:00
Stefan Metzmacher
e1248154d6 r17088: add ntvfs mapping function for notify
metze
(This used to be commit 7daf432d58ecebd10a28acd3ddbded9cb16536d0)
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
1b45214f31 r16868: init some uninitialized values
(found by valgrind)

metze
(This used to be commit 1bb60b5be48fab7d84594283f58d2bc04c474b0c)
2007-10-10 14:09:54 -05:00
Stefan Metzmacher
30ae843cbf r16730: that is correct...
metze
(This used to be commit 9c3992a27948f01803650c446914aa24be2a8d7a)
2007-10-10 14:09:41 -05:00
Stefan Metzmacher
d63dd113ae r16699: the layout of SMB2 Read and Write is identical...
so we know that the 9th bytes is just uninitialized padding

metze
(This used to be commit f97a21b970ed23973cced2c67b5bc9ecd7afee88)
2007-10-10 14:09:39 -05:00
Stefan Metzmacher
d9bdfb0a07 r15814: add SMB2 Lock interface structure
metze
(This used to be commit 8f1850ef65dc8c860912639d787d82399d015f13)
2007-10-10 14:08:27 -05:00
Stefan Metzmacher
e23cc70a72 r15760: - add RAW_READ_SMB2 => generic mapping
- Implement SMB2 Read

metze
(This used to be commit d0ac0c5af44ba5aa8b18106c2ac26c0d194e59b4)
2007-10-10 14:08:15 -05:00
Stefan Metzmacher
772c492840 r15757: - add RAW_WRITE_SMB2 => generic mapping
- implement SMB2 Write

metze
(This used to be commit 5ab6f304f8b91c0362fd57429cc24126b241bd51)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
183fb2bd4b r15754: - implement SMB2 Close
- add RAW_CLOSE_SMB2 generic mapping

metze
(This used to be commit 41bc3cfc822bfc2fe4413f93a180fc4507005282)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
6af051409a r15752: - add generic mapping for RAW_OPEN_SMB2
metze
(This used to be commit d26144f9575f1e53bfb837024d964a3324d38728)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
35d6a53ff7 r15750: don't clear after setting
metze
(This used to be commit 0e23d2a45a4507051bb3453387b82e7a9f4433ea)
2007-10-10 14:08:13 -05:00
Stefan Metzmacher
9ef33f5f5c 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)
2007-10-10 14:08:10 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3e1ad347120b06a22bda5ec586c22e8)
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
ad06a8bd65 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)
2007-10-10 13:59:17 -05:00
Stefan Metzmacher
d3087451c4 r14487: split smbsrv_request into two parts, one will be moved to ntvfs_request
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-10 13:57:32 -05:00
Stefan Metzmacher
a1b295ed48 r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo

metze
(This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
2007-10-10 13:57:06 -05:00
Andrew Tridgell
7f0c7702f6 r14208: removed use of req->flags2 inside the ntvfs layer. This should help
metze on his quest to unify the ntvfs strucures for the smb and smb2
servers. The only place we needed flags2 inside ntvfs was for the
FLAGS2_READ_PERMIT_EXECUTE bit, which only affects readx, so I added a
readx.in.read_for_execute flag instead.
(This used to be commit b78abbbce60ab0009da19a72dd769800c44298a2)
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
307e43bb56 r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)
2007-10-10 13:56:57 -05:00
Stefan Metzmacher
86497db611 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)
2007-10-10 13:56:55 -05:00
Stefan Metzmacher
fd9a6d5e46 r13623: - make sure ntvfs_map_qfileinfo isn't used for async replies
- add some comments

metze
(This used to be commit e1611b622184b48d2cef1eff2646a09f9e691f9b)
2007-10-10 13:52:01 -05:00
Stefan Metzmacher
69f7c004fe r12838: make the ntvfs function public
metze
(This used to be commit 41a564fdba5969fc7e518439520764fd56cfa280)
2007-10-10 13:50:04 -05:00