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

38 Commits

Author SHA1 Message Date
Stefan Metzmacher
592ac97728 s4:ntvfs: s/!= PROTOCOL_SMB2/< PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:34 +02:00
Stefan Metzmacher
1ba5077e5f s4:ntvfs: s/== PROTOCOL_SMB2/>= PROTOCOL_SMB2_02/
metze
2011-09-05 13:17:33 +02:00
Andrew Tridgell
2e1637833b s4-pvfs: log more error conditions in NTVFS backend
This should make is easier to track down some bug reports

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 16:12:06 +11:00
Andrew Tridgell
ff388611f4 fixed support for readx greater than 64k
This fixes bug 6547, where smbclient in S3 reads more than 64k at a
time with readx.
2009-08-04 16:01:11 +10:00
Stefan Metzmacher
3d6587c777 s4:pvfs: use talloc_get_type() to cast from void *
metze
2009-02-05 17:48:07 +01:00
Andrew Tridgell
b5f39fbda0 fix error code for read on a directory
(This used to be commit afd4f47971)
2008-05-28 11:48:11 +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
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
Andrew Tridgell
e0e96ae80d r20624: added AIO read to pvfs backend
(This used to be commit d6e20d6d8c)
2007-10-10 14:37:16 -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
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
Andrew Tridgell
e54abee4e1 r14933: fix the handling of notify filters to be much closer to the behaviour
of w2k3. The behaviour is particularly tricky for rename.
(This used to be commit 4d3b8d9549)
2007-10-10 14:00:19 -05:00
Andrew Tridgell
ed3fc62871 r14797: added checking of the filter in notify requests
(This used to be commit 1db0a5a7f4)
2007-10-10 13:59:20 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -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
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
fdc9f417d8 r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
(This used to be commit 01c0fa722f)
2007-10-10 13:06:13 -05:00
Andrew Tridgell
ae7caf08c1 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
(This used to be commit b6452c4a20)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
e7810eeab7 r3658: use handle->fd == -1 as the primary indicator of a directory. This
fixes a directory creation problem from WinXP
(This used to be commit 4b3afc6c39)
2007-10-10 13:05:42 -05:00
Andrew Tridgell
c077300a22 r3618: - this adds the special case for DENY_DOS semantics, as shown by the BASE-DENYDOS test.
- pvfs now passes BASE-DENY1 and BASE-DENYDOS.
(This used to be commit aa09df22ee)
2007-10-10 13:05:40 -05:00
Andrew Tridgell
19fc6e8f51 r3615: split out struct pvfs_file_handle from struct pvfs_file. This is in
preparation for adding code to pass the BASE-DENY1 and BASE-DENYDOS
tests, which require a shared filesystem handle for some specific
combinations of two DENY_DOS opens on the same connection.
(This used to be commit 6e4fdf01d1)
2007-10-10 13:05:40 -05:00
Andrew Tridgell
0a8dff9e47 r3544: fixed some #include lines to make them more consistent
(This used to be commit a1a0118bd3)
2007-10-10 13:05:30 -05:00
Andrew Tridgell
f4ec1497a1 r3455: some more portability fixes. We nearly compile on solaris again now.
(This used to be commit 4f33247f1c)
2007-10-10 13:05:15 -05:00
Andrew Tridgell
d93636c29e r3387: fixed pvfs to pass the NTDENY tests. The tricky bit was
SA_RIGHT_FILE_EXECUTE, which depends on a flags2 bit
(This used to be commit c36851d230)
2007-10-10 13:05:04 -05:00
Andrew Tridgell
9752471973 r3363: added basic support for SA_RIGHT_FILE_EXECUTE, needed for opening .dll files
(This used to be commit ba1bfd51e1)
2007-10-10 13:05:01 -05:00
Andrew Tridgell
ba15d622d3 r3241: don't skip the read completely for a zero-length read, as it could give a lock conflict
(This used to be commit 7ce6139f98)
2007-10-10 13:04:45 -05:00
Andrew Tridgell
e9820e1b6e r3240: - update the rules for what error codes should be given on the
different type of unlink an seach mismatches

- wildcard directory listings that have attribute
  FILE_ATTRIBUTE_DIRECTORY and match "." or ".." should be failed.

- don't set the write_time on SMBclose unless it is non-zero

- added much better support for setfileinfo and setpathinfo in pvfs

- better (and more efficient) handling of .. and . components in filenames
(This used to be commit 9305b07af3)
2007-10-10 13:04:45 -05:00
Andrew Tridgell
62e58ea718 r3161: pvfs now passes the RAW-SEEK test
(This used to be commit a953d4a42c)
2007-10-10 13:02:27 -05:00
Andrew Tridgell
3d5f3e39e5 r3147: added basic share modes support for pvfs (or more precisely, ntcreatex
share_access support).  This is enough for us to pass the BASE-DENY2
test, but is a long way from fully correct share modes.
(This used to be commit b5a6dd3cbf)
2007-10-10 13:02:25 -05:00
Andrew Tridgell
20d17b8057 r3081: several updates to ntvfs and server side async request handling in
preparation for the full share modes and ntcreatex code that I am
working on.

highlights include:

 - changed the way a backend determines if it is allowed to process a
   request asynchronously. The previous method of looking at the
   send_fn caused problems when an intermediate ntvfs module disabled
   it, and the caller then wanted to finished processing using this
   function. The new method is a REQ_CONTROL_MAY_ASYNC flag in
   req->control_flags, which is also a bit easier to read

 - fixed 2 bugs in the readbraw server code. One related to trying to
   answer a readbraw with smb signing (which can't work, and crashed
   our signing code), the second related to error handling, which
   attempted to send a normal SMB error packet, when readbraw must
   send a 0 read reply (as it has no header)

 - added several more ntvfs_generic.c generic mapping functions. This
   means that backends no longer need to implement such esoteric
   functions as SMBwriteunlock() if they don't want to. The backend
   can just request the mapping layer turn it into a write followed by
   an unlock. This makes the backends considerably simpler as they
   only need to implement one style of each function for lock, read,
   write, open etc, rather than the full host of functions that SMB
   provides. A backend can still choose to implement them
   individually, of course, and the CIFS backend does that.

 - simplified the generic structures to make them identical to the
   principal call for several common SMB calls (such as
   RAW_WRITE_GENERIC now being an alias for RAW_WRITE_WRITEX).

 - started rewriting the pvfs_open() code in preparation for the full
   ntcreatex semantics.

 - in pvfs_open and ipc_open, initially allocate the open file
   structure as a child of the request, so on error we don't need to
   clean up. Then when we are going to succeed the open steal the
   pointer into the long term backend context. This makes for much
   simpler error handling (and fixes some bugs)

 - use a destructor in the ipc backend to make sure that everthing is
   cleaned up on receive error conditions.

 - switched the ipc backend to using idtree for fnum allocation

 - in the ntvfs_generic mapping routines, use a allocated secondary
   structure not a stack structure to ensure the request pointer
   remains valid even if the backend replies async.
(This used to be commit 3457c1836c)
2007-10-10 13:01:57 -05:00
Andrew Tridgell
fef617c31b r3012: added initial support for byte range locking in the posix vfs. This is
enough for us to pass locktest, but does not yet support lock timeouts
and some of the other esoteric features.
(This used to be commit 58a92abd88)
2007-10-10 12:59:57 -05:00
Stefan Metzmacher
dcad0f6fd4 r2751: this is a new ntvfs design which tries to solve:
- the stacking of modules
- finding the modules private data
- hide the ntvfs details from the calling layer
- I set NTVFS_INTERFACE_VERSION 0 till we are closer to release
  (because we need to solve some async problems with the module stacking)

metze
(This used to be commit 3ff03b5cb2)
2007-10-10 12:59:30 -05:00
Andrew Tridgell
e3880fa759 r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()
rather than manual reference counts

- properly support SMBexit in the cifs and posix backends

- added a logoff method to all backends

With these changes the RAW-CONTEXT test now passes against the posix backend
(This used to be commit c315d6ac1c)
2007-10-10 12:59:18 -05:00
Andrew Tridgell
a3cec511bb r2561: completely redid the ntvfs module chaining code, You can now do something like:
ntvfs handler = nbench posix

and the nbench pass-thru module will be called before the posix
module. The chaining logic is now much saner, and less racy, with each
level in the chain getting its own private pointer rather than relying
on save/restore logic in the pass-thru module.

The only pass-thru module we have at the moment is the nbench one
(which records all traffic in a nbench compatibe format), but I plan
on soon writing a "unixuid" pass-thru module that will implement the
setegid()/setgroups()/seteuid() logic for standard posix uid
handling. This separation of the posix backend from the uid handling
should simplify the code, and make development easier.

I also modified the nbench module so it can do multiple chaining, so
if you want to you can do:

   ntvfs module = nbench nbench posix

and it will save 2 copies of the log file in /tmp. This is really only
useful for testing at the moment until we have more than one pass-thru
module.
(This used to be commit f84c0af35c)
2007-10-10 12:59:06 -05:00
Andrew Tridgell
8a1c3ddd94 r2436: the second big lump of posix vfs code.
this is still just a skeleton, and many of the functions are just
based on the simple vfs backend, they are there to allow me to run
smbtorture tests against the real parts of the posix backend.
(This used to be commit f2fa7fe565)
2007-10-10 12:58:52 -05:00