1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

1162 Commits

Author SHA1 Message Date
Jelmer Vernooij
03c2d642a6 r7159: Improve the messages from pidl's validator module.
Change the IDL file for the echo interface to match the one we use for
Windows. The only thing different between the two files currently is the
names of the scalar types and the handling of strings.
(This used to be commit b264c61061)
2007-10-10 13:17:21 -05:00
Stefan Metzmacher
62480f1252 r7120: make use of the new 'noopnum' property and get rid of handwritten
parsing code for the spoolss_Enum* functions, there still same handwritten code needed
but just to stack the autogenerated code into the correct way

metze
(This used to be commit 155d18e8b7)
2007-10-10 13:17:19 -05:00
Jelmer Vernooij
c5981f6db0 r7117: Move more manpages to the source repository
(This used to be commit b00355bf0c)
2007-10-10 13:17:18 -05:00
Jeremy Allison
72cc1a1f12 r6975: Test opening filenames with control characters in fails
with INVALID_NAME.
Jeremy.
(This used to be commit ec72d7d614)
2007-10-10 13:17:01 -05:00
Jelmer Vernooij
fb52ab1446 r6961: Add RPC-WINREG to list of win2k3 tests
Fix bug in test for QueryMultipleValues
Ignore errors from CreateKey() and GetKeySecurity() for now
(This used to be commit 7b6b8d6b34)
2007-10-10 13:17:00 -05:00
Tim Potter
4867378592 r6951: Fix all calls to setup_logging() that use 'True' as a second argument.
In Samba4 this is now an enum.  Possibly by accident, True just happens
to map to the right value in this case.  (-:
(This used to be commit affacc5398)
2007-10-10 13:17:00 -05:00
Tim Potter
2b7fe67f4d r6933: Add a couple of helper functions for creating nbt names.
(This used to be commit b896daf11c)
2007-10-10 13:16:58 -05:00
Volker Lendecke
283991e1ff r6907: Unixinfo for samba4, not activated by default.
Volker
(This used to be commit 81ddffde36)
2007-10-10 13:16:56 -05:00
Andrew Tridgell
b836187484 r6875: added a BENCH-CLDAP test. Speed of the cldap server isn't all that important, but it does
help find memory leaks (and in fact, there was one, fixed in next commit)
(This used to be commit ab19e38c23)
2007-10-10 13:16:53 -05:00
Andrew Tridgell
f378a9e133 r6869: removed completely bogus BASE-RW2 test
(This used to be commit b3dd5c326e)
2007-10-10 13:16:52 -05:00
Jelmer Vernooij
f9ad3029ae r6863: lib-friendlier names + fix some dependencies
(This used to be commit cab81a51bf)
2007-10-10 13:16:52 -05:00
Tim Potter
47823c1735 r6847: Fix some unused variable warnings in the libnet torture test.
(This used to be commit 448795607f)
2007-10-10 13:16:50 -05:00
Jelmer Vernooij
e73d051e20 r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
(This used to be commit b9d0ae93ba)
2007-10-10 13:16:50 -05:00
Andrew Tridgell
1dbe7430c7 r6816: - fixed debug display of ndr netlogon union
- send a username when scanning to make structure elements clearer
(This used to be commit 7d19eb9433)
2007-10-10 13:16:47 -05:00
Andrew Bartlett
8f96c42027 r6799: Remove a rudundent variable from the context structure - we can figure
this out by asking GENSEC, just like everybody else.

Andrew Bartlett
(This used to be commit 0268d6c46b)
2007-10-10 13:16:45 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb899)
2007-10-10 13:16:44 -05:00
Andrew Bartlett
ae0cf9c240 r6793: Move auth_sam to use the dnsDomain rather than the
soon-to-be-depricated 'realm'.

Add torture test for this behaviour.

Andrew Bartlet
(This used to be commit 6b9020661a)
2007-10-10 13:16:44 -05:00
Andrew Tridgell
0b8b29f070 r6776: make the cldap torture test not dependent on the realm being set
correctly - it gets the realm from an initial no-attribute search
(This used to be commit 52d10c8d99)
2007-10-10 13:16:43 -05:00
Andrew Tridgell
6f36f7cd25 r6766: some more cldap tests ...
my best guess now is that w2k3 converts the & in the cldap query to an |
for the ldap search. at least it behaves roughly like that.
(This used to be commit 1d6ab9aaef)
2007-10-10 13:16:42 -05:00
Andrew Tridgell
a90c731ec5 r6765: expanded the cldap test suite to test the usage of the DomainGuid,
AAC, and User attributes in cldap netlogon queries

interestingly, while WinXP generated cldap filters with these set, the
w2k3 cldap server seems to completely ignore them, so I didn't need to
alter our cldap server at all to pass the test :-)
(This used to be commit 177c8becd2)
2007-10-10 13:16:42 -05:00
Stefan Metzmacher
2542d54e93 r6732: - move sasl send recv code to the ldap lib
- support 'modrdn' ldif

metze
(This used to be commit b6a1734699)
2007-10-10 13:16:39 -05:00
Andrew Tridgell
2f2fc84a7c r6720: added support for the remaining 2 types of CLDAP netlogon
response.

To work around the fact that the type of the returned data is not
encoded in the packet, this required adding ndr_pull_union_blob()
which allows us to pull a blob into a union with a specified switch
value, in this case the switch value comes from the calling NtVer field.
(This used to be commit bd27e626c2)
2007-10-10 13:16:37 -05:00
Rafal Szczesniak
84f248ec84 r6717: - torture test of async useradd function and monitor messages.
- make message handling functions static.

rafal
(This used to be commit 96446e5e1e)
2007-10-10 13:16:37 -05:00
Andrew Tridgell
191c8b5082 r6694: a simple CLDAP torture test
interestingly, w2k3 seems to have 4 different varients of the netlogon
cldap response. We decode two of them so far. The other two are tricky
as they aren't distinguished by a command code, they use the same
command codes (0x13 and 0x17) but have quite a different format. Very
strange!
(This used to be commit 58f1c39282)
2007-10-10 13:16:35 -05:00
Tim Potter
78176b7ee0 r6676: Fix unused variable.
(This used to be commit 699e0adf4c)
2007-10-10 13:16:34 -05:00
Tim Potter
61d53d5d76 r6675: Fix printf warning.
(This used to be commit 513fc9c244)
2007-10-10 13:16:33 -05:00
Tim Potter
1838812454 r6674: Fix some compiler warnings.
(This used to be commit c2c563bf98)
2007-10-10 13:16:33 -05:00
Rafal Szczesniak
e2cec76d85 r6637: Test for asynchronous function and monitor messages.
rafal
(This used to be commit 4ac3c145fc)
2007-10-10 13:16:32 -05:00
Andrew Bartlett
35a05d1dc0 r6603: More work on the samdump puzzle. This implements a function pointer
callback interface, so we can start dumping into more than just stdout
soon.

Also use the enums instead of uint32 where possible and valid.

Andrew Bartlett
(This used to be commit f0c67a4a24)
2007-10-10 13:16:29 -05:00
Andrew Bartlett
f551a6ee23 r6582: Remove the hack that metze needed because Samba4 didn't have a samdump
command.

Andrew Bartlett
(This used to be commit adb5a3093e)
2007-10-10 13:16:28 -05:00
Andrew Tridgell
965fab8268 r6581: improved the error message for RAW-LOCK timeouts
(This used to be commit 13ab07214e)
2007-10-10 13:16:28 -05:00
Andrew Bartlett
85e9412c47 r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which
must match the account type.

(Yes, jelmer objects to this inclusion of the kitchen sink ;-)

Andrew Bartlett
(This used to be commit 8ee208a926)
2007-10-10 13:16:26 -05:00
Andrew Tridgell
0e5de220d9 r6563: - fixed the local messaging torture test not to fork, as this causes
trouble with the epoll() based event handling

- changes the test to use a local directory instead of the prefix lock
  directory, so the LOCAL-MESSAGING test can run as non-root even when
  the lock directory is not writeable
(This used to be commit 079e1f4e85)
2007-10-10 13:16:26 -05:00
Andrew Tridgell
1fd59e3d61 r6556: added BENCH-RPC test, useful for simple rpc load testing
(This used to be commit d1e0b7a2e3)
2007-10-10 13:16:25 -05:00
Andrew Bartlett
bb6e2059ee r6544: Use common structures between SAMR, NETLGON and the Krb5 PAC.
Fill out the group list for the SamLogon reply, so clients get the
supplementary groups.

Andrew Bartlett
(This used to be commit d9c31e60a7)
2007-10-10 13:16:24 -05:00
Andrew Tridgell
3f4093de8a r6531: fixed gentest with new credentials code
(This used to be commit 3e610e3952)
2007-10-10 13:16:23 -05:00
Andrew Tridgell
68269bde7c r6529: fixed locktest with new credentials code
(This used to be commit 70b4a687c0)
2007-10-10 13:16:23 -05:00
Andrew Bartlett
b075827877 r6524: Fix the error we print when the RPC-ECHO test fails.
Andrew Bartlett
(This used to be commit 4fc2a056cd)
2007-10-10 13:16:22 -05:00
Andrew Bartlett
7de3892df1 r6523: Another string that isn't filled in. I wonder why this is, but for
now don't fail the test.

Andrew Bartlett
(This used to be commit 437aabf15e)
2007-10-10 13:16:22 -05:00
Andrew Tridgell
584f64c103 r6509: fixed a crash bug found by a-jutley@microsoft.com in RPC-RAP test
(the call freed the memory it used to fill in the result structure)
(This used to be commit b352ef1a42)
2007-10-10 13:16:20 -05:00
Andrew Bartlett
e7b92b10aa r6468: Fix LOCAL-NTLMSSP test with new NTLMSSP structure.
Andrew Bartlett
(This used to be commit 8d503fb153)
2007-10-10 13:11:40 -05:00
Andrew Bartlett
3045ecfa1d r6458: Split up NTLMSSP into a new directory, and into seperate files for the
client and server logic code.  In future, this may allow us to build
only the NTLMSSP client, and not the server, but in the short-term, it
allows me greater sainity in moving around these files.

Andrew Bartlett
(This used to be commit 2f22841c67)
2007-10-10 13:11:38 -05:00
Andrew Bartlett
53079da638 r6454: Start to migrate NTLMSSP away from it's own API to just use GENSEC.
The aim here is to remove the extra layer of abstraction, and to then
use the credentials code directly in the NTLMSSP layer.

Andrew Bartlett
(This used to be commit b14c530dfd)
2007-10-10 13:11:38 -05:00
Andrew Bartlett
4411479b93 r6451: Ensure we correctly initialise the credentials structure in the schannel test.
Andrew Bartlett
(This used to be commit 7e554e31d9)
2007-10-10 13:11:37 -05:00
Rafal Szczesniak
9fd63bde85 r6432: Restorin previous construction of conditions after a little discussion
with Richard and Andrew.

rafal
(This used to be commit 400f6d5f87)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
03cae64229 r6430: Delete existing test account if, for some reason, it hasn't been
deleted last time running the test.

rafal
(This used to be commit 91df25a795)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
f531686dc4 r6426: DCE/RPC bind string parsing is not needed anymore, as we use
lp_workgroup parameter as domain name to operate on.

rafal
(This used to be commit ea251d4f79)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
f6e585d69b r6420: Close user account handle before calling tested function to better
simulate real conditions of calling the function.

rafal
(This used to be commit 2518122c9e)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
adcd33c906 r6415: Added NET-USERDEL torture test which proves something's wrong
with user del function.

rafal
(This used to be commit a6b1911882)
2007-10-10 13:11:36 -05:00
Rafal Szczesniak
3df967fe74 r6406: Include new NET-USERADD test in torture suite.
rafal
(This used to be commit 0dc416b8e4)
2007-10-10 13:11:35 -05:00
Rafal Szczesniak
aa615263a0 r6405: Complete NET-USERADD torture test for user add composite function.
rafal
(This used to be commit 76fb84c1ee)
2007-10-10 13:11:35 -05:00
Rafal Szczesniak
d7beee39bd r6389: Incomplete test of composite useradd function.
rafal
(This used to be commit 7539397240)
2007-10-10 13:11:35 -05:00
Alexander Bokovoy
9779e6d670 r6352: Two new composite calls:
- qfsinfo (query file system information)
- appendacl (append an ACL to existing file's security descriptor and get new
full ACL)

The second one also includes an improvement to security descriptor handling
which allows to copy security descriptor. Written by Peter Novodvorsky
<peter.novodvorsky@ru.ibm.com>

Both functions have corresponding torture tests added. Tested under valgrind and
work against Samba 4 and Windows XP.

ToDo: document composite call creation process in prog_guide.txt
(This used to be commit 441cff62ac)
2007-10-10 13:11:34 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
e284a26294 r6338: ADS style GETDC response now works well enough that WinXP can join
Samba4 without Samba3 nmbd
(This used to be commit f4d07d7d3b)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
8d0a36366c r6331: added IDL and test suite for the ADS style response to a datagram netlogon query.
Note that this response is almost identical to the CLDAP netlogon
response, so adding that will now be quite easy.
(This used to be commit 1ea4ed4ad1)
2007-10-10 13:11:32 -05:00
Tim Potter
6bb0231229 r6325: Rename aliasname -> alias_name in CreateDomAlias function.
(This used to be commit 63dfa9b806)
2007-10-10 13:11:32 -05:00
Andrew Tridgell
f06e39e308 r6321: added IDL and test suite for NBT dgram 'sam logon' request (sent by
clients when a user tries to login)
(This used to be commit 08ded62156)
2007-10-10 13:11:31 -05:00
Andrew Bartlett
b3221032d2 r6315: Allow sane session setup behaviour on SPNEGO regarding VUIDs.
Andrew Bartlett
(This used to be commit 6e2327ee9b)
2007-10-10 13:11:31 -05:00
Andrew Bartlett
1372e938fc r6314: A more complete RAW-CONTEXT test. This Samba4 currently fails, but it
now tests areas in extended security handling (SPNEGO) that are just
plain odd...

Andrew Bartlett
(This used to be commit d8d63e8c79)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b708e87a63 r6288: the nbt dgram server now responds to GETDC requests. It works with our
test suite, but doesn't yet seem to satisfy a nt4 client. I'm
investigating.
(This used to be commit 406217262d)
2007-10-10 13:11:29 -05:00
Andrew Bartlett
fc1b6bae23 r6286: Add back metze's test of setting a trust password to ''. I removed
this because I don't want our torture suite to leave behind accounts
with known passwords if it is stopped in the wrong place.  It is now
run behind the -X (dangerous) wrapper.

Andrew Bartlett
(This used to be commit 057a81d81e)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
b0ca8ed455 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
(This used to be commit 3b34df6a67)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
866c62f26d r6246: stop waiting when we get a reply
(This used to be commit 8b9a5d8336)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
f83e6ded9d r6245: receive and parse the GETDC response in the NBT-DGRAM test. The test
now tries to bind to port 138 if possible, so if you run it as root
and smbd/nmbd is not running then it works against windows servers
(This used to be commit 52ccdb79bc)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
7c6c366150 r6223: added a bit more datagram infrastructure and the beginnings of a test
suite. The NBT-DGRAM test does a UDP/138 netlogon request, to which a
windows server sends a reply, but the windows server sends the reply
to the wrong port (it always sends to 138), so the test suite doesn't
see it.
(This used to be commit a7634625db)
2007-10-10 13:11:27 -05:00
Stefan Metzmacher
f9b3a8d3b9 r6206: go baack 10 revisions to get DatabaseDeltas, this shows that the bdc only
need one call to get in sync again (except something like NT_STATUS_MORE_ENTRIES is returned)

also the pdc only need to know the current state values

metze
(This used to be commit f4e12b3893)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
4baf0b01c4 r6197: fix for my last commit, I removed SPOOLSS_ARCHITECTURE, which was "Architecture"
(sorry richard:-)

disable lookup for DefaultSpoolDirectory until, I have fixed the parsing when WERR_MORE_DATA
is returned

metze
(This used to be commit d5993337b8)
2007-10-10 13:11:25 -05:00
Richard Sharpe
d3911fa5d7 r6195: I think Metze meant SPOOLSS_ARCHITECTURE_NT_X86, but I could be wrong.
(This used to be commit 85c2b8b944)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
746bb14367 r6194: - fix some spoolss_*Form names and types
- fix GetPrinterData(), look inside the datablob

- add idl for RemoteFindFirstChangeNotify(), without meaning yet, just to not return a DCERPC_FAULT
  when receiving this request

metze
(This used to be commit 92f3d5bd9c)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
3abce73193 r6179: - add new spoolss tests for all spoolss_Enum*() calls which didn't need
a handle as parameter,

  EnumPorts
  EnumPrinterDrivers
  EnumMonitors
  EnumPrintProcessors
  EnumPrinters

  we now do cross checks between the different info levels
  and sore the results in a global context,
  so that we later can add cross checks between the different object types

- add idl for EnumMonitors and EnumPrintProcessors

metze
(This used to be commit 92a3721bc7)
2007-10-10 13:11:23 -05:00
Andrew Tridgell
772f31797d r6165: fixed up the userinfo composite code. Fixes include:
- talloc should always be done in the right context. For example, when creating
  the userinfo_state structure, place it inside the composite
  structure, not directly on the pipe. If this isn't done then
  correct cleanup can't happen on errors (as cleanup destroys the top
  level composite context only)

- define private structures like userinfo_state in the userinfo.c
  code, not in the public header

- only keep the parameters we need in the state structure. For
  example, the domain_handle is only needed in the first call, so we
  don't need to keep it around in the state structure, but the level is
  needed in later calls, so we need to keep it

- always initialise [out,ref] parameters in RPC calls. The [ref] part
  means that the call assumes the pointer it has been given is
  valid. If you don't initialise it then you will get a segv on
  recv. This is why the code was dying.

- don't use internal strucrure elements like the pipe
  pipe->conn->pending outside of the internal rpc implementation. That
  is an internal list, trying to use it from external code will cause crashes.

- rpc calls assume that rpc call strucrures remain valid for the
  duration of the call. This means you need to keep the structures
  (such as "struct samr_Close") in the userinfo_state strucrure,
  otherwise it will go out of scope during the async processing

- need to remember to change c->state to SMBCLI_REQUEST_DONE when the
  request has finished in the close handler, otherwise it will loop
  forever trying to close

Mimir, please look at the diff carefully for more detailed info on the fixes
(This used to be commit 01ea1e7762)
2007-10-10 13:11:23 -05:00
Stefan Metzmacher
64ad915111 r6109: nicer way to handle compression in the torture test
metze
(This used to be commit a3cec189e1)
2007-10-10 13:11:19 -05:00
Andrew Bartlett
a19d002cee r6032: Fix up SetServerPassword2 on NETLOGON for [bigendian]. Clearly nobody
has the patience to run test_w2k3.sh to completion :-)

It looks to me that the Windows server runs the RC4 over the C struct,
not the NDR data.

Andrew Bartlett
(This used to be commit c324d97413)
2007-10-10 13:11:16 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Stefan Metzmacher
3ec2c008b8 r6000: add some notes about the cases where compression (or what ever this is)
is used, in the reply.

metze
(This used to be commit 618dadb7ef)
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
220f82e570 r5999: ups, remove the testvalue that I used against my w2k3 server
metze
(This used to be commit 3d3e09af16)
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
01ab1128ce r5998: I was wrong with the highwater mark...
I think I now understand how it works:-)

metze
(This used to be commit f8add2e66a)
2007-10-10 13:11:14 -05:00
Jelmer Vernooij
4c4738938a r5977: Fix uninitialised memory bug in ndr_pull_ref_ptr(). This fixes the
Test_DoublePointer test failure.
(This used to be commit 4089d5f67d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
7c55d0ffa5 r5976: SIDs can't have more then 5 subauths (caught by [validate] and
range())
(This used to be commit ec1eaa274b)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
88a5f8b26f r5963: Fix parameter passing for gentest and locktest
(This used to be commit 28914c89dc)
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
1bb3e99d06 r5949: give things more meaning, and reuse structs where it is possible
to make things more clear

metze
(This used to be commit adefeeb4f3)
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
07c705745a r5947: print out the password hashes when -d 100 is in use,
very usefull for creating a keytab file with

metze
(This used to be commit 15b80a28db)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
e25cff1c11 r5942: A couple of small changes to fix things up with the new credentials
infrustructure.

Andrew Bartlett
(This used to be commit d51718ab8a)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
5aa2646be8 r5879: Rename SAMR_FIELD_WORKSTATION to SAMR_FIELD_WORKSTATIONS - it is a list.
Andrew Bartlett
(This used to be commit 7822101cb5)
2007-10-10 13:11:06 -05:00
Andrew Bartlett
2b41ba049e r5878: Be clear which machine name (We have one worksation, and one BDC) we
are doing logins with.

Andrew Bartlett
(This used to be commit b7297c44fa)
2007-10-10 13:11:06 -05:00
Andrew Bartlett
00ac91fa29 r5876: Add a test account for the duration of the samsync - to ensure we have
a good variety of things to test against.

Add code to testjoin to handle this just like test machine accounts

Soon I'll remove the 'must change password' flag, so we can do logins with it.

Andrew Bartlett
(This used to be commit 08b47e2dc0)
2007-10-10 13:11:06 -05:00
Jelmer Vernooij
ef213b0248 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
c638a8380d r5830: start to analyse the attribute values, depending on the attribute type
metze
(This used to be commit 63229b9503)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
cead12981f r5799: more DsGetNCChanges updates, I'm starting to understand it...
also add a really simple torture test for DsGetNCChanges

metze
(This used to be commit bcde67a7ef)
2007-10-10 13:11:04 -05:00
Andrew Bartlett
d830fcd7d1 r5783: Test renaming of accounts in the RPC-SAMR test, and add support into
the SAMR server.

Andrew Bartlett
(This used to be commit fd748f9d2f)
2007-10-10 13:11:03 -05:00
Jelmer Vernooij
e9ca6e48ff r5775: Remove some unused functions (unions are no longer as special as they used to be)
Add oxid mapping table support in DCOM
(This used to be commit e193555f0e)
2007-10-10 13:11:02 -05:00
Stefan Metzmacher
4b83366b6c r5742: - add torture test and idl for DsReplicaUpdateRefs()
(the torture test currently only tests if the idl is correct)

- add start for idl for DsGetNCChanges()
  (if someone didn't noticed the current ethereal trunk code can
   successful decrypt DCERPC and LDAP gsskrb5 encrypted blobs,
   when you provide a keytab and have compiled against heimdal :-)

- add a view bitmaps and enum's for better debugging

metze
(This used to be commit cf7c1352ab)
2007-10-10 13:11:01 -05:00
Jeremy Allison
f52643c23c r5730: More fun with delayed write semantics with multiple file handles
open on the same file on the same connection.
Jeremy.
(This used to be commit 23733abfa2)
2007-10-10 13:11:00 -05:00
Stefan Metzmacher
c857c03170 r5681: fix the build and compiler wanings
metze
(This used to be commit bb2622a0c9)
2007-10-10 13:11:00 -05:00
Rafal Szczesniak
983306c819 r5679: Complete basic test of rpc_composite_userinfo function (which
btw proves the function is completely broken but that's what
tests are for)

rafal
(This used to be commit 7278c7d837)
2007-10-10 13:10:59 -05:00
Rafal Szczesniak
3a9d9ab5b0 r5678: Torture tests require also libnet in order to run NET-* tests.
rafal
(This used to be commit e492a2a604)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
d892500e73 r5676: Fix some alignment issues and IRemoteActivation
(This used to be commit a9b13f6701)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
dd2aefd56b r5675: - More DCOM bug fixes
- Keep COM and DCOM more seperated
(This used to be commit f694f484c4)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
77ec3f684d r5674: - Re-enable DCOM support.
- Always put IID in vtables (useful for asserts)
- Add table to keep track of DCOM proxy classes
- Bunch of smaller bug fixes
(This used to be commit 26d5a0b92c)
2007-10-10 13:10:59 -05:00
Jelmer Vernooij
5658167806 r5671: Bunch of fixes related to arrays and pointers to arrays.
(This used to be commit 00ef0feadd)
2007-10-10 13:10:58 -05:00
Andrew Bartlett
42031bc4be r5668: Add tests to RPC-SAMLOGON to test for user@REALM style logins. These
need a NULL domain (or a "" domain, except this breaks NTLMv2, and I
need to look into it a bit more).

Add support to the Samba4 server for these logins.  This will need
extension when we handle trusted domains as a DC, as it is a principal
name, not just another format for the username.

Andrew Bartlett
(This used to be commit de02c7c222)
2007-10-10 13:10:58 -05:00
Jelmer Vernooij
631aa1f0ef r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :

 type *name[];

rather then :

 type *name;

which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
(This used to be commit a416de5825)
2007-10-10 13:10:57 -05:00
Rafal Szczesniak
75d2452c01 r5652: Add libnet tests section to torture test.
rafal
(This used to be commit f061652b75)
2007-10-10 13:10:56 -05:00
Rafal Szczesniak
b55b885f1b r5651: A bit more code in userinfo test and hook up test function to
main torture binary.

rafal
(This used to be commit 94955e5325)
2007-10-10 13:10:56 -05:00
Günther Deschner
0dcd79b92a r5611: Add EnumPrinterDataEx-test (for now just for PrinterDriverData, we need
to enumerate (recursively!) over all keys with EnumPrinterKey later on.

Guenther
(This used to be commit 46ae4010f2)
2007-10-10 13:10:56 -05:00
Rafal Szczesniak
70ae0bb382 r5610: Starting libnet test of userinfo call. Unfinished yet, though
doesn't break anything at the moment.

rafal
(This used to be commit eb13c1bcfc)
2007-10-10 13:10:56 -05:00
Stefan Metzmacher
4a3ca96fb4 r5603: add "authservice()" property to the interface property list
so we can specify allowed target service names in the idl file

the default is "host"

metze
(This used to be commit bf40d5321f)
2007-10-10 13:10:55 -05:00
Tim Potter
04d3e8046a r5553: Add idl and test for spoolss_AddPort(). It always seems to return
WERR_NOT_SUPPORTED though.
(This used to be commit ba4730a378)
2007-10-10 13:10:54 -05:00
Tim Potter
84d632ab5e r5552: Don't try to read the value of r.out.result when the dcerpc client
function returns non-OK.  If a non-OK status is returned then some or
all or r.out is likely to be uninitialised.
(This used to be commit 0e83a306b0)
2007-10-10 13:10:54 -05:00
Stefan Metzmacher
ae223fadd0 r5539: more bad name checks and don't check for \\localhost and \\127.0.0.1
we maybe use this in the build farm

metze
(This used to be commit 98e32260f5)
2007-10-10 13:10:53 -05:00
Stefan Metzmacher
68ce448fbd r5537: - make use of bitmaps and enums
- add and fix some PrinterInfo levels

- add and fix some DriverInfo levels

- fix EnumPrinterDriver torture test

the curent RPC-SPOOLSS now passes on w2k3

metze
(This used to be commit 14b88ca20d)
2007-10-10 13:10:53 -05:00
Stefan Metzmacher
09879ff119 r5516: NT4 doesn't support GetPrinterDataEx()
metze
(This used to be commit 81f4afcbfa)
2007-10-10 13:10:53 -05:00
Stefan Metzmacher
d900aed90c r5503: - add torture test which tests for invalid printernames
- add OpenPrinter() server code that just calls OpenPrinterEx()

- fix OpenPrinterEx logic, we pass the invalid printer names test now

metze
(This used to be commit 3085d3728e)
2007-10-10 13:10:52 -05:00
Stefan Metzmacher
4926b8f5c0 r5498: fix OpenPrinter() idl and torture test
metze
(This used to be commit fd7950abe6)
2007-10-10 13:10:51 -05:00
Jelmer Vernooij
80d3047333 r5490: The big (D)COM commit! :-) Contains most of the changes described in the
DCOM paper in lorikeet. This is the result of 1.5 months work (mainly
figuring out how things *really* work) at the end of 2004.

In general:
- Clearer distinction between COM and DCOM. DCOM is now merely
  the glue between DCE/RPC+ORPC and COM. COM can also work without
  DCOM now. This makes the code a lot clearer.
- Clearer distinction between NDR and DCOM. Before, NDR had a couple of
  "if"s to cope with DCOM, which are now gone.
- Use "real" arguments rather then structures for function arguments in
  COM, mainly because most of these calls are local so packing/unpacking
  data for every call is too much overhead (both speed- and code-wise)
- Support several mechanisms to load class objects:
  - from memory (e.g. part of the current executable, registered at start-up)
  - from shared object files
  - remotely
- Most things are now also named COM rather then DCOM because that's what it
  really is. After an object is created, it no longer matters whether it
  was created locally or remotely.

There is a very simple example class that contains
both a class factory and a class that implements the IStream interface.
It can be tested (locally only, remotely is broken at the moment)
by running the COM-SIMPLE smbtorture test.

Still to-do:
 - Autogenerate parts of the class implementation code (using the coclass definitions in IDL)
 - Test server-side
 - Implement some of the common classes, add definitions for common interfaces.
(This used to be commit 71fd3e5c3a)
2007-10-10 13:10:50 -05:00
Stefan Metzmacher
6b4cac2c00 r5489: hide handwritten pull/push/print code from the caller
for the spoolss_Enum* functions

metze
(This used to be commit bfcc86e706)
2007-10-10 13:10:50 -05:00
Jelmer Vernooij
a62ade362f r5487: - Allow disabling modules
- Disable all current DCOM functionality (I hope to commit
	a large bunch of COM and DCOM changes later today)
- Make remact and oxidresolver depend on orpc rather then dcom
(This used to be commit f298f2a547)
2007-10-10 13:10:50 -05:00
Jelmer Vernooij
64112074e9 r5465: Add support to multiple levels of pointers in pidl.
Also add a new function to echo.idl that tests this behaviour.
(This used to be commit e5eb5e847e)
2007-10-10 13:10:48 -05:00
Jelmer Vernooij
77701f6ca1 r5453: Treat "embedded" arrays (surrounding structures) somewhat
more generically. The default functions for remembering array sizes
are now used rather then a special local variable.
(This used to be commit 5f7882341f)
2007-10-10 13:10:47 -05:00
Jelmer Vernooij
ea5ddbcb4d r5452: Add implementation + torture test for echo_Surrounding
(This used to be commit 1b71000cc1)
2007-10-10 13:10:47 -05:00
Andrew Tridgell
42d6a4c4f0 r5451: - added separate wrepl_associate(), wrepl_pull_table() and wrepl_pull_names() functions, with reasonable
parameters, so callers don't need to deal directly with wins replication packet structures

- converted the NBT-WINSREPLICATION torture test to use the new APIs
(This used to be commit cec1672662)
2007-10-10 13:10:47 -05:00
Andrew Tridgell
97dcee677e r5416: nicer output when trying to replicate with a server that hasn't been setup as
a partner
(This used to be commit b94301b357)
2007-10-10 13:10:44 -05:00
Andrew Tridgell
14bd4b8184 r5415: added a NBT-WINSREPLICATION torture test. It asks the server for the
list of partners, and for each partner dumps the complete list of
names
(This used to be commit dacf5f166a)
2007-10-10 13:10:44 -05:00
Andrew Tridgell
4c7c38e930 r5411: make network interface selection a bit saner
- if we have no configured network interfaces, then don't start nbtd (when I add dynamic
  interface loading this will change to a delay until a network interface comes up)

- choose the best interface by netmask for torture tests that need a
  specific IP (such as the WINS test). Added iface_best_ip() for that.

- if specific interfaces are chosen in smb.conf, then keep that ordering, and
  default to the first one listed
(This used to be commit 4d08c11407)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
39713c703d r5408: - added testing for the behaviour of the special 0x1c name
- added WINS server support for the 0x1c name
(This used to be commit 1558a54528)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
82e6a6e46b r5403: a simple WINS benchmarking program
(This used to be commit d0f8b5bc6d)
2007-10-10 13:10:42 -05:00
Andrew Tridgell
97b2a6f7ed r5397: added testing and server support for the special handling required for the 0x1d local master browser name
in WINS
(This used to be commit 2650b43ca9)
2007-10-10 13:09:51 -05:00
Stefan Metzmacher
4e43af6c69 r5394: as the timing should be fixed in the server now, don't accept to early replies
anymore, also print out usecs in the debug messages

metze
(This used to be commit 9a657f358e)
2007-10-10 13:09:51 -05:00
Andrew Tridgell
205071ddc6 r5390: use __location__ to make tracking down errors in RPC-SAMSYNC easier
(This used to be commit 40a8340f1b)
2007-10-10 13:09:50 -05:00
Andrew Tridgell
bd00b5bd20 r5386: added testing of registration of group names
(This used to be commit 8afe4bd599)
2007-10-10 13:09:49 -05:00
Tim Potter
abc28d66e9 r5364: Rename string fields called 'domain' and 'name' to be 'domain_name'.
(This used to be commit 6749b9404d)
2007-10-10 13:09:46 -05:00
Andrew Tridgell
7b8f58c37c r5352: added a function nbt_name_string() that formats a nbt_name structure
as a human readable string. The format is designed to be able to be
used as the DN for the WINS database as well, while coping with
arbitrary bytes in the name (except nul bytes)
(This used to be commit aac3090e35)
2007-10-10 13:09:45 -05:00
Andrew Tridgell
64ad8e52ec r5347: fixed the NBT-REGISTER test now that the nbt layer is case sensitive
(This used to be commit ae514f0762)
2007-10-10 13:09:44 -05:00
Andrew Tridgell
5e9c09ef25 r5333: weird, w2k3 always sends a positive name release response, even for names that
have never been registered. I wonder if there is some reason?
(This used to be commit dbef4fd5c3)
2007-10-10 13:09:43 -05:00
Andrew Tridgell
dd689afdc8 r5328: - allow case sensitive nbt name lookups
- added --case-sensitive option to nmblookup

 - added case sensitivity tests to the NBT-WINS test
(This used to be commit 80a95d5688)
2007-10-10 13:09:42 -05:00
Andrew Tridgell
82fd60e904 r5325: - expanded the NBT-WINS test to include scopes
- fixed the bugs that the new test found
(This used to be commit 6d775f1216)
2007-10-10 13:09:41 -05:00
Andrew Tridgell
341395db51 r5310: allow for rounding errors in the sleep test
(This used to be commit bd2c55a519)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
75ddf59ea1 r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
501379431c r5305: removed libcli/ldap/ldap.h from includes.h
(This used to be commit 0df3fdd817)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -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
fedf0b0d91 r5296: - only include the tdb headers where they are needed
- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
(This used to be commit 6f79432fe6)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
b9bb7f596d r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
(This used to be commit bb1ab11d8e)
2007-10-10 13:09:37 -05:00
Jelmer Vernooij
632acd9bc7 r5286: Some first steps in making the pidl code somewhat more generic for the
various data types:

Add ndr_flags argument to all ndr push/pull scalar functions
(This used to be commit ab490c0c88)
2007-10-10 13:09:36 -05:00
Andrew Tridgell
63438299ae r5277: initialise the multi_homed flag in the name registration test
(This used to be commit d51fcee29a)
2007-10-10 13:09:36 -05:00
Andrew Tridgell
7f10614e94 r5252: - fixed nmblookup for the nbt api changes
- added a simple WINS server name registration and query test
(This used to be commit d56e68ebf5)
2007-10-10 13:09:34 -05:00
Jelmer Vernooij
60d9b40ba4 r5209: Fix the endpoint mapper to work with IPX endpoints (which
accidently have the same protocol id as UUID's)
Before this, Samba would give NDR errors when contacting
a remote server that has IPX support enabled.

This one was on my long due bugs list.
(This used to be commit 7b847de64f)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
0798d54b4f r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4d)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
831e06810a r5156: started on test driven development of the nbt server. This adds a
NBT-REGISTER test that tests that a server correctly defends its name
against broadcast name registrations.

Jeremy, you might like to look at this. Samba3 nmbd fails to respond.
(This used to be commit bb1298a2eb)
2007-10-10 13:09:28 -05:00
Andrew Tridgell
9b9c23b19b r5155: define ipv4address as a based IDL type, mapped to a "const char *" in
the header, and defined on the wire as a 4 byte network byte order
IP. This means the calling code doesn't have to worry about network
byte order conversions.
(This used to be commit 72048e3717)
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
c4f115aa1b r5148: use ipv4_addr also in epmapper idl
metze
(This used to be commit cbc1f17282)
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
d8d3a5ffe3 r5137: fix types
metze
(This used to be commit add1c57937)
2007-10-10 13:09:26 -05:00
Andrew Tridgell
75049fb66f r5130: added a single NBT name query benchmark. It keeps 10 queries in flight at a time.
(This used to be commit 2d23c665ff)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
9a70f446fc r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
(This used to be commit cf11d05e35)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
a0ab1f7afd r5107: moved the horrible ldap socket code, and the even worse
asn1-tied-to-blocking-sockets code into the ldap client and torture
suite, and out of the generic libs, so nobody else is tempted to use
it for any new code.
(This used to be commit 39d1ced21b)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
55d4d36993 r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy
from the time when smbd was only handling SMB connection. The new code
gets rid of all of the smb_server specific code in smbd/, and creates
a much simpler infrastructures for new server code.

Major changes include:

 - simplified the process model code a lot.

 - got rid of the top level server and service structures
   completely. The top level context is now the event_context. This
   got rid of service.h and server.h completely (they were the most
   confusing parts of the old code)

 - added service_stream.[ch] for the helper functions that are
   specific to stream type services (services that handle streams, and
   use a logically separate process per connection)

 - got rid of the builtin idle_handler code in the service logic, as
   none of the servers were using it, and it can easily be handled by
   a server in future by adding its own timed_event to the event
   context.

 - fixed some major memory leaks in the rpc server code.

 - added registration of servers, rather than hard coding our list of
   possible servers. This allows for servers as modules in the future.

 - temporarily disabled the winbind code until I add the helper
   functions for that type of server

 - added error checking on service startup. If a configured server
   fails to startup then smbd doesn't startup.

 - cleaned up the command line handling in smbd, removing unused options
(This used to be commit cf6a46c3cb)
2007-10-10 13:09:22 -05:00
Andrew Bartlett
5045bdc2a4 r5090: Fix up the IDL for LogonGetDomainInfo in NETLOGON.
Andrew Bartlett
(This used to be commit e5afc36093)
2007-10-10 13:09:21 -05:00
Andrew Bartlett
89d6c45d7c r5089: Fix indentation.
(This used to be commit 2e31694f9e)
2007-10-10 13:09:21 -05:00
Jeremy Allison
ebf1d79986 r5071: Reverted (per tridge request).
Jeremy.
(This used to be commit 554e27023f)
2007-10-10 13:09:19 -05:00
Jeremy Allison
90ba985c6b r5068: I'm pretty sure an old search request is allowed to return changed case
versions of filenames. Tridge please check I haven't screwed this up.
Jeremy.
(This used to be commit 40c1e16b5b)
2007-10-10 13:09:18 -05:00
Andrew Tridgell
759da3b915 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.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
93e27bec15 r5035: fixed composite test to use --num-ops command line option
(This used to be commit f36e4cf686)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
3dd17f1288 r5034: - added a type mapping function in pidl, so the type names in our IDL
files don't need to match the type names in the generated headers

- with this type mapping we no longer need definitions for the
  deprecated "int32", "uint8" etc form of types. We can now force
  everyone to use the standard types int32_t, uint8_t etc.

- fixed all the code that used the deprecated types

- converted the IDL types "int64" and "uint64" to "dlong" and
  "udlong". These are the 4 byte aligned 64 bit integers that
  Microsoft internally define as two 32 bit integers in a
  structure. After discussions with Ronnie Sahlberg we decided that
  calling these "int64" was confusing, as it implied a true 8 byte
  aligned type

- fixed all the cases where we incorrectly used things like
  "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for
  those. The fact that it is hyper-aligned on the wire is not relevant
  to the API, and should remain just a IDL property
(This used to be commit f86521677d)
2007-10-10 13:09:15 -05:00
Tim Potter
051c7b5e0c r4980: Copy RAP callno constants from Samba 3 and start to use them.
(This used to be commit e32ade4485)
2007-10-10 13:09:11 -05:00
Tim Potter
769d81520c r4975: Update usage of talloc in rap torture code.
Don't use ZERO_STRUCTP() when creating a new struct rap_call.
(This used to be commit c475fa4457)
2007-10-10 13:09:11 -05:00
Tim Potter
8bf94dc7f7 r4973: Add a RAP scanner to smbtorture. win2k has call numbers 0-215 although
the cifs tr lists 250-318 also.
(This used to be commit 37b4d1a676)
2007-10-10 13:09:10 -05:00
Andrew Tridgell
3e44c4a3ba r4951: some of the code dealing with libcli was getting too complex trying to
handle the inverted memory hierarchy that a normal session
establishment gave. The inverted hierarchy came from that fact that
you first establish a socket, then a transport, then a session and
finally a tree. That leads to the socket being at the top of the
memory hierarchy and the tree at the bottom, which makes no sense from
the users point of view, as they want to be able to free the tree and
have everything disappear.

The core problem was that the libcli interface didn't distinguish
between establishing a primary context and a secondary context. If you
establish a 2nd session on a transport then you want the transport to
be referenced by the session, whereas if you establish a primary
session then you want the transport to be a child of the session.

To fix this I have added "parent_ctx" and "primary" arguments to the
libcli intialisation functions. This makes using the library much
easier, and gives us a memory hierarchy that makes much more sense.

I was prompted to do this by a bug in the cifs backend, which was
caused by the socket not being properly torn down on a disconnect due
to the inverted memory hierarchy.
(This used to be commit 5e8fd5f701)
2007-10-10 13:09:09 -05:00
Volker Lendecke
63ba8383e1 r4949: First version of a fetchfile composite function which connects to a server and
loads a file. Needs a smb url parsing wrapper.

Volker
(This used to be commit fa435bf7c8)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
9d6e923aab r4938: allow the caller to supply an existing event_context if they want to
in smb_composite_connect_send(). This makes doing parallel calls much
easier.
(This used to be commit 442308970c)
2007-10-10 13:09:07 -05:00
Andrew Tridgell
913006fa2e r4899: fixed build
(This used to be commit 852f1e73b4)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
2383787f19 r4891: - added a generic resolve_name() async interface in libcli/resolve/,
which will eventually try all resolution methods setup in smb.conf

 - only resolution backend at the moment is bcast, which does a
   parallel broadcast to all configured network interfaces, and takes
   the first reply that comes in (this nicely demonstrates how to do
   parallel requests using the async APIs)

 - converted all the existing code to use the new resolve_name() api

 - removed all the old nmb code (yay!)
(This used to be commit 239c310f25)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
bef3fbb6db r4888: use the neater calling convention
(This used to be commit d93b6a5b8e)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
a3c562b751 r4832: added simple testing of tcp sockets to LOCAL-SOCKET test
(This used to be commit c06b25c269)
2007-10-10 13:08:59 -05:00
Andrew Tridgell
8783aa8ea5 r4831: added udp support to our generic sockets library.
I decided to incorporate the udp support into the socket_ipv4.c
backend (and later in socket_ipv6.c) rather than doing a separate
backend, as so much of the code is shareable. Basically this adds a
socket_sendto() and a socket_recvfrom() call and not much all.

For udp servers, I decided to keep the call as socket_listen(), even
though dgram servers don't actually call listen(). This keeps the API
consistent.

I also added a simple local sockets testsuite in smbtorture,
LOCAL-SOCKET
(This used to be commit 9f12a45a05)
2007-10-10 13:08:59 -05:00
Andrew Tridgell
48e07444e8 r4792: use type safety int the test suite too
(This used to be commit 4a963e3b7a)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
79f32d794a r4779: demonstrate doing 50 parallel loadfile operations, with a callback for completion
(This used to be commit b8c5269482)
2007-10-10 13:08:54 -05:00
Andrew Tridgell
7cbc768376 r4777: added a smb_composite_sesssetup() async composite function. This
encapsulates all the different session setup methods, including the
multi-pass spnego code.

I have hooked this into all the places that previously used the
RAW_SESSSETUP_GENERIC method, and have removed the old
RAW_SESSSETUP_GENERIC code from clisession.c and clitree.c. A nice
side effect is that these two modules are now very simple again, back
to being "raw" session setup handling, which was what was originally
intended.

I have also used this to replace the session setup code in the
smb_composite_connect() code, and used that to build a very simple
replacement for smbcli_tree_full_connection().

As a result, smbclient, smbtorture and all our other SMB connection
code now goes via these composite async functions. That should give
them a good workout!
(This used to be commit 080d0518bc)
2007-10-10 13:08:53 -05:00
Andrew Bartlett
6eabc2a711 r4776: Add more debugs to SamSync test.
Andrew Bartlett
(This used to be commit 70860779ae)
2007-10-10 13:08:53 -05:00
Andrew Tridgell
61a3d370b9 r4758: - added async support to the session request code
- added async support to the negprot client code

- removed two unused parameters from smbcli_full_connection() code

- converted smbclient to use smbcli_full_connection() rather than
  reinventing everything itself
(This used to be commit 71cbe28734)
2007-10-10 13:08:50 -05:00
Andrew Tridgell
e89fd49df7 r4757: added the ability of the clisocket level of libcli to handle async
socket connections. This was complicated by a few factors:

 - it meant moving the event context from clitransport to clisocket,
   so lots of structures changed

 - we need to asynchronously handle connection to lists of port
   numbers, not just one port number. The code internally tries each
   port in the list in turn, without ever blocking

 - the man page on how connect() is supposed to work asynchronously
   doesn't work in practice (now why doesn't this surprise me?). The
   getsockopt() for SOL_ERROR is supposed to retrieve the error, but
   in fact the next (unrelated) connect() call on the same socket also
   gets an error, though not the right error. To work around this I
   need to tear down the whole socket between each attempted port. I
   hate posix.

Note that clisocket.c still does a blocking name resolution call in
smbcli_sock_connect_byname(). That will be fixed when we add the async
NBT resolution code.

Also note that I arranged things so that every SMB connection is now
async internally, so using plain smbclient or smbtorture tests all the
async features of this new code.
(This used to be commit 468f8ebbfd)
2007-10-10 13:08:50 -05:00
Stefan Metzmacher
592fce7fb1 r4726: - use the name tcon and tid instead of conn and cnum
- make use of talloc destructors

metze
(This used to be commit 8308da6ce4)
2007-10-10 13:08:48 -05:00
Andrew Tridgell
287515fd3d r4710: added a smb_composite_savefile() function, and expanded the test suite a little
(This used to be commit ef4dbc443d)
2007-10-10 13:08:46 -05:00
Andrew Bartlett
7ea2317e97 r4708: Comparing with LDAP, it is clear that these 'flags' are in fact the
POSIX offset for the trusted domain.

Andrew Bartlett
(This used to be commit cd9e795e40)
2007-10-10 13:08:46 -05:00
Stefan Metzmacher
9178e7b8bf r4707: w2k3 don't restict passwords on
netr_ServerPasswordSet and netr_ServerPasswordSet2

so we do now

I also add a torture test for this

metze
(This used to be commit d896ac603a)
2007-10-10 13:08:46 -05:00
Andrew Bartlett
062fe90c79 r4706: Fix the build, after I renamed these elements in the IDL.
Andrew Bartlett
(This used to be commit 8f47c7b02c)
2007-10-10 13:08:45 -05:00
Andrew Bartlett
e54964c618 r4703: Add support for EnumTrustDomain, and expand the testsuite.
Add my copyright to the SAMR server.

Andrew Bartlett
(This used to be commit 51e94fa26c)
2007-10-10 13:08:45 -05:00
Stefan Metzmacher
516dbfd5ed r4702: implment idl, torture test and server code for netr_ServerPasswordSet2()
metze
(This used to be commit 7d8ba92da2)
2007-10-10 13:08:45 -05:00
Andrew Tridgell
1d795fa57b r4700: first attempt at a composite async function, smb_composite_loadfile(),
which combineds ntcreatex, readx and close into a single call that
behaves just like a normal libcli async call.
(This used to be commit 516f68fb05)
2007-10-10 13:08:45 -05:00
Andrew Bartlett
e6be2ad8b7 r4699: Move the test_EnumTrustDom() test into the test_CreateTrustedDomain
test.  This way, it must have at least one domain to enumerate.

Andrew Bartlett
(This used to be commit c19f1850ee)
2007-10-10 13:08:44 -05:00
Andrew Bartlett
c0571f6234 r4698: - Initial implementation of trusted domains in LSA.
- Use templates for Secrets and the new trusted domains

 - Auto-add modifiedTime, createdTime and objectGUID to records in the
   samdb layer.

Andrew Bartlett
(This used to be commit 271c8faadf)
2007-10-10 13:08:44 -05:00
Andrew Bartlett
4e052c1704 r4694: 'fix' the behaviour for setting only the old, but not the new secret.
(The behaviour is a little odd, but we wanted bug-for-bug, right? :-)

Andrew Bartlett
(This used to be commit 6a09a84320)
2007-10-10 13:08:44 -05:00
Stefan Metzmacher
fae215266b r4690: - add support for async rpc server replies
the backend should check for
(dce_call->state_flags & DCESRV_CALL_STATE_FLAG_MAY_ASYNC)
then it's allowed to reply async

then the backend should mark that call as async with
dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC;

later it has to manualy set r->out.result
and then send the reply by calling

status = dcesrv_reply(p->dce_call);

NOTE: that ncacn_np doesn't support async replies yet

- implement an async version of echo_TestSleep

- reenable the echo_TestSleep torture test
  (this need to be more strict when we have support for async ncacn_np)

metze
(This used to be commit f0a0dbeb25)
2007-10-10 13:08:43 -05:00