ira/wip.git
16 years agor11870: fixed the problem volker reported with the RPX-XPLOGIN test. The
Andrew Tridgell [Wed, 23 Nov 2005 00:30:58 +0000 (00:30 +0000)]
r11870: fixed the problem volker reported with the RPX-XPLOGIN test. The
problem was caused by a callback destroying the packet processing
context while that context was being used in packet_recv()

This is the first time we have used the ability of talloc destructors
to 'refuse' a free request. It works well in this case as it makes the
composite API simpler to use for other code, and isolates the
complexity of having callbacks destroying the packet context to the
packet.c code.
(This used to be commit b1b2d86541a376f1ef33fae897f750005c386ebe)

16 years agor11869: talloc has been ported :-)
Volker Lendecke [Tue, 22 Nov 2005 21:45:05 +0000 (21:45 +0000)]
r11869: talloc has been ported :-)
(This used to be commit aad52d9a5fb66fe3b595190905e7237a279f7270)

16 years agor11868: Get the wks and user accounts from a file.
Volker Lendecke [Tue, 22 Nov 2005 20:55:59 +0000 (20:55 +0000)]
r11868: Get the wks and user accounts from a file.

Abartlet, please don't break this again, it's too darn useful for
near-realistic load tests on an RPC infrastructure and can be quite easily
expanded to more weird things a workstation might do during a login.

Yes, I promise I will document this test, but this must wait until the
weekend.

I might add simulating a profile download quite soon, we have the information
available from the info3.

Thanks,

Volker
(This used to be commit 15ca9e16bbc120a4a29bedaededc266097204ec5)

16 years agor11850: added a test suite for the SMB2 find calls
Andrew Tridgell [Tue, 22 Nov 2005 13:14:04 +0000 (13:14 +0000)]
r11850: added a test suite for the SMB2 find calls
(This used to be commit 3ac32d802bba96e5cbcebc4b536258eb0981a9e4)

16 years agor11849: added mapping between SMB2 and SMB find/search levels
Andrew Tridgell [Tue, 22 Nov 2005 13:13:17 +0000 (13:13 +0000)]
r11849: added mapping between SMB2 and SMB find/search levels
(This used to be commit 77e0cb999c776d2cfc806445d36135e5ba3a5f3d)

16 years agor11848: separate out the info levels common to SMB and SMB2 for raw_search
Andrew Tridgell [Tue, 22 Nov 2005 13:12:22 +0000 (13:12 +0000)]
r11848: separate out the info levels common to SMB and SMB2 for raw_search
(This used to be commit ed8d3073472fbb0850209f81dd04bd94f6d1c33d)

16 years agor11843: fixed a valgrind error in the RPC-SAMLOGON test
Andrew Tridgell [Tue, 22 Nov 2005 06:05:50 +0000 (06:05 +0000)]
r11843: fixed a valgrind error in the RPC-SAMLOGON test
(This used to be commit 61cabcd7f9010f708a55165f2ff855630f4b39df)

16 years agor11838: lower the default numops in smbtorture. When people want lots of
Andrew Tridgell [Tue, 22 Nov 2005 03:21:42 +0000 (03:21 +0000)]
r11838: lower the default numops in smbtorture. When people want lots of
repeated operations they should manually specify --num-ops=XX

this should speed up a few of the build farm tests
(This used to be commit d91506e1ceafc95c497973b0ecfd362f9bea3187)

16 years agor11837: Add a timeout before starting a torture test. It's really fun to watch 50
Volker Lendecke [Mon, 21 Nov 2005 21:13:01 +0000 (21:13 +0000)]
r11837: Add a timeout before starting a torture test. It's really fun to watch 50
simulated logins doing stuff simultaneously. This is where the async
architecture *really* pays off.

Volker
(This used to be commit 4cca813dff1194546e85efb9aabd36f0139e5be2)

16 years agor11836: More work in progress
Volker Lendecke [Mon, 21 Nov 2005 20:42:18 +0000 (20:42 +0000)]
r11836: More work in progress
(This used to be commit 3f5ad1bd3f817d99df76678f3ad733e51c00c673)

16 years agor11835: Restore comments
Volker Lendecke [Mon, 21 Nov 2005 19:43:06 +0000 (19:43 +0000)]
r11835: Restore comments
(This used to be commit 94591bdb6542d4a3096074b672e19142c9236211)

16 years agor11834: More steps towards XP login
Volker Lendecke [Mon, 21 Nov 2005 17:16:50 +0000 (17:16 +0000)]
r11834: More steps towards XP login
(This used to be commit c10ccb2edb5e623def9bf167ff328a70a9a85841)

16 years agor11832: - some updates for the conflict resolving logic
Stefan Metzmacher [Mon, 21 Nov 2005 14:21:56 +0000 (14:21 +0000)]
r11832: - some updates for the conflict resolving logic
- use better function names

metze
(This used to be commit 35ab665957a0114e749e4045abdc2fb482867711)

16 years agor11831: add some SGROUP not active vs. SGROUP any tests
Stefan Metzmacher [Mon, 21 Nov 2005 14:14:58 +0000 (14:14 +0000)]
r11831: add some SGROUP not active vs. SGROUP any tests

metze
(This used to be commit be622259ab1976abb800f55d5d8d329359e082db)

16 years agor11829: remove unused #if 1
Stefan Metzmacher [Mon, 21 Nov 2005 12:21:52 +0000 (12:21 +0000)]
r11829: remove unused #if 1

metze
(This used to be commit 80f2e50387eedecfe661f0e48e7287017a34a508)

16 years agor11828: split out the async helper function into a new subsystem WB_HELPER
Stefan Metzmacher [Mon, 21 Nov 2005 12:16:45 +0000 (12:16 +0000)]
r11828: split out the async helper function into a new subsystem WB_HELPER
to use it in torture tests too

metze
(This used to be commit 364b092355cd872d52612895cd711625f5702997)

16 years agor11827: add more sgroup vs sgroup tests
Stefan Metzmacher [Mon, 21 Nov 2005 12:05:46 +0000 (12:05 +0000)]
r11827: add more sgroup vs sgroup tests

metze
(This used to be commit 28a065064ef4ed60eb7d260ba02d939cfaba0bb9)

16 years agor11826: A few steps down the login
Volker Lendecke [Mon, 21 Nov 2005 11:35:15 +0000 (11:35 +0000)]
r11826: A few steps down the login
(This used to be commit 47a91dae31d4f1de93579f705c9115cd44d4ca6e)

16 years agor11825: Fix a debug msg
Volker Lendecke [Mon, 21 Nov 2005 10:28:54 +0000 (10:28 +0000)]
r11825: Fix a debug msg
(This used to be commit fc6458d0d4d9059e00b19ad6c54e3fd5a4119341)

16 years agor11824: fixed a valgrind error in the dcerpc_smb code
Andrew Tridgell [Mon, 21 Nov 2005 09:54:02 +0000 (09:54 +0000)]
r11824: fixed a valgrind error in the dcerpc_smb code
(This used to be commit 128b5ea7b369df6e7433609a24128f8bf623c4fe)

16 years agor11823: make the socket_connect_send() context a child of the local state
Andrew Tridgell [Mon, 21 Nov 2005 09:31:36 +0000 (09:31 +0000)]
r11823: make the socket_connect_send() context a child of the local state

this fixes a valgrind error
(This used to be commit db9c0887bd24de4d81b5afa2ff096b3ba65c9720)

16 years agor11822: reworked the socket_connect_multi() code so it is built on top of
Andrew Tridgell [Mon, 21 Nov 2005 09:20:32 +0000 (09:20 +0000)]
r11822: reworked the socket_connect_multi() code so it is built on top of
socket_connect_send() rather than the lower level socket code. Also
simplified the state structures a fair bit, and added name resolution,
fixing a bug where the multi-port connect code did a separate name
resolution for each port being tried.
(This used to be commit 3e6888156c1b2d24fe0d46940773560d219498b3)

16 years agor11821: got rid of two more unnecessary variables and made the variable names
Andrew Tridgell [Mon, 21 Nov 2005 09:17:00 +0000 (09:17 +0000)]
r11821: got rid of two more unnecessary variables and made the variable names
a bit more consistent
(This used to be commit 4b6e9c7c978dfca54c05ed2d8995d1333ed21b02)

16 years agor11820: fixed some problems with the socket socket.c code.
Andrew Tridgell [Mon, 21 Nov 2005 07:23:36 +0000 (07:23 +0000)]
r11820: fixed some problems with the socket socket.c code.

 - removed the duplicate calls to socket_connect(), instead creating a
   common function socket_send_connect() used by both code paths

 - fixed some NULL ptr checks (probably was cut-and-paste bugs)

 - ensure we use the result of the name resolution

 - added a few comments

 - use 'fde' for the file description event. The variable name
  'connect_ev' immediately made me think of an event context, not a
  fde. Using common variable name conventions makes code a bit easier
  to read
(This used to be commit 37b73521b4c858c78013279daaa71352c704551d)

16 years agor11819: simplified the async rpc bind code a little.
Andrew Tridgell [Mon, 21 Nov 2005 06:01:02 +0000 (06:01 +0000)]
r11819: simplified the async rpc bind code a little.

 - removed the struct dcerpc_request_state as all the state
   information is already available on the dcerpc_pipe structure, so just
   use that

 - added a single dcerpc_recv_data() handler for receiving packets
   from the transport layer. This then does the initial decoding of
   the dcerpc packet, and then looks at the packet type in order to
   work out who to dispatch it to. This should allow in-flight async
   rpc requests to still work while a new bind or alter context is
   happening

 - ensure that if the transport indicates the connection is dead that
   any in-flight bind or alter context requests are given an error

 - removed full_request_private and instead use separate bind_private
   and alter_private pointers

 - added a few comments for some bits I found hard to understand
(This used to be commit 938e372bffbee1982ad8268b83c43514fd2e5633)

16 years agor11818: - changed the option torture:echo_TestSleep=yes/no to the more generic
Andrew Tridgell [Mon, 21 Nov 2005 04:18:43 +0000 (04:18 +0000)]
r11818: - changed the option torture:echo_TestSleep=yes/no to the more generic
  option torture:quick=yes/no. This should be used in all slow tests to
  enable a quick mode

- enabled the test_rpc_quick.sh tests in 'make quicktest'
(This used to be commit 180c209c1bb48f6421043de2d0d48c29fc7f9274)

16 years agor11817: fixed the problem with the RPC join tests. The problem was that
Andrew Tridgell [Mon, 21 Nov 2005 04:09:36 +0000 (04:09 +0000)]
r11817: fixed the problem with the RPC join tests. The problem was that
revision 11809 had removed the change to the session key function
after authentication succeeds.
(This used to be commit c04c78d617b0d8c9f8fa724d475fefbe9e478ef7)

16 years agor11816: this fixes some of the problems with the recent async rpc changes and
Andrew Tridgell [Mon, 21 Nov 2005 02:52:33 +0000 (02:52 +0000)]
r11816: this fixes some of the problems with the recent async rpc changes and
ncacn_ip_tcp/ncalrpc. The problem was that svn revision 11809 removed
the logic that forced the CONNECT auth type for authenticated binds
which don't have an explicit SIGN or SEAL flag set.
(This used to be commit e7a1f11e8bcba3839f74c7303bd82533a6acfbcd)

16 years agor11815: A bit more comments and spaces for better readability.
Rafal Szczesniak [Sun, 20 Nov 2005 22:00:47 +0000 (22:00 +0000)]
r11815: A bit more comments and spaces for better readability.

rafal
(This used to be commit 1e831aead17b399289b8161e521e1afd5873c556)

16 years agor11814: 1) Set name resolution methods according to smb.conf
Rafal Szczesniak [Sun, 20 Nov 2005 21:40:41 +0000 (21:40 +0000)]
r11814: 1) Set name resolution methods according to smb.conf
2) Set credentials workstation name, otherwise rpc bind function
   segfaults on auth stage

rafal
(This used to be commit 6dc67ba6a30e6fc3fc21821d009ea940b093eec2)

16 years agor11813: Const-ify name resolution method list and use string list
Rafal Szczesniak [Sun, 20 Nov 2005 21:33:30 +0000 (21:33 +0000)]
r11813: Const-ify name resolution method list and use string list
utilities to set the context field.

rafal
(This used to be commit 5da8b457c34236b21f6e88e3a7a12338d0390a4f)

16 years agor11812: Convert winbind to the async bind routines. Also remove tridge's hack for the
Volker Lendecke [Sun, 20 Nov 2005 17:34:56 +0000 (17:34 +0000)]
r11812: Convert winbind to the async bind routines. Also remove tridge's hack for the
winbind "bug" :-)

Volker
(This used to be commit fb9a3c7ef376f289288c71bc47d67f548ddb7194)

16 years agor11811: Revert 11808, this broke the selftest. No idea why though. Why do we to the
Volker Lendecke [Sun, 20 Nov 2005 17:33:08 +0000 (17:33 +0000)]
r11811: Revert 11808, this broke the selftest. No idea why though. Why do we to the
resolve_name if it's not used?

I know this is my code, but I don't understand why it breaks tests.

Volker
(This used to be commit 577a5639d3fc008480e988864bb4fb59939bc2d8)

16 years agor11810: Fix talloc hierarchy
Volker Lendecke [Sun, 20 Nov 2005 17:02:28 +0000 (17:02 +0000)]
r11810: Fix talloc hierarchy
(This used to be commit e1bf1c326f297321a6c8fdf9679130dba102669e)

16 years agor11809: Make dcerpc_bind_auth async.
Volker Lendecke [Sun, 20 Nov 2005 16:28:39 +0000 (16:28 +0000)]
r11809: Make dcerpc_bind_auth async.

This also removes dcerpc_bind_auth_password, the only user of
dcerpc_bind_auth. And this was not only passwords anyway.

Andrew Bartlett, as usual: Please take a close look.

Thanks,

Volker
(This used to be commit 2ff2dae3d035af6cb0c131573cfd983fc9a58eee)

16 years agor11808: Fix socket_connect_ev
Volker Lendecke [Sun, 20 Nov 2005 16:27:41 +0000 (16:27 +0000)]
r11808: Fix socket_connect_ev
(This used to be commit 95bd3ffaf7efb117206c83f7c75c302b54e6d059)

16 years agor11807: Make dcerpc_alter_context async. Same thing: Please look at this
Volker Lendecke [Sun, 20 Nov 2005 10:18:33 +0000 (10:18 +0000)]
r11807: Make dcerpc_alter_context async. Same thing: Please look at this
closely. Survives RPC-ALTERCONTEXT.

Volker
(This used to be commit 1875c4808f8c30a6f750b88e166d43a736d5edc7)

16 years agor11806: Minor cleanup
Volker Lendecke [Sat, 19 Nov 2005 22:36:19 +0000 (22:36 +0000)]
r11806: Minor cleanup
(This used to be commit e75080b26d76199a6006fb076cf816ac023254ee)

16 years agor11805: dcerpc_bind_auth is only used in dcerpc_bind_auth_password
Volker Lendecke [Sat, 19 Nov 2005 22:34:46 +0000 (22:34 +0000)]
r11805: dcerpc_bind_auth is only used in dcerpc_bind_auth_password
(This used to be commit 16bc6b64f9053df3d08a05e7b7cfe77be6580d2b)

16 years agor11804: Asyncify the anonymous bind, convert the calls in xplogin.c.
Volker Lendecke [Sat, 19 Nov 2005 22:31:26 +0000 (22:31 +0000)]
r11804: Asyncify the anonymous bind, convert the calls in xplogin.c.

Tridge et al, please take a close look at this. It survives my basic rpc-login
test as well as rpc-lsa, but this is critical I think.

Volker
(This used to be commit bf1a55f44c84d9bb8b2f83f5d25727550ca8fcf2)

16 years agor11803: New start for RPC-LOGIN load test, this time async. It's gonna be fun to see
Volker Lendecke [Sat, 19 Nov 2005 21:15:37 +0000 (21:15 +0000)]
r11803: New start for RPC-LOGIN load test, this time async. It's gonna be fun to see
hundreds of logins from a single process.... :-)

Does not do all that is necessary yet. But as the old one was #ifdef'ed out,
this does not hurt much I think.

Volker
(This used to be commit f7cbef3e593df0c75bfd9be5bea64f65042c4d05)

16 years agor11802: - add copyright
Stefan Metzmacher [Sat, 19 Nov 2005 10:40:31 +0000 (10:40 +0000)]
r11802: - add copyright
- fix crash bug when running as non root
- add extra comments in the output

metze
(This used to be commit ffc3cd73474722d60a781fb758105f665e73c0ca)

16 years agor11801: - added basic SMB2 find support
Andrew Tridgell [Sat, 19 Nov 2005 06:39:12 +0000 (06:39 +0000)]
r11801: - added basic SMB2 find support

- added SMB2-SCANFIND test

- cleaned up continue flags in EAs and find requests
(This used to be commit 8792bc07d927e6470874230153177748afae3ee8)

16 years agor11800: - filled in unknown fields in SMB2 all_info level
Andrew Tridgell [Sat, 19 Nov 2005 05:55:08 +0000 (05:55 +0000)]
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 8c7c54a46dfb91c053d07a5e606892a41213c605)

16 years agor11797: Added OpenSSH fix for "%.*s" format crash. From Darren Tucker
Jeremy Allison [Sat, 19 Nov 2005 01:12:10 +0000 (01:12 +0000)]
r11797: Added OpenSSH fix for "%.*s" format crash. From Darren Tucker
<dtucker@zip.com.au>
Jeremy.
(This used to be commit a2006c162833f8e0513c2f2744688960c04b7e67)

16 years agor11796: Two more uses of !composite_is_ok
Volker Lendecke [Fri, 18 Nov 2005 23:48:51 +0000 (23:48 +0000)]
r11796: Two more uses of !composite_is_ok
(This used to be commit 7256157d01ff47d33706dadd45851cf2fbbce3a6)

16 years agor11795: used a couple more of volkers composite helper functions. They
Andrew Tridgell [Fri, 18 Nov 2005 23:34:47 +0000 (23:34 +0000)]
r11795: used a couple more of volkers composite helper functions. They
certainly make the code more compact.
(This used to be commit 872e2a49d8a1ad1f9a6e2f2d323b3471aeb9cba6)

16 years agor11794: - fixed a valgrind error in libnet, caused by using a stack variable
Andrew Tridgell [Fri, 18 Nov 2005 23:27:58 +0000 (23:27 +0000)]
r11794: - fixed a valgrind error in libnet, caused by using a stack variable
  after the function has returned (the *address variable was assigned
  into the state).

- changed libnet to use event_context_find() instead of
  event_context_init(), so it works as a child of existing code that
  uses a event context
(This used to be commit 47ceb2d3558304b4c4fb00582fb25a885cea2ef5)

16 years agor11791: simplify the SMB2 connect code following some suggestions from volker
Andrew Tridgell [Fri, 18 Nov 2005 23:15:32 +0000 (23:15 +0000)]
r11791: simplify the SMB2 connect code following some suggestions from volker
(This used to be commit 71e3e61941621f72f45708340f5d03b2b79580b4)

16 years agor11789: - add the start of a SMB2 server
Stefan Metzmacher [Fri, 18 Nov 2005 14:13:49 +0000 (14:13 +0000)]
r11789: - add the start of a SMB2 server
- it does Negprot and SessionSetup yet
  the rest returns NT_STATUS_NOT_IMPLEMENTED
- it's off by default, enable with:
  smbsrv:enable smb2 = yes
- negotition in the SMB Negprot isn't supported yet
- it's only tested with smbtorture SMB2-CONNECT
  not with vista as client

metze
(This used to be commit 08b31d5f618d2e416cb9812ad3a49754cd7212b8)

16 years agor11788: remove unused header files
Stefan Metzmacher [Fri, 18 Nov 2005 14:13:21 +0000 (14:13 +0000)]
r11788: remove unused header files

metze
(This used to be commit 27a2615876be3d49cca417796ad7466c342a6f8b)

16 years agor11787: add missing file
Stefan Metzmacher [Fri, 18 Nov 2005 13:33:56 +0000 (13:33 +0000)]
r11787: add missing file

metze
(This used to be commit d74f333a84658a45d5386c39787e61bd31ab540d)

16 years agor11786: move all SMB protocol specific stuff to smb_server/smb/
Stefan Metzmacher [Fri, 18 Nov 2005 13:30:18 +0000 (13:30 +0000)]
r11786: move all SMB protocol specific stuff to smb_server/smb/

metze
(This used to be commit 5fea278cb65076cea71bb6c921e51c4feffc37d7)

16 years agor11785: rename conn.c into tcon.c
Stefan Metzmacher [Fri, 18 Nov 2005 13:12:38 +0000 (13:12 +0000)]
r11785: rename conn.c into tcon.c

metze
(This used to be commit eba4f6b7067c3e32a1db897fdca43f9a76a6f5ea)

16 years agor11783: - make the VIUD field in smbsrv_session 64bit, as SMB2 needs it
Stefan Metzmacher [Fri, 18 Nov 2005 12:57:48 +0000 (12:57 +0000)]
r11783: - make the VIUD field in smbsrv_session 64bit, as SMB2 needs it
- add an idtree_limit to limit the max VUID we give the clients
  it's UINT16_MAX (0xffff) for the SMB protocol
- add auth_time to the smbsrv_session statistics
- use the session_info as marker for finished and non-finished
  session setups

metze
(This used to be commit 7eb10048b2c4e5ee9c39750dc877514ed9235a76)

16 years agor11782: - make the TID 32bit in the smbsrv_tcon structure, as SMB2 uses
Stefan Metzmacher [Fri, 18 Nov 2005 12:38:39 +0000 (12:38 +0000)]
r11782: - make the TID 32bit in the smbsrv_tcon structure, as SMB2 uses
  them
- add a idtree_limit to the tcons substructure of smbsrv_connection
  this controls what the highest TID is we give away to the client
  it's UINT16_MAX (0xFFFF) for the SMB protocol

metze
(This used to be commit f3bf5a2c0947e33d4167fa4fa290968204a826e8)

16 years agor11781: rename tree to tcons to match the sessions substructure of smbsrv_connection
Stefan Metzmacher [Fri, 18 Nov 2005 12:20:16 +0000 (12:20 +0000)]
r11781: rename tree to tcons to match the sessions substructure of smbsrv_connection

metze
(This used to be commit acd3e644e030a3544ddc6cdcd4e0ec9617732cba)

16 years agor11780: it turns out that the MxAc tag isn't a security descriptor, its a
Andrew Tridgell [Fri, 18 Nov 2005 11:45:24 +0000 (11:45 +0000)]
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 c0288aa8cd46ca384074f89430c226d725c39475)

16 years agor11779: fix crash bug
Stefan Metzmacher [Fri, 18 Nov 2005 11:40:03 +0000 (11:40 +0000)]
r11779: fix crash bug

metze
(This used to be commit b35e43a67b7b9ccb25c8f4ed62b8415e82aaf1c7)

16 years agor11778: - remove unused memory contexts as req is already the temporary context for...
Stefan Metzmacher [Fri, 18 Nov 2005 11:39:31 +0000 (11:39 +0000)]
r11778: - remove unused memory contexts as req is already the temporary context for the current request
- just use '0', I'll remove the UID_FIELD_INVALID macro completly later
- why search for the session we have just create
- add TODO notices, I need to dicuss them with abartlet...

metze
(This used to be commit 4bceb94749fba3138c492bed2733fad006affcc5)

16 years agor11777: display the security_descriptor in torture_smb2_all_info()
Andrew Tridgell [Fri, 18 Nov 2005 10:07:14 +0000 (10:07 +0000)]
r11777: display the security_descriptor in torture_smb2_all_info()
(This used to be commit d1067fc25df57b1b6ef59a69f979ed76df5c46cd)

16 years agor11776: no need to call out to SMB to setup test files for SMB2 any more
Andrew Tridgell [Fri, 18 Nov 2005 09:51:13 +0000 (09:51 +0000)]
r11776: no need to call out to SMB to setup test files for SMB2 any more
(This used to be commit dae70c5baed7d5613d793dca15dda3007c1a690a)

16 years agor11775: added support for creating files on SMB2 with initial EA lists and an ACL
Andrew Tridgell [Fri, 18 Nov 2005 09:25:25 +0000 (09:25 +0000)]
r11775: added support for creating files on SMB2 with initial EA lists and an ACL
(This used to be commit ff197092988cee64742f83df23c43ae664a196f9)

16 years agor11774: - move SMB specific initialisation of the smbsrv_connection out of smb_server.c
Stefan Metzmacher [Fri, 18 Nov 2005 08:44:36 +0000 (08:44 +0000)]
r11774: - move SMB specific initialisation of the smbsrv_connection out of smb_server.c
- add a generic incoming packet handler, which handles the first incoming packet
  and passes to the protocol specifc packet handler

metze
(This used to be commit f89deac1cb8a7e5651116d96b9a94d5cc8293076)

16 years agor11773: added a SMB2-SETINFO test suite. This tests the following levels:
Andrew Tridgell [Fri, 18 Nov 2005 06:31:33 +0000 (06:31 +0000)]
r11773: added a SMB2-SETINFO test suite. This tests the following levels:

BASIC_INFORMATION
DISPOSITION_INFORMATION
ALLOCATION_INFORMATION
END_OF_FILE_INFORMATION
POSITION_INFORMATION
MODE_INFORMATION
(This used to be commit 8804b6a7eb59ab0a9088f89d191194fba71befe3)

16 years agor11772: - setfileinfo needs a smb2_handle for SMB2 support
Andrew Tridgell [Fri, 18 Nov 2005 06:29:05 +0000 (06:29 +0000)]
r11772: - setfileinfo needs a smb2_handle for SMB2 support

- added smb2_setinfo to structs.h
(This used to be commit 5be1d334760b8422b65758d1891f9fe29185a244)

16 years agor11771: - split out the setinfo blob construction in the libcli/raw code
Andrew Tridgell [Fri, 18 Nov 2005 06:28:15 +0000 (06:28 +0000)]
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 da0b6fb93683331134ef2f4abd8707e0c3fc6d9d)

16 years agor11759: fix up the SEC_SHARE handling, when we want to support that later
Stefan Metzmacher [Thu, 17 Nov 2005 12:52:40 +0000 (12:52 +0000)]
r11759: fix up the SEC_SHARE handling, when we want to support that later
we need to fake a smbsrv_session for each smbsrv_tcon...

metze
(This used to be commit 5b5fb1772034fbfebbb7174df235c8c11d4819fe)

16 years agor11758: unified the parse code for the SMB and SMB2 qfsinfo and qfileinfo calls
Andrew Tridgell [Thu, 17 Nov 2005 11:06:13 +0000 (11:06 +0000)]
r11758: unified the parse code for the SMB and SMB2 qfsinfo and qfileinfo calls
(This used to be commit ba897e537b9a1544dc214e9d5504c87fee6fced2)

16 years agor11757: make smb_server.c independent from the protocol
Stefan Metzmacher [Thu, 17 Nov 2005 08:00:48 +0000 (08:00 +0000)]
r11757: make smb_server.c independent from the protocol

metze
(This used to be commit b606d5664dde64412dc29c1499322c5de4c262d5)

16 years agor11756: split out the parsers for the pass-through levels of QFSINFO and
Andrew Tridgell [Thu, 17 Nov 2005 06:27:18 +0000 (06:27 +0000)]
r11756: split out the parsers for the pass-through levels of QFSINFO and
QFILEINFO levels in trans2, so they can be shared with SMB2
(This used to be commit 5ca2d609e6a3766ebd07763f850ecc62209a7db7)

16 years agor11755: added names for all of the SMB2 qfs info levels (they all map exactly
Andrew Tridgell [Thu, 17 Nov 2005 04:03:31 +0000 (04:03 +0000)]
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 4ce48d02aa12d6fa699bf8b250b14851870f0096)

16 years agor11754: make the SMB2 blob push routines take offsets, so they fit better with
Andrew Tridgell [Thu, 17 Nov 2005 03:32:38 +0000 (03:32 +0000)]
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 387ec2b17ff30a1c040b460b498c8fa7d8770593)

16 years agor11753: change the getinfo scanner to scan with both a file and a directory, and...
Andrew Tridgell [Thu, 17 Nov 2005 00:50:42 +0000 (00:50 +0000)]
r11753: change the getinfo scanner to scan with both a file and a directory, and to use files
that have streams and EAs
(This used to be commit f739431927e9600e914204930f1e862a367a7368)

16 years agor11752: setup the dynamic pointer for incoming packets too
Andrew Tridgell [Thu, 17 Nov 2005 00:48:24 +0000 (00:48 +0000)]
r11752: setup the dynamic pointer for incoming packets too
(This used to be commit 583f3c415ea33ddf5f4065a66f6fae49ab48455e)

16 years agor11751: fixed the req->out.size calculation (it needs to be the complete
Andrew Tridgell [Thu, 17 Nov 2005 00:47:50 +0000 (00:47 +0000)]
r11751: fixed the req->out.size calculation (it needs to be the complete
request size, including dynamic portion)
(This used to be commit 1b5cdf92cc7793b08d7c46ef00d4ff696b31c15e)

16 years agor11750: More comments.
Rafal Szczesniak [Wed, 16 Nov 2005 20:53:54 +0000 (20:53 +0000)]
r11750: More comments.
(This used to be commit d277b13ced0983d67b22d78e06d692a966e3c6f1)

16 years agor11749: 1) Buffer allocation's been moved and isn't needed here.
Rafal Szczesniak [Wed, 16 Nov 2005 20:52:12 +0000 (20:52 +0000)]
r11749: 1) Buffer allocation's been moved and isn't needed here.
2) Connect to a server instead of pdc after locating it.

rafal
(This used to be commit a7bf9ada34c31f26d13c1575de2ec79ea5948a71)

16 years agor11748: By default, use name resolution method provided by means
Rafal Szczesniak [Wed, 16 Nov 2005 20:37:15 +0000 (20:37 +0000)]
r11748: By default, use name resolution method provided by means
of smb.conf.

rafal
(This used to be commit 739169e8eda74ad53d728fe6d11a30513c218853)

16 years agor11747: Move buffer allocation to libnet_Lookup function so that the
Rafal Szczesniak [Wed, 16 Nov 2005 19:55:27 +0000 (19:55 +0000)]
r11747: Move buffer allocation to libnet_Lookup function so that the
caller is not required to ensure it.

rafal
(This used to be commit 85456e6c0b50540d9f6ae15a460148a328cf002c)

16 years agor11746: revert my last commits, I now understand how we decide between
Stefan Metzmacher [Wed, 16 Nov 2005 18:40:37 +0000 (18:40 +0000)]
r11746: revert my last commits, I now understand how we decide between
finished and non-finished sessions

metze
(This used to be commit 7cf6b307bc820b87663e4b9d1aeb5e730729b24e)

16 years agor11745: one more check for a valid session
Stefan Metzmacher [Wed, 16 Nov 2005 17:18:41 +0000 (17:18 +0000)]
r11745: one more check for a valid session

metze
(This used to be commit 92aae176fbde22bcc6fe58aa651d3d4a421fdf60)

16 years agor11744: make sure the session is completed authenticated!!!
Stefan Metzmacher [Wed, 16 Nov 2005 17:14:16 +0000 (17:14 +0000)]
r11744: make sure the session is completed authenticated!!!

metze
(This used to be commit 0383218a00a8e744b70a3fa5056467a43fbe3a42)

16 years agor11743: - push the length at the correct offset
Stefan Metzmacher [Wed, 16 Nov 2005 15:47:44 +0000 (15:47 +0000)]
r11743: - push the length at the correct offset
- let us push empty strings

metze
(This used to be commit 17c4b6298d757f2e53fe764608504bf737005cbe)

16 years agor11742: fix pushing of 0 length blobs
Stefan Metzmacher [Wed, 16 Nov 2005 13:34:56 +0000 (13:34 +0000)]
r11742: fix pushing of 0 length blobs

metze
(This used to be commit e985ab117c6afb2ea575b55bfaa97b0795ec5745)

16 years agor11741: - the buffer code (first 2 bytes in the SMB2 body) seem to be the length
Stefan Metzmacher [Wed, 16 Nov 2005 11:01:15 +0000 (11:01 +0000)]
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 79103c51e5c752fbdb4d25a0047b65002828df89)

16 years agor11740: add some EA error codes
Stefan Metzmacher [Wed, 16 Nov 2005 10:16:14 +0000 (10:16 +0000)]
r11740: add some EA error codes

metze
(This used to be commit b1afcced395812477365befad1ed37a7cdafa275)

16 years agor11738: test larger read/write calls. If you run smbtorture with -X (to enable
Andrew Tridgell [Wed, 16 Nov 2005 06:39:57 +0000 (06:39 +0000)]
r11738: test larger read/write calls. If you run smbtorture with -X (to enable
'dangerous' tests) then it does a write of 160k, which causes vista to
blue screen. Otherwise it does a 120k write which works fine.
(This used to be commit b4c5d7d0173b94ade4c16d47ef774ad9f3c17bc8)

16 years agor11737: use _smb_setlen2() to allow for 24 bit lengths in SMB2 packets
Andrew Tridgell [Wed, 16 Nov 2005 06:36:08 +0000 (06:36 +0000)]
r11737: use _smb_setlen2() to allow for 24 bit lengths in SMB2 packets
(This used to be commit 54fda24379ca1a20d6de2edf64dd79b3fe80a37d)

16 years agor11736: display EAs and streams in smb2 torture tests
Andrew Tridgell [Wed, 16 Nov 2005 04:35:49 +0000 (04:35 +0000)]
r11736: display EAs and streams in smb2 torture tests
(This used to be commit 2baea9a5ec0a805b90c8b48454e395ce40a35a74)

16 years agor11735: fixed the ALL_EAS smb2 level parsing
Andrew Tridgell [Wed, 16 Nov 2005 04:35:10 +0000 (04:35 +0000)]
r11735: fixed the ALL_EAS smb2 level parsing
(This used to be commit dd24c0e80cf07bda700a0abb84a7a053d817f903)

16 years agor11731: fixed typo noticed by metze
Andrew Tridgell [Tue, 15 Nov 2005 05:28:30 +0000 (05:28 +0000)]
r11731: fixed typo noticed by metze
(This used to be commit e51fb2b44ad524620451807cccb186dd4be704c7)

16 years agor11730: added parsing and tests for a bunch more SMB2 getinfo levels
Andrew Tridgell [Tue, 15 Nov 2005 04:38:59 +0000 (04:38 +0000)]
r11730: added parsing and tests for a bunch more SMB2 getinfo levels
(This used to be commit ca65bf0235cbfab451e5d5ceac9f714acc0cd46c)

16 years agor11727: Minor cleanup
Volker Lendecke [Mon, 14 Nov 2005 20:13:00 +0000 (20:13 +0000)]
r11727: Minor cleanup
(This used to be commit 681451af727d12294ecee1b8fddc595b0148003f)

16 years agor11724: - move checks packet size and protocol version,
Stefan Metzmacher [Mon, 14 Nov 2005 13:50:56 +0000 (13:50 +0000)]
r11724: - move checks packet size and protocol version,
  before we create the request structure
- move code into one function

metze
(This used to be commit 96345b1c465c6cdf480f6e49d3c437cfe4d93c2c)

16 years agor11723: fix the build
Stefan Metzmacher [Mon, 14 Nov 2005 13:31:47 +0000 (13:31 +0000)]
r11723: fix the build

metze
(This used to be commit 838aac5e2020802b18ae34a5fcd85c085fc98501)

16 years agor11722: make the smb2_push/pull functions take a smb2_request_buffer
Stefan Metzmacher [Mon, 14 Nov 2005 12:31:02 +0000 (12:31 +0000)]
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 9b616516cae269f0870e9b9a9cecd8ee3f0a9095)

16 years agor11721: Fix warnings
Volker Lendecke [Mon, 14 Nov 2005 07:06:16 +0000 (07:06 +0000)]
r11721: Fix warnings
(This used to be commit d760583e388157ff25e317da06c57e5a42f171bd)

16 years agor11716: added a read/write test
Andrew Tridgell [Mon, 14 Nov 2005 05:10:09 +0000 (05:10 +0000)]
r11716: added a read/write test
(This used to be commit 7c229e5b9fc8774207b647214b9d03d26a60aae3)

16 years agor11715: added SMB2 read and write requests
Andrew Tridgell [Mon, 14 Nov 2005 05:09:26 +0000 (05:09 +0000)]
r11715: added SMB2 read and write requests
(This used to be commit d3556cbfa38447d2d385b697c1855b3c13d42744)