1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

86 Commits

Author SHA1 Message Date
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
9391dad85d

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 cbd585d2a1)
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 63f3155729)
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 9483b7c137)
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 4eb49335d5)
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 9fc70e2ed6)
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 318038d6f6)
2008-05-27 18:20:23 +10:00
Andrew Tridgell
beac55a88f enforce lock ordering in SMB2
(This used to be commit 3bec932a89)
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 2633bc7497)
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 d1bde5830c)
2008-05-27 16:02:10 +10:00
Andrew Tridgell
506849f600 check invalid create options in the right order
(This used to be commit 73dbfb9b41)
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 a7b5689a73)
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 1590494daf)
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 ea6d9cf602)
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 b781bb733c)
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 60c4a4fc1a)
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 9013748273)
2008-04-17 03:54:26 +02:00
Andrew Tridgell
275f32ae2d fill in unknown fields in SMB2 READ call
(This used to be commit 9b686c1380)
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 47ffbbf674)
2008-04-02 04:53:27 +02:00
Andrew Tridgell
158bd784fc missed another spot in the SMB2 create conversion
(This used to be commit df82b0aa69)
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 566aa14139)
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 fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
37f8c04d90 r22865: handle pending locks in smb2
metze
(This used to be commit 8329fa6895)
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 fbbb144f8e)
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 1e34e4d5a1)
2007-10-10 14:19:16 -05:00
Stefan Metzmacher
e1248154d6 r17088: add ntvfs mapping function for notify
metze
(This used to be commit 7daf432d58)
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 1bb60b5be4)
2007-10-10 14:09:54 -05:00
Stefan Metzmacher
30ae843cbf r16730: that is correct...
metze
(This used to be commit 9c3992a279)
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 f97a21b970)
2007-10-10 14:09:39 -05:00
Stefan Metzmacher
d9bdfb0a07 r15814: add SMB2 Lock interface structure
metze
(This used to be commit 8f1850ef65)
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 d0ac0c5af4)
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 5ab6f304f8)
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 41bc3cfc82)
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 d26144f957)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
35d6a53ff7 r15750: don't clear after setting
metze
(This used to be commit 0e23d2a45a)
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 287fc1c22d)
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 c19c2b51d3)
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 bac95bb8f4)
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 10e627032d)
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 be6d5298a2)
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 b78abbbce6)
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 2ef3f59709)
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 ed9ed1f48f)
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 e1611b6221)
2007-10-10 13:52:01 -05:00
Stefan Metzmacher
69f7c004fe r12838: make the ntvfs function public
metze
(This used to be commit 41a564fdba)
2007-10-10 13:50:04 -05:00
Jelmer Vernooij
0a3c167f6b r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.
(This used to be commit 87f665a1d5)
2007-10-10 13:47:51 -05:00