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

155 Commits

Author SHA1 Message Date
Andrew Tridgell
0cf7175126 we need different error handling for truncated packets in NETPROT and
other SMB2 operations.
2008-09-24 18:58:38 -07:00
Andrew Tridgell
eb5b3f50d1 we should terminate the connection on a bad negprot packet size 2008-09-24 18:10:23 -07:00
Andrew Tridgell
49c80cea0b cope with body_size zero in SMB2 receive 2008-09-24 18:10:23 -07:00
Andrew Tridgell
a3536c4c06 check for a 0 byte in the buffer in SMB2 read 2008-09-24 18:10:23 -07:00
Andrew Tridgell
7e57626d1d the offset is 16 bits in SMB2 fileinfo 2008-09-24 18:10:23 -07:00
Andrew Tridgell
71ae732669 fixed error code for bad keepalive 2008-09-24 18:10:22 -07:00
Andrew Tridgell
ff542275c3 stricter checking of SMB2 echo body (per the spec)
thanks to the bluearc test suite
2008-09-24 18:10:22 -07:00
Stefan Metzmacher
2a36568129 smb2srv: async replies with STATUS_PENDING are not signed
..., but the they may have the sign flag set.

metze
(This used to be commit 43e43dead0)
2008-08-14 13:13:50 +02:00
Stefan Metzmacher
0294c678c0 smb2srv: sign replies when the request was also signed
metze
(This used to be commit dd2f4f7a49)
2008-08-14 13:13:50 +02:00
Stefan Metzmacher
4a214dba30 smb2srv: use defines instead of hex values
metze
(This used to be commit 7c4abf6614)
2008-08-14 13:13:50 +02:00
Stefan Metzmacher
0251096a89 smb2srv: sign SMB2 Logoff replies
metze
(This used to be commit 2844e36173)
2008-07-28 14:09:46 +02:00
Stefan Metzmacher
8623e2cc4c smb2srv: correctly hold the signing state per session
metze
(This used to be commit 5b3ba3f355)
2008-07-28 14:09:45 +02:00
Andrew Tridgell
e4ad580b99 fixed mandatory signing
Metze pointed out that if signing is mandatory in the server then we
need to reject packets without the signed flag if the packet contains
a session id.
(This used to be commit 056f16e664)
2008-06-07 08:14:25 -07:00
Andrew Tridgell
e97cf207fa added server side SMB2 signing
(This used to be commit 8e919dcb08)
2008-06-06 22:10:30 -07:00
Andrew Tridgell
405e64c437 more updates for new info levels
(This used to be commit 85d1873ee9)
2008-06-02 11:05:06 +10:00
Andrew Tridgell
eb8634b2f0 check for requested buffer size in getinfo call
(This used to be commit ed8f16379d)
2008-05-31 13:39:51 +10:00
Andrew Tridgell
6ef9674caa the docs shows that this is a o16s32 blob
(This used to be commit a6d28e2b33)
2008-05-30 07:28:53 +10:00
Andrew Tridgell
de4c962638 fix from WSPP SMB2 test 11
(This used to be commit 81612b7854)
2008-05-29 19:32:04 +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
72739ac0d0 badly formed SMB2 packets get NT_STATUS_INVALID_PARAMETER
(This used to be commit 1c5dd2d1b6)
2008-05-22 13:14:55 +10:00
Andrew Tridgell
aed93a238e fixed SMB2 flush call, and added flush to gentest_smb2
(This used to be commit c52fe1fe1c)
2008-05-21 22:51:21 +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
Andrew Tridgell
03eb236f20 Merge commit 'origin/v4-0-test' into vfs_smb2
(This used to be commit 733937e87a)
2008-05-19 11:40:25 +10:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
03643aec88 Use variables for source directory in a couple more places.
(This used to be commit c41bd3005f)
2008-05-18 19:54:27 +02:00
Andrew Tridgell
2994b483c8 fixed file_index reference
(This used to be commit edb4b38ed3)
2008-05-16 12:46:16 +10:00
Andrew Tridgell
c0e247ab40 better match WSPP doc name for find flags
(This used to be commit 0e4b8602de)
2008-05-15 20:46:43 +10:00
Stefan Metzmacher
8b5f03a225 smb_server/smb2: handle incoming oplock releases
metze
(This used to be commit 2306394dcc)
2008-04-19 01:54:45 +02:00
Andrew Tridgell
769ebe9171 make smb2 read and write size configurable
(This used to be commit 2090e75e0c)
2008-04-17 09:37:29 +02:00
Stefan Metzmacher
79b2980cf5 smb_server/smb2: initialize new create.in.blobs element untill it'll be supported
metze
(This used to be commit fbfbd74e65)
2008-04-17 02:39:29 +02:00
Jelmer Vernooij
e9017ba418 Use _OBJ_FILES variables in a couple more places.
(This used to be commit 92856d5054)
2008-04-14 17:22:58 +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
Stefan Metzmacher
87f2925252 ntvfs: pass down the client capabilities into the ntvfs layer
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 cc42cd5f67)
2008-03-06 16:31:25 +01:00
Jelmer Vernooij
80cbff3d01 Fix build with partial linking.
(This used to be commit bfad9610c4)
2008-02-18 16:02:33 +01:00
Andrew Tridgell
5fb241e5d3 3 places where the VFS backend doesn't handle NULL strings.
(This used to be commit cf109460af)
2008-02-18 14:54:14 +11:00
Jelmer Vernooij
e33177001c Remove type before variables in data.mk
(This used to be commit 3c1a7c0dcc)
2008-02-14 12:03:34 +01:00
Andrew Tridgell
b640f475be updated SMB2 code for getinfo according to WSPP docs
- Updated getinfo structures and field names
- also updated the protocol revision number handling to reflect
  new docs
(This used to be commit 3aaa2e86d9)
2008-02-14 17:11:36 +11:00
Andrew Tridgell
4a04a5e620 A better way to handle the different format of RenameInformation in SMB2
We now define a separate info level RAW_SFILEINFO_RENAME_INFORMATION_SMB2
and set that level when handling SMB2 packets. This makes the parsers clearer.
(This used to be commit f6cdf3f117)
2008-02-14 14:54:21 +11:00
Andrew Tridgell
839ab724dc Fixed SMB2 rename operations from Vista clients
We needed a flag in bufinfo to mark packets as SMB2, as it seems that
SMB2 uses a different format for the RenameInformation buffer than SMB
does

Also handle the fact that SMB2 clients give the full path to the
target file in the rename, not a relative path
(This used to be commit 52d7972d95)
2008-02-14 12:30:31 +11:00
Andrew Tridgell
e870cfec9f Convert SMB and SMB2 code to use a common buffer handling structure
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 ca6d9be6cb)
2008-02-14 10:12:33 +11:00
Andrew Tridgell
88d2e05227 updated SMB2 create operation to match WSPP.
Adding some defined for various new create options
(This used to be commit d037dc23ce)
2008-02-13 15:05:44 +11:00
Andrew Tridgell
e94d710b0b updated SMB2 tcon as per WSPP docs
(This used to be commit 5913e3e549)
2008-02-13 10:13:28 +11:00
Andrew Tridgell
cd2b003aba fixed crash when 0 dialects (thanks metze!)
(This used to be commit 252bcf207b)
2008-02-12 20:29:31 +11:00
Andrew Tridgell
a2505c5a2c updated SMB2 header defines to match WSPP docs
(This used to be commit d2c6ad55ec)
2008-02-12 17:00:35 +11:00
Andrew Tridgell
416360895f converted SMB2 session setup to use WSPP protocol field names
(This used to be commit 3c2af0fdc4)
2008-02-12 16:43:38 +11:00
Andrew Tridgell
8fdb9504dc converted the out side of SMB2 negprot handling
This follows the SMB2 PFIF docs. Current versions of Vista can now connect to Samba4 as a SMB2 server
and do basic operations
(This used to be commit 9dc284770d)
2008-02-12 16:20:13 +11:00
Andrew Tridgell
ccc27e681c fixed up the .in side of SMB2 negprot
fixed the input side of the SMB2 negprot structure and parsers according to the documentation
(This used to be commit 55af8acc7b)
2008-02-12 12:54:44 +11:00