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

372 Commits

Author SHA1 Message Date
Jelmer Vernooij
bd6bc9c5ee r3490: All tests work against NT4 now
(This used to be commit 640e3a8ce8)
2007-10-10 13:05:21 -05:00
Jelmer Vernooij
3c4cd186ea r3489: Add a couple more DCOM tests (Both OxidResolver and RemoteActivation are
completely covered now)
(This used to be commit 06048d0dac)
2007-10-10 13:05:21 -05:00
Jelmer Vernooij
c1f9a94eba r3487: RemoteActivation works! The only odd bit is that I get either a
NT_STATUS_BUFFER_TOO_SMALL or a NT_STATUS_NET_WRITE_FAULT if I try other user accounts. Must've got something to do with the auth padding...
(This used to be commit f6f3d312bf)
2007-10-10 13:05:21 -05:00
Andrew Tridgell
a1d0b97ed4 r3462: separate out the crypto includes
(This used to be commit 3f75117db9)
2007-10-10 13:05:16 -05:00
Andrew Tridgell
5011f901aa r3457: s_addr is a macro on solaris, so we can't use it in structure names. arrgh.
(This used to be commit 7842b23d01)
2007-10-10 13:05:15 -05:00
Andrew Tridgell
edbfc0f6e7 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
(This used to be commit 7b7477ac42)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
284349482f r3443: the next stage in the include files re-organisation.
I have created the include/system/ directory, which will contain the
wrappers for the system includes for logical subsystems. So far I have
created include/system/kerberos.h and include/system/network.h, which
contain all the system includes for kerberos code and networking code.
These are the included in subsystems that need kerberos or networking
respectively.

Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C
file, instead each C module includes the include/system/XXX.h file for
the logical system support it needs, and the details are kept isolated
in include/system/

This patch also creates a "struct ipv4_addr" which replaces "struct
in_addr" in our code. That avoids every C file needing to import all
the system networking headers.
(This used to be commit 2e25c71853)
2007-10-10 13:05:11 -05:00
Jelmer Vernooij
6ef03e7a84 r3432: Support WERROR's in arguments (not just as return type). Some of
the DCOM calls are wrappers around several local calls, so you get things like:

WERROR foobar ( [in] int num_ifaces,
			   [in,size_is(num_ifaces)] IID *ifaces,
			   [out,size_is(num_ifaces)] WERROR *results);
(This used to be commit 0873bf2cbe)
2007-10-10 13:05:10 -05:00
Andrew Tridgell
90067934cd r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
(This used to be commit b8f5fa8ac8)
2007-10-10 13:05:09 -05:00
Jelmer Vernooij
92d2f7a12d r3416: Typos
(This used to be commit 52d924501a)
2007-10-10 13:05:07 -05:00
Jelmer Vernooij
12649343f9 r3414: RemoteActivation torture test
(This used to be commit bcb89806fe)
2007-10-10 13:05:07 -05:00
Jelmer Vernooij
ad4c40b927 r3413: RemoteActivation updates and fixes
Add torture test for RemoteActivation
The request is now send correctly and we get back a valid response
from Windows but r->in.Interfaces is set to 0 somewhere while parsing
the response...
(This used to be commit cabec03422)
2007-10-10 13:05:07 -05:00
Jelmer Vernooij
50c5059ab0 r3397: Fix IDL for ComplexPing and SimplePing, including tests
(This used to be commit cf976a6feb)
2007-10-10 13:05:05 -05:00
Tim Potter
89665e87b4 r3396: Rename form_name -> formname. This time, check smbtorture builds before
committing.  (-:
(This used to be commit c776232d01)
2007-10-10 13:05:05 -05:00
Andrew Tridgell
173dda6bf4 r3391: fixed some memory leaks in the schannel code
(This used to be commit eb3366d366)
2007-10-10 13:05:04 -05:00
Jelmer Vernooij
7ce7137ad4 r3348: More registry fixes and additions. The following functions work right now against samba 4, at least with a ldb backend:
winreg_Open*
winreg_OpenKey
winreg_EnumKey
winreg_DeleteKey
winreg_CreateKey
(This used to be commit a71d51dd3b)
2007-10-10 13:04:58 -05:00
Jelmer Vernooij
479bf22c81 r3340: Various fixes in the registry code. Implement the EnumKey call
in the server.
(This used to be commit da65a248c2)
2007-10-10 13:04:57 -05:00
Jelmer Vernooij
66790e49a2 r3332: Check result codes in some more places...
(This used to be commit 87833cc758)
2007-10-10 13:04:56 -05:00
Andrew Tridgell
ba6d5fcb97 r3324: made the smbtorture code completely warning free
(This used to be commit 7067bb9b52)
2007-10-10 13:04:55 -05:00
Volker Lendecke
4a25682214 r3317: Fix the build
(This used to be commit 5e8fd27d6e)
2007-10-10 13:04:53 -05:00
Andrew Tridgell
9d055846f2 r3278: - rewrote the client side rpc connection code to use lib/socket/
rather than doing everything itself. This greatly simplifies the
  code, although I really don't like the socket_recv() interface (it
  always allocates memory for you, which means an extra memcpy in this
  code)

- fixed several bugs in the socket_ipv4.c code, in particular client
  side code used a non-blocking connect but didn't handle EINPROGRESS,
  so it had no chance of working. Also fixed the error codes, using
  map_nt_error_from_unix()

- cleaned up and expanded map_nt_error_from_unix()

- changed interpret_addr2() to not take a mem_ctx. It makes absolutely
  no sense to allocate a fixed size 4 byte structure like this. Dozens
  of places in the code were also using interpret_addr2() incorrectly
  (precisely because the allocation made no sense)
(This used to be commit 7f2c771b0e)
2007-10-10 13:04:49 -05:00
Volker Lendecke
5a75c3b060 r3218: Fix the build
(This used to be commit 478ba62915)
2007-10-10 13:04:42 -05:00
Jelmer Vernooij
dbdd217435 r3168: Use generic function for looking up endpoints
(This used to be commit 45a3e2a981)
2007-10-10 13:02:29 -05:00
Jelmer Vernooij
06b3879c8f r3167: Add a member 'endpoint' to the dcerpc_binding struct to use instead of
options[0].
(This used to be commit 18582083af)
2007-10-10 13:02:28 -05:00
Jelmer Vernooij
40c5a1d99f r3162: Add client-side support for the ncalrpc: and ncacn_unix_stream: transports.
ncalrpc uses the new config option "ncalrpc dir" for creating unix sockets.
(This used to be commit b15cfbe251)
2007-10-10 13:02:27 -05:00
Jelmer Vernooij
8debe5a6b8 r3136: - Allow specifying socket type when adding smbd service
- Make sure a epm_tower struct is completely initialized
- Some more minor fixes
(This used to be commit d560dcbdb8)
2007-10-10 13:02:25 -05:00
Jelmer Vernooij
0d35bae3c4 r3112: Fix two more instances of epm_towers (sorry, metze!)
(This used to be commit 7baf493966)
2007-10-10 13:02:22 -05:00
Jelmer Vernooij
aa1c83bdbb r3111: Add a few more protocol identifiers, rhs for ncalrpc
(This used to be commit 53567a83cb)
2007-10-10 13:02:22 -05:00
Andrew Bartlett
542c839dbb r3104: My Win2k3 server, with current updates, still sends the LM key for level 6.
I'm not quite sure what's going on here, but adjust expected values
till I can find out how to reproduce this the other way...

Andrew Bartlett
(This used to be commit 3f0f6b38f2)
2007-10-10 13:02:21 -05:00
Andrew Bartlett
1ee3a7419e r3074: Add in a new 'field present' flag samr.idl for the Account Flags
field.  Add torture test for setting this feild - including all the
odd cases (not all the flags 'stick', and not others cannot be
removed).

Seperate the two 'password change' flags, and test them both in the
torture code.

Check that the password did change after every password set call.

Andrew Bartlett
(This used to be commit 3759128bd3)
2007-10-10 13:01:56 -05:00
Stefan Metzmacher
1890e6a659 r2992: drsuapi uses WERROR not NTSTATUS
metze
(This used to be commit 757f67c08b)
2007-10-10 12:59:55 -05:00
Stefan Metzmacher
f4e4989cb7 r2991: add drsuapi_DsGetDomainControllerInfo() idl and torture test
metze
(This used to be commit 98ca7640c5)
2007-10-10 12:59:55 -05:00
Stefan Metzmacher
20ed511c1b r2971: fix DsBind idl
metze
(This used to be commit 9e50b3214b)
2007-10-10 12:59:53 -05:00
Stefan Metzmacher
64344b88d1 r2970: - give somefields names and typdef enums for the possible values
- do more crackname tests in the torture test

- move server code for cracknames to a different file

metze
(This used to be commit 18050ea603)
2007-10-10 12:59:53 -05:00
Andrew Tridgell
f345c4281a r2969: inet_ntoa() takes an address in network byte order, so now that we
parse the RHS as IDL, we need to use htonl() to convert back to
network byte order before we can display the IP
(This used to be commit 45508b85da)
2007-10-10 12:59:53 -05:00
Stefan Metzmacher
78e29c0491 r2952: add idl and torture test for DsCrackNames
(I need to find out what the fields mean but it works)

metze
(This used to be commit eff51fc623)
2007-10-10 12:59:51 -05:00
Jelmer Vernooij
ae0aa86039 r2938: Use IDL to dissect the RHS of floors in protocol towers
(This used to be commit 273d0049b5)
2007-10-10 12:59:50 -05:00
Jelmer Vernooij
e2d27b9d23 r2921: Add a few more protocols and fix the numbers associated with some of
the current ones. It took me three hours to realise that the DCOM standard
contains false protocol numbers (apparently someone converted the protocol
numbers to hex twice, i.e. 13 -> 0c and 14 to 0d). There are no longer
duplicates in the list with protocol numbers now.
(This used to be commit f355cd4264)
2007-10-10 12:59:48 -05:00
Andrew Tridgell
d186e63b01 r2910: I noticed that the samr torture test was doing its own DOS->UNIX
string conversion. For RPC, all string conversions are supposed to be
done by the NDR layer, using string flags set in the IDL. The reason
this wasn't working is that I had been too lazy to do the STR_ASCII
string types properly at the NDR layer when initially writing
ndr_basic.c.

This commit fixes the ndr_basic code properly to do all ASCII
varients, by re-using the non-ascii code and a "byte_mul" local
variable. I have also removed the manual string conversion in the SAMR
torture test code.
(This used to be commit aad0e7e9d8)
2007-10-10 12:59:47 -05:00
Jelmer Vernooij
235a847e68 r2896: Add torture test for EnumValue()
(This used to be commit e9a7f729b3)
2007-10-10 12:59:45 -05:00
Stefan Metzmacher
594082233f r2888: - add 'Ds' prefix to Bind and Unbind call on drsuapi
- rename handle -> bind_handle

- change function types to NTSTATUS

metze
(This used to be commit de73676342)
2007-10-10 12:59:42 -05:00
Andrew Tridgell
7d32679e96 r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots of associated functions.
The motivation for this change was to avoid having to convert to/from
ucs2 strings for so many operations. Doing that was slow, used many
static buffers, and was also incorrect as it didn't cope properly with
unicode codepoints above 65536 (which could not be represented
correctly as smb_ucs2_t chars)

The two core functions that allowed this change are next_codepoint()
and push_codepoint(). These functions allow you to correctly walk a
arbitrary multi-byte string a character at a time without converting
the whole string to ucs2.

While doing this cleanup I also fixed several ucs2 string handling
bugs. See the commit for details.

The following code (which counts the number of occuraces of 'c' in a
string) shows how to use the new interface:

size_t count_chars(const char *s, char c)
{
	size_t count = 0;

	while (*s) {
		size_t size;
		codepoint_t c2 = next_codepoint(s, &size);
		if (c2 == c) count++;
		s += size;
	}

	return count;
}
(This used to be commit 814881f0e5)
2007-10-10 12:59:39 -05:00
Andrew Tridgell
03341ec5bb r2854: added a RPC-COUNTCALLS torture test - a useful varient on the full scanner in RPC-SCANNER
(This used to be commit 04eaae59cd)
2007-10-10 12:59:39 -05:00
Andrew Tridgell
ed6a5a1e0e r2833: - added a call to SamrQueryGroupMember for every group, and fix the
IDL so this works (the previous IDL was bogus)

- changed a hyper to uint64 after looking at output on cascade on sparc
(This used to be commit db1ed5675a)
2007-10-10 12:59:37 -05:00
Andrew Tridgell
b2f1a29e43 r2710: continue with the new style of providing a parent context whenever
possible to a structure creation routine. This makes for much easier
global cleanup.
(This used to be commit e14ee428ec)
2007-10-10 12:59:25 -05:00
Jelmer Vernooij
322d1ccd9f r2699: Correct handle ServerAlive() and ServerAlive2() + add torture tests
(This used to be commit 9e74144aa8)
2007-10-10 12:59:24 -05:00
Andrew Tridgell
aa12305945 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit
(This used to be commit c82a9cf750)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
399aade69c r2676: add a test of the reference counting logic in the SAMR server into the
RPC-SAMR torture test. This closes the samr connection before working
on a open domain handle. The server is supposed to know that the open
domain handle still holds a reference to the connection, so the
connection remains valid even though it has been closed.
(This used to be commit f31e5d56e3)
2007-10-10 12:59:20 -05:00
Andrew Bartlett
9a9dcc7250 r2552: Character set conversion and string handling updates.
The intial motivation for this commit was to merge in some of the
bugfixes present in Samba3's chrcnv and string handling code into
Samba4.  However, along the way I found a lot of unused functions, and
decided to do a bit more...

The strlen_m code now does not use a fixed buffer, but more work is
needed to finish off other functions in str_util.c.  These fixed
length buffers hav caused very nasty, hard to chase down bugs at some
sites.

The strupper_m() function has a strupper_talloc() to replace it (we
need to go around and fix more uses, but it's a start).  Use of these
new functions will avoid bugs where the upper or lowercase version of
a string is a different length.

I have removed the push_*_allocate functions, which are replaced by
calls to push_*_talloc.  Likewise, pstring and other 'fixed length'
wrappers are removed, where possible.

I have removed the first ('base pointer') argument, used by push_ucs2,
as the Samba4 way of doing things ensures that this is always on an
even boundary anyway.  (It was used in only one place, in any case).
(This used to be commit dfecb01506)
2007-10-10 12:59:05 -05:00
Andrew Bartlett
ccdf4e045f r2547: Another place to use convert_string_talloc().
Andrew Bartlett
(This used to be commit 4904d814c0)
2007-10-10 12:59:05 -05:00