1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00
Commit Graph

237 Commits

Author SHA1 Message Date
Jelmer Vernooij
d560dcbdb8 r3136: - Allow specifying socket type when adding smbd service
- Make sure a epm_tower struct is completely initialized
- Some more minor fixes
2007-10-10 13:02:25 -05:00
Jelmer Vernooij
2046e14cf8 r3118: Eliminate struct dcesrv_ep_description and replace it with
struct dcerpc_binding.
2007-10-10 13:02:23 -05:00
Jelmer Vernooij
ab110192e6 r3114: - More work on merging the various structs that describe endpoints
- Add protocol sequence to dcerpc transports (will be used later on)
- Add more transports to the list
2007-10-10 13:02:23 -05:00
Jelmer Vernooij
7baf493966 r3112: Fix two more instances of epm_towers (sorry, metze!) 2007-10-10 13:02:22 -05:00
Jelmer Vernooij
53567a83cb r3111: Add a few more protocol identifiers, rhs for ncalrpc 2007-10-10 13:02:22 -05:00
Andrew Bartlett
5f2295a5fb r3080: Make the Samba4 SAMR server pass the new, nasty torture test (now that
SAMR_FIELD_PASSWORD has been split up).

Andrew Bartlett
2007-10-10 13:01:57 -05:00
Andrew Bartlett
51774a9bca r3077: Add initial handling of Account Flags in SAMR user info level 21 and 25.
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
4091fee8e8 r3076: Fix memory leak.
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Jelmer Vernooij
f3da7c8b44 r3043: Use binding strings for specifying endpoints. The property for
specifying a endpoint is now also 'endpoint' instead of 'endpoints'. The
default endpoint (if none is specified) is still "ncacn_np:[\\pipe\\ifacename]",
where ifacename is the name of the interface.

Examples:

[
  uuid(60a15ec5-4de8-11d7-a637-005056a20182),
  endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:")
]
interface rpcecho
{
	void dummy();
}

dcerpc_binding is now converted to ep_description in the server, but I hope to
completely eliminate ep_description later on.

The eventual goal of all these changes is to make it easier to add
 transports as I'm going to add support for
 ncalrpc (local RPC over named pipes) and ncacn_unix_stream (Unix sockets).
2007-10-10 13:01:53 -05:00
Andrew Tridgell
04e1171996 r3005: added talloc wrappers around tdb_open() and ldb_connect(), so that the
caller doesn't have to worry about the constraint of only opening a
database a single time in a process. These wrappers will ensure that
only a single open is done, and will auto-close when the last instance
is gone.

When you are finished with a database pointer, use talloc_free() to
close it.

note that this code does not take account of the threads process
model, and does not yet take account of symlinks or hard links to tdb
files.
2007-10-10 12:59:56 -05:00
Stefan Metzmacher
757f67c08b r2992: drsuapi uses WERROR not NTSTATUS
metze
2007-10-10 12:59:55 -05:00
Stefan Metzmacher
98ca7640c5 r2991: add drsuapi_DsGetDomainControllerInfo() idl and torture test
metze
2007-10-10 12:59:55 -05:00
Stefan Metzmacher
1bb71e7a86 r2974: fix the build
metze
2007-10-10 12:59:53 -05:00
Stefan Metzmacher
18050ea603 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
2007-10-10 12:59:53 -05:00
Stefan Metzmacher
e2df8c4285 r2954: add server cracknames code:
- we currently only do it for our REALM

metze
2007-10-10 12:59:51 -05:00
Stefan Metzmacher
a2cc951720 r2953: add NTSTATUS_TALLOC_CHECK(x)
metze
2007-10-10 12:59:51 -05:00
Stefan Metzmacher
eff51fc623 r2952: add idl and torture test for DsCrackNames
(I need to find out what the fields mean but it works)

metze
2007-10-10 12:59:51 -05:00
Jelmer Vernooij
273d0049b5 r2938: Use IDL to dissect the RHS of floors in protocol towers 2007-10-10 12:59:50 -05:00
Jelmer Vernooij
f355cd4264 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.
2007-10-10 12:59:48 -05:00
Stefan Metzmacher
536af87ef1 r2889: add DRSUAPI server
- with DsBind and DsUnbind implmented :-)
  the RPC-DRSUAPI test works

metze
2007-10-10 12:59:42 -05:00
Stefan Metzmacher
5143a9bd8a r2887: fix comment
metze
2007-10-10 12:59:42 -05:00
Andrew Tridgell
1246f80d80 r2792: got rid of talloc_ldb_alloc() and instead created talloc_realloc_fn(),
so talloc now doesn't contain any ldb specific functions.

allow NULL to be passed to a couple more talloc() functions
2007-10-10 12:59:34 -05:00
Andrew Tridgell
feb63e74f9 r2734: the samdb_destructor can be static 2007-10-10 12:59:27 -05:00
Andrew Tridgell
e14ee428ec 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.
2007-10-10 12:59:25 -05:00
Jelmer Vernooij
b54d14a01a r2696: DCOM updates:
- Start working on OXIDResolver interface
 - Add torture test for SimplePing()
2007-10-10 12:59:24 -05:00
Andrew Tridgell
c82a9cf750 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit 2007-10-10 12:59:21 -05:00
Andrew Tridgell
dc53150861 r2675: added a convenience function
void *talloc_reference(const void *context, const void *ptr);

this function makes a secondary reference to ptr, and hangs it off the
given context. This greatly simplifies some of the current reference
counting code in the samr server and I suspect it will be widely used
in other places too.

the way you use it is like this:

	domain_state->connect_state = talloc_reference(domain_state, connect_state);

that makes the element connect_state of domain_state a secondary
reference to connect_state. The connect_state structure will then only
be freed when both domain_state and the original connect_state go
away, allowing you to free them independently and in any order.

you could do this alrady using a talloc destructor, and that is what
the samr server did previously, but that meant this construct was
being reinvented in several places. So this convenience function sets
up the destructor for you, giving a much more convenient and less
error prone API.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
c51ca7c0e7 r2673: in the rpc server, free up the old call when we decide to extend an
existing call rather than creating a new one. This prevents call
structures hanging around on the rpc connection context until it is
closed
2007-10-10 12:59:20 -05:00
Andrew Tridgell
8dc23821c9 r2671: we're getting too many errors caused by the talloc_realloc() API not
taking a context (so when you pass a NULL pointer you end up with
memory in a top level context). Fixed it by changing the API to take a
context. The context is only used if the pointer you are reallocing is
NULL.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
d78eea9eb8 r2670: use a destructor to auto-close the samr ldb when the last user
disconnects. Previously the ldb was always kept open.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
278cef77f0 r2669: convert make_user_info() and associated functions from malloc to talloc 2007-10-10 12:59:19 -05:00
Andrew Tridgell
2662be3a2b r2663: fix an epmapper server leak - another talloc_realloc(NULL, ) leak 2007-10-10 12:59:19 -05:00
Andrew Tridgell
c315d6ac1c r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()
rather than manual reference counts

- properly support SMBexit in the cifs and posix backends

- added a logoff method to all backends

With these changes the RAW-CONTEXT test now passes against the posix backend
2007-10-10 12:59:18 -05:00
Andrew Tridgell
230e1cd777 r2648: - use a destructor on struct server_connection to simplify the
connection termination cleanup, and to ensure that the event
  contexts are properly removed for every process model

- gave auth_context the new talloc treatment, which removes another
  source of memory leaks.
2007-10-10 12:59:16 -05:00
Andrew Tridgell
2dc334a328 r2646: - use a talloc destructor to ensure that sockets from the new socket
library are closed on abnormal termination

- convert the service.h structures to the new talloc methods
2007-10-10 12:59:16 -05:00
Andrew Tridgell
1ee5ed4197 r2635: mem_ctx cleanups on the lsa and netlogon pipes in the rpc server 2007-10-10 12:59:15 -05:00
Andrew Tridgell
f12ee2f241 r2629: convert gensec to the new talloc model
by making our gensec structures a talloc child of the open connection
we can be sure that it will be destroyed when the connection is
dropped.
2007-10-10 12:59:14 -05:00
Andrew Tridgell
26da45a801 r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation 2007-10-10 12:59:14 -05:00
Andrew Tridgell
76d0b8206c r2627: use the new talloc capabilities in a bunch more places in the rpc
server code. This fixes a number of memory leaks I found when testing
with valgrind and smbtorture, as the cascading effect of a
talloc_free() ensures that anything derived from the top level object
is destroyed on disconnect.
2007-10-10 12:59:13 -05:00
Andrew Tridgell
fee98137ad r2615: fixed a bug in the server side support for CONNECT level security 2007-10-10 12:59:12 -05:00
Andrew Tridgell
f4660857bc r2614: support CONNECT level DCE/RPC security in both client and
server. CONNECT security uses NTLMSSP, but does not do any signing or
sealing (or equivalently, its like signing, but with a zero filled
checksum).
2007-10-10 12:59:12 -05:00
Andrew Tridgell
efb2b88edd r2592: this fixes one of the security memory leaks in the server 2007-10-10 12:59:10 -05:00
Andrew Bartlett
f3bf57ca6b r2537: Add static and use strlen_m instead of str_charnum().
Andrew Bartlett
2007-10-10 12:59:04 -05:00
Jelmer Vernooij
00de28876d r2519: Registry RPC pipe fixes (use struct registry_key instead of REG_KEY, etc) 2007-10-10 12:59:01 -05:00
Andrew Bartlett
131420b45e r2515: Fixes from smbtorture - these session keys are not individually encrypted.
Andrew Bartlett
2007-10-10 12:59:01 -05:00
Tim Potter
32f0f3154a r2458: Rename policy handle parameters for the SAMR pipe. Parameters now
have the handle type implied by the parameter name.  There are four
types of handle: connect, domain, user and group handles.  The
various samr_Connect functions return a connect handle, and the
samr_OpenFoo functions return a foo handle.

There is one exception - the samr_{Get,Set}Security function can
take any type of handle.

Fix up all C callers.
2007-10-10 12:58:55 -05:00
Stefan Metzmacher
2fd577d241 r2447: let the server code use the new lib/socket/ stuff
metze
2007-10-10 12:58:54 -05:00
Andrew Tridgell
1b4cee825e r2435: got rid of another pointless strnequal() 2007-10-10 12:58:52 -05:00
Stefan Metzmacher
1854907da8 r2326: remove definition and usage of struct socket_context
metze
2007-10-10 12:58:44 -05:00
Andrew Tridgell
daaee86d14 r2301: add a server side warning when we receive more RPC data than we
expect. It isn't an error as w2k3 does this on its first packet when
NTLM2 signing is used.
2007-10-10 12:58:41 -05:00