1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-22 07:33:16 +03:00
Commit Graph

63 Commits

Author SHA1 Message Date
Andrew Tridgell
df82b0aa69 missed another spot in the SMB2 create conversion 2008-02-13 17:36:41 +11:00
Jelmer Vernooij
566aa14139 r25554: Convert last instances of BOOL, True and False to the standard types. 2007-10-10 15:07:55 -05:00
Andrew Tridgell
fcf38a38ac 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.
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
8329fa6895 r22865: handle pending locks in smb2
metze
2007-10-10 14:52:25 -05:00
Stefan Metzmacher
fbbb144f8e r22849: map smb2 lock to the generic level
metze
2007-10-10 14:52:24 -05:00
Andrew Tridgell
1e34e4d5a1 r18835: expand IO limits on SMB2. Samba4 now tops out at 16.7MB IOs. 2007-10-10 14:19:16 -05:00
Stefan Metzmacher
7daf432d58 r17088: add ntvfs mapping function for notify
metze
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
1bb60b5be4 r16868: init some uninitialized values
(found by valgrind)

metze
2007-10-10 14:09:54 -05:00
Stefan Metzmacher
9c3992a279 r16730: that is correct...
metze
2007-10-10 14:09:41 -05:00
Stefan Metzmacher
f97a21b970 r16699: the layout of SMB2 Read and Write is identical...
so we know that the 9th bytes is just uninitialized padding

metze
2007-10-10 14:09:39 -05:00
Stefan Metzmacher
8f1850ef65 r15814: add SMB2 Lock interface structure
metze
2007-10-10 14:08:27 -05:00
Stefan Metzmacher
d0ac0c5af4 r15760: - add RAW_READ_SMB2 => generic mapping
- Implement SMB2 Read

metze
2007-10-10 14:08:15 -05:00
Stefan Metzmacher
5ab6f304f8 r15757: - add RAW_WRITE_SMB2 => generic mapping
- implement SMB2 Write

metze
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
41bc3cfc82 r15754: - implement SMB2 Close
- add RAW_CLOSE_SMB2 generic mapping

metze
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
d26144f957 r15752: - add generic mapping for RAW_OPEN_SMB2
metze
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
0e23d2a45a r15750: don't clear after setting
metze
2007-10-10 14:08:13 -05:00
Stefan Metzmacher
287fc1c22d 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
2007-10-10 14:08:10 -05:00
Jelmer Vernooij
c19c2b51d3 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
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
bac95bb8f4 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
2007-10-10 13:59:17 -05:00
Stefan Metzmacher
10e627032d 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
2007-10-10 13:57:32 -05:00
Stefan Metzmacher
be6d5298a2 r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo

metze
2007-10-10 13:57:06 -05:00
Andrew Tridgell
b78abbbce6 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.
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
2ef3f59709 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
2007-10-10 13:56:57 -05:00
Stefan Metzmacher
ed9ed1f48f 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
2007-10-10 13:56:55 -05:00
Stefan Metzmacher
e1611b6221 r13623: - make sure ntvfs_map_qfileinfo isn't used for async replies
- add some comments

metze
2007-10-10 13:52:01 -05:00
Stefan Metzmacher
41a564fdba r12838: make the ntvfs function public
metze
2007-10-10 13:50:04 -05:00
Jelmer Vernooij
87f665a1d5 r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server. 2007-10-10 13:47:51 -05:00
Jeremy Allison
26f63973e6 r10138: Fix the mapping table (as tested in smbtorture). EXEC_ACCESS
should map to SEC_RIGHTS_FILE_READ, not READ|WRITE.
Jeremy.
2007-10-10 13:38:02 -05:00
Andrew Tridgell
87cdd11708 r8107: now that we properly separate DOS and NT status codes all the places
that relied on the mapping need to be fixed. The first thing is to get
all the torture tests working against w2k3 again with nt status codes
enabled. The 2nd step will be to make them pass with nt status
disabled.

This starts on the first task, fixing the assumption that
NT_STATUS_INVALID_LOCK_SEQUENCE is a valid substitute for
ERRDOS:ERRbadaccess
2007-10-10 13:19:08 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
a56d95ad89 r4173: - new t2open code, that can cope with "create with EAs". Many thanks
to kukks on #samba-technical for the sniffs that allowed me to work
  this out

- much simpler ntvfs open generic mapping code

- added t2open create with EA torture test to RAW-OPEN test
2007-10-10 13:07:22 -05:00
Andrew Tridgell
01c0fa722f 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.
2007-10-10 13:06:13 -05:00
Andrew Tridgell
aa09df22ee 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.
2007-10-10 13:05:40 -05:00
Andrew Tridgell
09b4652b40 r3574: the RAW-OPEN test changes broke a couple of the other tests. This
fixes most of them, although RAW-SEARCH still fails (due to an
interaction with the new xattr code)
2007-10-10 13:05:33 -05:00
Andrew Tridgell
ed844192d7 r3573: added trans2open support to smbd and pvfs, and fine-tuned the open->generic ntvfs mapping code. 2007-10-10 13:05:33 -05:00
Andrew Tridgell
1d2f0a55c1 r3531: add support for RAW_OPEN_MKNEW, RAW_OPEN_CREATE and RAW_OPEN_CTEMP in pvfs 2007-10-10 13:05:29 -05:00
Andrew Tridgell
730ae0600e r3530: make sure we match ntvfs_async_state_pop() with ntvfs_async_state_push() 2007-10-10 13:05:29 -05:00
Andrew Tridgell
3423e2f414 r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout).

pvfs now passes the RAW-MUX test
2007-10-10 13:05:28 -05:00
Andrew Tridgell
9e80eb18ae r3522: added async support to most of the ntvfs_map_*() functions, allowing functions like
SMBopenx, SMBread and SMBwrite to be performed async
2007-10-10 13:05:28 -05:00
Andrew Tridgell
7c4e6ebf05 r3466: split out request.h, signing.h, and smb_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
1087ea830e r3461: another place where "open" was used as a structure element 2007-10-10 13:05:16 -05:00
Andrew Tridgell
4e92e15c4e r3458: more solaris portability fixes, the main one being that we can't use a
structure element called "open" as its a macro on solaris.
2007-10-10 13:05:16 -05:00
Andrew Tridgell
8d71ed9271 r3427: split the openx logic out from the other open mapping code 2007-10-10 13:05:08 -05:00
Stefan Metzmacher
fde64c0dc1 r3336: use a struct ntvfs_async_state to be able to do async chaning of ntvfs modules
the idea is that a passthru module can use ntvfs_async_state_push() before
calling ntvfs_next_*() and in the _send function it calls
ntvfs_async_state_pop() and then call the upper layer send_fn itself

- ntvfs_nbench is now fully async

- the ntvfs_map_*() functions and the trans(2) mapping functions are not converted yet

metze
2007-10-10 13:04:57 -05:00
Andrew Tridgell
6282e5811b r3200: - improved the accuracy of openx emulation. We now nearly pass the openx portion of RAW-OPEN
- fixed directory size reporting to make it consistent. we now pass
  the ntcreatex portion of RAW-OPEN
2007-10-10 13:04:40 -05:00
Andrew Tridgell
88112b9677 r3107: slight tweak to the openx -> ntcreatex mapping routine. This mapping
can never be perfect, as openx can do things that ntcreatex can't, but
with this tweak we get close (the BASE-DENY1 test passes completely,
for example)
2007-10-10 13:02:22 -05:00
Andrew Tridgell
3791b97694 r3087: fixed a typo 2007-10-10 13:01:58 -05:00
Andrew Tridgell
76329798ff r3083: fixed a couple of generic mapping errors found with RAW-* and cifs:mapgeneric 2007-10-10 13:01:57 -05:00
Andrew Tridgell
3457c1836c 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.
2007-10-10 13:01:57 -05:00