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

382 Commits

Author SHA1 Message Date
Stefan Metzmacher
2a336a63d7 libcli/smb2: add SMB2_CREATE_OPTIONS_NOT_SUPPORTED_MASK
SMB2 returns NOT_SUPPORTED to some more NTCREATE_OPTIONS.

metze
(This used to be commit 3ea08d4303)
2008-08-14 13:13:51 +02:00
Stefan Metzmacher
f086e796d6 libcli/smb2: use smb2 signing in auto mode if the server supports it
metze
(This used to be commit fe74faf13d)
2008-08-14 13:13:49 +02:00
Stefan Metzmacher
be92e7fc11 libcli/smb2: we don't need check the same thing twice...
metze
(This used to be commit 1380fb954a)
2008-08-14 13:13:49 +02:00
Stefan Metzmacher
be0a45d865 libcli/smb2: async replies with STATUS_PENDING are not signed
metze
(This used to be commit 3f6cbece4a)
2008-08-14 13:13:49 +02:00
Stefan Metzmacher
2d2911c788 libcli/smb2: the session key for SMB2 signing is truncated to 16 bytes
To make that work (as a client) with aes128 and aes256 krb5 keys
we need to use gsskrb5_get_subkey().

metze
(This used to be commit 0c6d988f20)
2008-07-28 16:15:23 +02:00
Stefan Metzmacher
35bd7a6378 libcli/smb2: fix per session signing state
metze
(This used to be commit 8bc12dc77a)
2008-07-28 14:09:45 +02:00
Stefan Metzmacher
4355b31730 libcli/smb2: sign SMB2 Logoff requests
metze
(This used to be commit 35ee165b14)
2008-07-28 14:09:45 +02:00
Andrew Tridgell
1c33953ae2 make signing per session in the SMB2 client library
Thanks to Metze for spotting this
(This used to be commit e9fd9b821c)
2008-06-07 08:30:51 -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
7c926ff115 SMB2 signing now works. The spec was wrong (and will be fixed in the
next version)
(This used to be commit 436cb17b86)
2008-06-03 14:29:27 +10:00
Andrew Tridgell
beaa01e403 implemented client side SMB2 signing
This doessn't work against Windows yet, and I've submitted a WSPP
request for clarification of the docs to try and find out
why. Meanwhile this is no worse than what we had, as it only gets used
when the server demands signing, and we didn't work then anyway.
(This used to be commit b788096add)
2008-05-30 17:03:54 +10:00
Andrew Tridgell
f6b678b57e fixed offset for maximal access response
(This used to be commit ddd0bb3251)
2008-05-29 18:23:00 +10:00
Andrew Tridgell
f4077a05cb updated comment based on MS-SMB2 docs
(This used to be commit 5754cc1351)
2008-05-28 21:48:26 +10:00
Andrew Tridgell
0be9746e1f ensure we don't change the incoming blobs in a SMB2 create
(This used to be commit a6cc89fffe)
2008-05-28 16:58:34 +10:00
Andrew Tridgell
773f5cce80 expose a function for pushing all SMB2 create blobs
(This used to be commit f5985a0490)
2008-05-28 16:27:38 +10:00
Andrew Tridgell
2173169e19 added support for all of the known SMB2 create tags in our client
library
(This used to be commit 597b38e97b)
2008-05-28 15:27:50 +10:00
Andrew Tridgell
9691856569 cope better with read only files in smb2_deltree
(This used to be commit 88a2c7b2f4)
2008-05-27 14:06:27 +10:00
Andrew Tridgell
2814868e93 don't alter the in blobs in a SMB2 create, otherwise two calls in a
row will fail
(This used to be commit 3b811a52fe)
2008-05-27 12:42:19 +10:00
Andrew Tridgell
ec7a6ee8ab fix make test for EAs again
- go back to 4 byte alignment until I work out the rules that Vista
  wants more exactly
- add the zero sized EA handling for SMB2 more generically
(This used to be commit 326b69bc80)
2008-05-23 00:07:12 +10:00
Andrew Tridgell
d5def936fe pass in the required alignment to the EA construction routines
(This used to be commit af31030e0b)
2008-05-22 22:46:29 +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
2214e6d9bf added smb2_util_setatr
(This used to be commit d4f41db964)
2008-05-20 13:37:51 +10:00
Andrew Tridgell
803c076450 added some SMB2 utility functions
(This used to be commit 6a3b1cd669)
2008-05-20 11:58:04 +10:00
Andrew Tridgell
9c6a35ad9b remember the server time fields on negotiate. Needed for gentest
(This used to be commit 7989ca861d)
2008-05-20 11:57:43 +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
60ae8f0657 Fix a bunch of dependencies.
(This used to be commit a63f458462)
2008-05-18 23:40:23 +02: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
c7d7577fb9 private -> private_data for struct smb2_request
(This used to be commit 67290e0ad6)
2008-05-16 15:03:58 +10:00
Andrew Tridgell
8846981807 update some SMB2 find flags
(This used to be commit b7560afd4b)
2008-05-15 20:46:10 +10:00
Stefan Metzmacher
132852f44a libcli/smb2: make it possible to handle incoming oplock requests
metze
(This used to be commit 58189b87ea)
2008-04-19 01:54:44 +02:00
Stefan Metzmacher
0f4a60ff24 libcli/smb2: add smb2_break() calls
metze
(This used to be commit 7f545dbbf0)
2008-04-19 01:54:44 +02:00
Andrew Tridgell
11703b2986 fix the overflow/wrap checks in Samba4 for new gcc optimisation behavior
The approach I have used is as set out in
https://www.securecoding.cert.org/confluence/display/seccode/ARR38-C.+Do+not+add+or+subtract+an+integer+to+a+pointer+if+the+resulting+value+does+not+refer+to+an+element+within+the+array
(This used to be commit 92d5fb531d)
2008-04-17 15:20:39 +02:00
Stefan Metzmacher
578539216f libcli/smb2: make it possible to pass additional extra blobs in smb2_create()
This also fixes the alignment from 8 to 4 byte bounderies.

metze
(This used to be commit e0a0d8e36a)
2008-04-17 01:58:25 +02:00
Stefan Metzmacher
b0f34bc8ca libcli/smb2: also offer the SMB2 dialect that what used in longhorn beta3
With this smbtorture works against longhorn beta3 again,
hopefully it still works with new versions...

metze
(This used to be commit 874924a85a)
2008-04-17 01:58:24 +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
Andrew Tridgell
26b8701321 handle pushing of zero length smb2 strings
(This used to be commit 66d0502228)
2008-02-18 14:53:48 +11:00
Andrew Tridgell
2e4e06c6e6 fixed handling of zero sized buffers versus NULL buffers in
SMB2. Thanks to Metze for spotting this.
(This used to be commit fbcf3e65b9)
2008-02-16 07:25:38 +11: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
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
Jelmer Vernooij
771b347f9b r26644: Janitorial: Pass resolve_context explicitly to various SMB functions, should help fix the build for OpenChange.
(This used to be commit 385ffe4f4c)
2008-01-02 12:48:03 -06:00
Jelmer Vernooij
d891c0c74a r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7ab)
2007-12-21 05:49:56 +01:00
Jelmer Vernooij
4b0199a549 r26409: Pass smb ports along.
(This used to be commit 2833f320de)
2007-12-21 05:49:42 +01:00
Jelmer Vernooij
5f4842cf65 r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a4)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
da2ae49953 r26337: Move global_loadparm to a higher caller.
(This used to be commit baa5bcd303)
2007-12-21 05:48:47 +01:00
Jelmer Vernooij
39ee38d9c1 r26316: Use contexts for conversion functions.
(This used to be commit f6420d933b)
2007-12-21 05:48:30 +01:00
Jelmer Vernooij
2f8dc4f48f r26266: Remove more global_loadparm uses.
(This used to be commit 99113075c4)
2007-12-21 05:47:42 +01:00
Jelmer Vernooij
ecea5ce245 r26260: Store loadparm context in gensec context.
(This used to be commit b9e3a4862e)
2007-12-21 05:47:34 +01: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
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
dccf3f99e4 r25027: Fix more warnings.
(This used to be commit 5085c53fcf)
2007-10-10 15:05:41 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643)
2007-10-10 15:05:27 -05:00
Jelmer Vernooij
6cf69fee18 r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa)
2007-10-10 15:05:26 -05:00
Jelmer Vernooij
0b91f39164 r24780: More work allowing libutil to be used by external users.
(This used to be commit 31993cf67b)
2007-10-10 15:03:10 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -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
bf62b6642c r22866: handle incoming chained smb2 requests in our server code to let
the windows explorer in longhorn beta3 work.

metze
(This used to be commit 2390c9f24d)
2007-10-10 14:52:26 -05:00
Stefan Metzmacher
4ef7bab6d0 r22791: make it possible to use smb2_create_blob_add() in the server code too
metze
(This used to be commit c08eeb62ca)
2007-10-10 14:52:18 -05:00
Stefan Metzmacher
7e330c7c0c r22788: fix typo
metze
(This used to be commit 635a636e89)
2007-10-10 14:52:17 -05:00
Andrew Tridgell
1c211a2e43 r20650: revert a bunch of code I didn't mean to commit yet
(This used to be commit b3e2d49087)
2007-10-10 14:37:26 -05:00
Andrew Tridgell
f6274959ba r20647: add cluster code
(This used to be commit 5870830b99)
2007-10-10 14:37:24 -05:00
Andrew Tridgell
19f9b91d28 r18715: 0x8 style status returns should also fail here (thanks metze)
(This used to be commit f55de25ab3)
2007-10-10 14:19:03 -05:00
Andrew Tridgell
30ee8beb93 r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
(This used to be commit eba6c84eff)
2007-10-10 14:18:04 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Stefan Metzmacher
7c50eec25e r17318: make better usage of the composite api
metze
(This used to be commit 683fc25f65)
2007-10-10 14:15:11 -05:00
Stefan Metzmacher
a5bafffd66 r17083: - implement SMB2 Cancel in the client
- the 0xffffffffffffffff seqnum is reserved for SMB2 Break (oplock breaks)
  so don't use it in a request. we should someday try to test this...

metze
(This used to be commit 730cdc4475)
2007-10-10 14:10:11 -05:00
Stefan Metzmacher
73b066281e r17081: add idle handler support to the smb2 client lib too
metze
(This used to be commit 1f48e7dca6)
2007-10-10 14:10:11 -05:00
Stefan Metzmacher
440d0487a6 r17020: pass the real error to the failing requests
metze
(This used to be commit 49b96ac44a)
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
09b9d831c2 r17019: don't timeout on notifies
metze
(This used to be commit 8d4fd35b10)
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
a8958391e8 r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2
- parse SMB2 Notify reponse

metze
(This used to be commit de50e0ccdd)
2007-10-10 14:10:06 -05:00
Stefan Metzmacher
86c3e628e0 r16975: implement SMB2 Notify call in the client lib
metze
(This used to be commit a455dc7a83)
2007-10-10 14:10:04 -05:00
Stefan Metzmacher
a3797ff66a r16875: implement SMB2 Find in the frontend
metze
(This used to be commit 58bed7322c)
2007-10-10 14:09:56 -05:00
Stefan Metzmacher
7c810db7da r16873: - grow the buffer with the correct size, we maybe had 1 byte preallocated
- body_size doesn't contain the preallocated byte so don't remove it

metze
(This used to be commit 3cf50e26b7)
2007-10-10 14:09:55 -05:00
Stefan Metzmacher
af0a9eb529 r16834: split the level's of smb_search_first/smb_search_next and the levels
of smb_search_data

metze
(This used to be commit 78c201db8a)
2007-10-10 14:09:49 -05:00
Stefan Metzmacher
6acd9aed93 r16734: the 2 bytes after the opcode and before the flags,
is no padding...

the following patch is needed for vista beta2 to connect to samba4

metze
(This used to be commit 58baae8fc4)
2007-10-10 14:09:42 -05:00
Stefan Metzmacher
63d0c5a057 r16708: the packet format of SMB2 SessionSetup has changed,
there're 8 more unknown bytes...

Note:
 - vista-CTP also support this as a server,
   but uses the old format as client
 - but vista-beta2 only uses and accept the new format

metze
(This used to be commit b3bdd4afde)
2007-10-10 14:09:40 -05:00
Stefan Metzmacher
bd0dcebe36 r16705: fix a bug found by valgrind...
as we setup the 1 padding byte for non present dynamic part,
we need to overwrite it when we're getting a real dynamic part,
so we need to remove the buf->size +=1 when we do the first
push to the dynamic part (when buf->dynamic is still but->body + buf->body_fixed)

metze
(This used to be commit f309209629)
2007-10-10 14:09:39 -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
bd1efc1235 r16669: this calls don't expect any valid error codes than NT_STATUS_OK
metze
(This used to be commit 429215113b)
2007-10-10 14:09:37 -05:00
Stefan Metzmacher
7dc22bf3e0 r16566: add pull function for a site32/offset32 blob
metze
(This used to be commit 81702c36c2)
2007-10-10 14:09:35 -05:00
Stefan Metzmacher
d3b3436ce1 r16406: use the generic smb_handle in smb2_getinfo/smb2_setinfo
metze
(This used to be commit dcc02df829)
2007-10-10 14:09:13 -05:00
Andrew Tridgell
971d30bb20 r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617)
2007-10-10 14:08:32 -05:00
Stefan Metzmacher
e982523bc0 r15820: this line was just for testing
metze
(This used to be commit 1a9bfa2ac9)
2007-10-10 14:08:28 -05:00
Stefan Metzmacher
a2f463bb3a r15815: add SMB2 Lock client code
metze
(This used to be commit 4a307d7185)
2007-10-10 14:08:27 -05:00
Stefan Metzmacher
1911475976 r15770: when there's a dynamic body, we need to send the first byte even if the
dynamic size if 0

metze
(This used to be commit c7e8e79d75)
2007-10-10 14:08:16 -05:00
Stefan Metzmacher
6885c6253e r15744: convert_string_talloc() handles src_len == 0 as error
but it's valid in this case

metze
(This used to be commit 92c19b1ba4)
2007-10-10 14:08:12 -05:00
Stefan Metzmacher
e306c5bf12 r15741: move smb2 request structures into the main smb request structs
as new levels

metze
(This used to be commit 9180635317)
2007-10-10 14:08:11 -05:00
Stefan Metzmacher
dc86ab3e45 r15532: add a BOOL body_dynamic_present, because the body_dynamic_size can be 0
also if the dynamic flag should be set

metze
(This used to be commit 7829100e1e)
2007-10-10 14:05:54 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
Jelmer Vernooij
0eddf14b30 r15191: Avoid uint_t as it's not standard.
(This used to be commit 7af59357b9)
2007-10-10 14:04:15 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Jelmer Vernooij
5b0051e032 r14511: Install more headers
(This used to be commit e1f896948f)
2007-10-10 13:57:35 -05:00
Andrew Tridgell
5702626906 r14435: return after an error
(This used to be commit 40e5bfdb0f)
2007-10-10 13:57:24 -05:00
Andrew Tridgell
baa62e5637 r14434: use the right enum type
(This used to be commit 507def57cb)
2007-10-10 13:57:24 -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
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
Jelmer Vernooij
ceb6e9717b r13960: Generate makefile rules for installing/removing shared modules.
(This used to be commit 2c74698032)
2007-10-10 13:52:32 -05:00
Stefan Metzmacher
eeaf9650d8 r13935: add dependecies
metze
(This used to be commit 569275bc2b)
2007-10-10 13:52:28 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Stefan Metzmacher
db04cffbbf r12725: some minor updates
metze
(This used to be commit f2e97983f2)
2007-10-10 13:49:45 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Tridgell
111a920fdb r12116: got rid of composite_trigger_done() and composite_trigger_error(), and
instead make the normal composite_done() and composite_error()
functions automatically trigger a delayed callback if the caller has
had no opportunity to setup a async callback

this removes one of the common mistakes in writing a composite function
(This used to be commit f9413ce792)
2007-10-10 13:47:11 -05:00
Stefan Metzmacher
89f5d66dfe r12114: - smb2_keepalive() acts on the smb2_transport
- smb2_logoff() acts on the smb2_session

metze
(This used to be commit ae1ca2bb4a)
2007-10-10 13:47:10 -05:00
Andrew Tridgell
fd7fd22e46 r12006: don't require callers to fill in pad bytes in SMB2 calls
(This used to be commit 6935765fda)
2007-10-10 13:46:58 -05:00
Stefan Metzmacher
28918cd0b0 r11996: don't overwrite the buffercode
metze
(This used to be commit fee5b6f407)
2007-10-10 13:46:57 -05:00
Andrew Tridgell
6615907b94 r11980: ronnie worked out that opcode 0xb in SMB2 is in fact ioctl, and that
it only appeared to be like a SMBtrans request as it was being called
with function 0x11c017 which is "named pipe read write"

I wonder if this means we could do DCE/RPC over SMB using ntioctl
calls as well?
(This used to be commit f2b8857797)
2007-10-10 13:46:53 -05:00
Tim Potter
03d301ead5 r11967: Fix more 64-bit warnings.
(This used to be commit 9c4436a124)
2007-10-10 13:46:52 -05:00
Andrew Tridgell
9b2cd2e797 r11949: make sure we ask gensec to give us a session key
andrew, this answers your question on irc about whether the same
session key mechanisms are used in smb2. They are - the RPC-LSA secret
tests pass fine over ncacn_np on SMB2, which means the session key
must be working
(This used to be commit 91327885a2)
2007-10-10 13:46:49 -05:00
Andrew Tridgell
1e935fcbde r11906: opcode 13 appears to be keepalive. Metze guessed this one :-)
(This used to be commit afe2323dc1)
2007-10-10 13:46:47 -05:00
Andrew Tridgell
1e3583475f r11905: added SMB2_FLUSH as opcode 7. Thanks to metze and volker for help
brainstorming this one.
(This used to be commit a969ad592a)
2007-10-10 13:46:47 -05:00
Andrew Tridgell
6724c0185c r11903: added smb2_tdis() (opcode 4)
(This used to be commit d606b45b5b)
2007-10-10 13:46:46 -05:00
Andrew Tridgell
a399cd3cea r11901: added smb2_logoff() support (metze correctly guessed opcode 2 was
logoff)
(This used to be commit 6884ce66f2)
2007-10-10 13:46:45 -05:00
Stefan Metzmacher
d90914dda8 r11895: - reorder some code to make it easier to follow, how the fields appear on the wire
- add some comments to the header file, to represent the wire format

metze
(This used to be commit fa98f09f8b)
2007-10-10 13:46:43 -05:00
Andrew Tridgell
b227b98a6c r11894: fixed SMB2 trans code for pipe_flags
(This used to be commit 02e3cb87c7)
2007-10-10 13:46:43 -05:00
Andrew Tridgell
2f74901802 r11891: - added pipe_flags field in smb2_trans
- while running dcerpc over SMB2, the server will occasionally send us
  a oh-so-useful STATUS_PENDING result meaning "I don't have a result
  for you yet, but I'm working on it". These can be discarded :-)
(This used to be commit 24588a9c49)
2007-10-10 13:46:42 -05:00
Andrew Tridgell
310fa87509 r11888: - added SMB2 trans support
- added session key to SMB2

- renamed 'unknown2' in create to 'impersonation'
(This used to be commit aef915f312)
2007-10-10 13:46:41 -05:00
Andrew Tridgell
f7c03b2abe r11849: added mapping between SMB2 and SMB find/search levels
(This used to be commit 77e0cb999c)
2007-10-10 13:46:38 -05:00
Andrew Tridgell
fc04e3e795 r11801: - added basic SMB2 find support
- added SMB2-SCANFIND test

- cleaned up continue flags in EAs and find requests
(This used to be commit 8792bc07d9)
2007-10-10 13:46:29 -05:00
Andrew Tridgell
7d6f36682e r11800: - filled in unknown fields in SMB2 all_info level
- allow setting of the ALL_EAS flags bits in SMB2 getinfo
(This used to be commit 8c7c54a46d)
2007-10-10 13:46:29 -05:00
Volker Lendecke
771d4fab26 r11796: Two more uses of !composite_is_ok
(This used to be commit 7256157d01)
2007-10-10 13:46:28 -05:00
Andrew Tridgell
27bab09cdb r11795: used a couple more of volkers composite helper functions. They
certainly make the code more compact.
(This used to be commit 872e2a49d8)
2007-10-10 13:46:28 -05:00
Andrew Tridgell
552c0111a1 r11791: simplify the SMB2 connect code following some suggestions from volker
(This used to be commit 71e3e61941)
2007-10-10 13:46:28 -05:00
Andrew Tridgell
d5f37ecf94 r11780: it turns out that the MxAc tag isn't a security descriptor, its a
request that the server return its own MxAc blob which contains the
maximum allowed access_mask for the returned file handle
(This used to be commit c0288aa8cd)
2007-10-10 13:46:26 -05:00
Andrew Tridgell
3922b68d13 r11777: display the security_descriptor in torture_smb2_all_info()
(This used to be commit d1067fc25d)
2007-10-10 13:46:25 -05:00
Andrew Tridgell
c8c7fb2492 r11775: added support for creating files on SMB2 with initial EA lists and an ACL
(This used to be commit ff19709298)
2007-10-10 13:46:25 -05:00
Andrew Tridgell
2ff21db535 r11771: - split out the setinfo blob construction in the libcli/raw code
- added a smb2_setinfo call

- added smb2_setinfo_file*() calls
(This used to be commit da0b6fb936)
2007-10-10 13:46:24 -05:00
Andrew Tridgell
eedb92ce72 r11758: unified the parse code for the SMB and SMB2 qfsinfo and qfileinfo calls
(This used to be commit ba897e537b)
2007-10-10 13:46:23 -05:00
Andrew Tridgell
7a43b32c3b r11755: added names for all of the SMB2 qfs info levels (they all map exactly
to equivalent SMB qfs levels)
(This used to be commit 4ce48d02aa)
2007-10-10 13:46:23 -05:00
Andrew Tridgell
fe996e8ac6 r11754: make the SMB2 blob push routines take offsets, so they fit better with
the rest of the packet construction code
(This used to be commit 387ec2b17f)
2007-10-10 13:46:23 -05:00
Andrew Tridgell
94ae534128 r11752: setup the dynamic pointer for incoming packets too
(This used to be commit 583f3c415e)
2007-10-10 13:46:22 -05:00
Andrew Tridgell
1c71db99aa r11751: fixed the req->out.size calculation (it needs to be the complete
request size, including dynamic portion)
(This used to be commit 1b5cdf92cc)
2007-10-10 13:46:22 -05:00
Stefan Metzmacher
fb90bebab6 r11743: - push the length at the correct offset
- let us push empty strings

metze
(This used to be commit 17c4b6298d)
2007-10-10 13:46:20 -05:00
Stefan Metzmacher
ed069c1771 r11742: fix pushing of 0 length blobs
metze
(This used to be commit e985ab117c)
2007-10-10 13:46:20 -05:00
Stefan Metzmacher
e9eb560685 r11741: - the buffer code (first 2 bytes in the SMB2 body) seem to be the length
of the fixed body part, and +1 if there's a dynamic part
- there're 3 types of dynamic blobs
  with uint16_t offset/uint16_t size
  with uint16_t offset/uint32_t size
  with uint32_t offset/uint32_t size /* aligned to 8 bytes */
- strings are transmitted in UTF-16 with no termination and
  packet into a uint16/uint16 blob

metze
(This used to be commit 79103c51e5)
2007-10-10 13:46:20 -05:00
Andrew Tridgell
b16543648e r11737: use _smb_setlen2() to allow for 24 bit lengths in SMB2 packets
(This used to be commit 54fda24379)
2007-10-10 13:46:19 -05:00
Andrew Tridgell
ab0d0f0623 r11735: fixed the ALL_EAS smb2 level parsing
(This used to be commit dd24c0e80c)
2007-10-10 13:46:19 -05:00
Andrew Tridgell
8dc40d6803 r11731: fixed typo noticed by metze
(This used to be commit e51fb2b44a)
2007-10-10 13:46:19 -05:00
Andrew Tridgell
b51703baf1 r11730: added parsing and tests for a bunch more SMB2 getinfo levels
(This used to be commit ca65bf0235)
2007-10-10 13:46:18 -05:00
Stefan Metzmacher
de5d71aebe r11722: make the smb2_push/pull functions take a smb2_request_buffer
and the pull ones also a TALLOC_CTX, then we can reuse this functions
in the server later

metze
(This used to be commit 9b616516ca)
2007-10-10 13:46:18 -05:00
Volker Lendecke
61317df8aa r11721: Fix warnings
(This used to be commit d760583e38)
2007-10-10 13:46:17 -05:00
Andrew Tridgell
c6395a30b0 r11715: added SMB2 read and write requests
(This used to be commit d3556cbfa3)
2007-10-10 13:46:17 -05:00
Andrew Tridgell
614950aed3 r11713: separate out the setting of the fde in the packet context from the
enabling of packet serialisation
(This used to be commit 6a47cd65a8)
2007-10-10 13:46:17 -05:00
Andrew Tridgell
72565088bc r11700: added structure definitions for many of the getinfo structures
(This used to be commit 2919d42286)
2007-10-10 13:46:15 -05:00
Andrew Tridgell
36e4374b1d r11698: added some more level names
(This used to be commit 845bbef803)
2007-10-10 13:46:15 -05:00
Andrew Tridgell
67a85b3f1b r11697: - added a generic SMB2 getinfo call
- added a SMB2-SCANGETINFO test for scanning for available info levels

- added names for the info levels I recognise to smb2.h
(This used to be commit fe5986067e)
2007-10-10 13:46:15 -05:00
Andrew Tridgell
a1562e2380 r11696: added a few more opcode names
(This used to be commit 2a45476e94)
2007-10-10 13:46:14 -05:00
Andrew Tridgell
56712033d5 r11694: fixed 2 valgrind errors
(This used to be commit 6381fe7241)
2007-10-10 13:46:14 -05:00
Andrew Tridgell
e27ba5e4c6 r11693: added a full async composite function for SMB2 that does:
- name resolution
 - socket connect
 - negprot
 - multi-stage session setup
 - tcon
(This used to be commit c1a8e866fe)
2007-10-10 13:46:14 -05:00
Andrew Tridgell
2b7ee2ceee r11692: added a full composite (async) spnego session setup for SMB2. This
simplies the torture code a lot.
(This used to be commit 7bf1046fbb)
2007-10-10 13:46:14 -05:00
Andrew Tridgell
91e1893741 r11691: added reply buffer code checks and oplock flags for create request/reply
(This used to be commit 26ed781375)
2007-10-10 13:46:13 -05:00
Andrew Tridgell
222e197b84 r11687: filled in 3 more fields in the close reply
(This used to be commit 3a0abb3ff0)
2007-10-10 13:46:13 -05:00
Andrew Tridgell
be77dac05f r11683: fixed create call
(This used to be commit 02d7331903)
2007-10-10 13:46:13 -05:00
Andrew Tridgell
b034156bd5 r11682: filled in access_mask in tcon reply
(This used to be commit 173a213f91)
2007-10-10 13:46:13 -05:00
Andrew Tridgell
461ccc557b r11681: filled in a few more smb2_create() fields
(This used to be commit a95413568f)
2007-10-10 13:46:13 -05:00
Andrew Tridgell
1b2e8caad3 r11680: added smb2_close(). This also demonstrates that file handles are 16
bytes, not 20 bytes (metze, you were right!)
(This used to be commit d3bcc6628c)
2007-10-10 13:46:12 -05:00
Andrew Tridgell
2e753f8518 r11679: opening/creating files in SMB2 now works. Lots of unknown parameters
in the call tho.
(This used to be commit 548fbd86b3)
2007-10-10 13:46:12 -05:00
Stefan Metzmacher
7935df168f r11675: a more general way of getting rid of compiler warnings and errors
metze
(This used to be commit 653f5ccd61)
2007-10-10 13:46:11 -05:00
Andrew Tridgell
3e54c36fa4 r11674: SMB2 tree connect now works. We do 2 session setups and 2 tree
connects, giving the following output:

Running SMB2-CONNECT
Negprot reply:
current_time  = Fri Nov 11 20:10:42 2005 EST
boot_time     = Sat Nov 12 10:34:33 2005 EST
Session setup gave UID 0x40000000071
Session setup gave UID 0x140000000075
Tree connect gave tid = 0x7500000001
Tree connect gave tid = 0x7500000005
SMB2-CONNECT took 0.049024 secs
(This used to be commit a24a4c3110)
2007-10-10 13:46:11 -05:00
Stefan Metzmacher
5f58c67b82 r11671: - make sure req is initialized
- only free the buffer when there's no request
- call async callback on error

metze
(This used to be commit 2084d62dd5)
2007-10-10 13:46:10 -05:00
Stefan Metzmacher
d9d90e105b r11670: fix the build
metze
(This used to be commit c0eebe293f)
2007-10-10 13:46:10 -05:00
Andrew Tridgell
7a78d2d6b0 r11668: yay! we get a successful session setup with SMB2, and get back a 64bit uid
(This used to be commit 72b34a7c1b)
2007-10-10 13:46:10 -05:00
Andrew Tridgell
86c1370cb0 r11666: filled in the basic session setup. Vista happily accepts the first
stage of the session setup, and waits for more.
(This used to be commit 804c229c3b)
2007-10-10 13:46:09 -05:00
Andrew Tridgell
555b45e12c r11665: started to put some meat on the structure used for the SMB2 library
the call definitions will be in smb2_calls.h, which will play a
similar role that smb_interfaces.h plays for the old SMB protocol
(This used to be commit 4ef3902a8a)
2007-10-10 13:46:09 -05:00
Andrew Tridgell
ac293f8534 r11662: the beginnings of a SMB2 client library. Very hackish, meant for experimentation
(This used to be commit 68422dc73f)
2007-10-10 13:46:09 -05:00