1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

295 Commits

Author SHA1 Message Date
Jelmer Vernooij
9fca748fe3 r3896: Correct header files in rpc server templates plus
some other minor fixes
2007-10-10 13:06:02 -05:00
Jelmer Vernooij
4840eaeed3 r3891: Add rot (Running Object Table) interface 2007-10-10 13:06:02 -05:00
Andrew Bartlett
39ae5e1dac r3885: Add security descriptor comparison to our RPC-SAMSYNC test. We now
verify that the security descriptor found in the SamSync is the same
as what is available over SAMR.

Unfortunately, the administrator seems unable to retrieve the SACL on
the security descriptor, so I've added a new function to compare with
a mask.

Andrew Bartlett
2007-10-10 13:06:01 -05:00
Jelmer Vernooij
16d905f6b0 r3881: Split up the LIBNDR_GEN subsystem into NDR_* and RPC_NDR_* subsystems.
This reduces the total size of the samba binaries from 119 Mb to 73 Mb.
Next step will be to have the build system obtain some of this information
by itself, so that we don't have to write ~10 lines per interface manually.
2007-10-10 13:06:01 -05:00
Andrew Tridgell
fdaa753578 r3837: added support for LsaLookupSids in the LSA rpc server. This allows the GUI ACL editor on w2k to
correctly display names instead of SIDs.
2007-10-10 13:05:58 -05:00
Stefan Metzmacher
b620bdd672 r3810: create a LIB_SECURITY subsystem
- move dom_sid, security_descriptor, security_* funtions to one place
  and rename some of them

metze
2007-10-10 13:05:56 -05:00
Stefan Metzmacher
2414044746 r3809: fix compiler warning
metze
2007-10-10 13:05:56 -05:00
Andrew Bartlett
90398fda41 r3807: Cross-check the basic attributes for groups and aliases in RPC-SAMSYNC.
Andrew Bartlett
2007-10-10 13:05:56 -05:00
Andrew Bartlett
3f52fa3a42 r3804: Add more comparison tests in RPC-SAMSYNC.
This compares values for the domain and for secrets.  We still have
some problems we need to sort out for secrets.

Also rename a number of structures in samr.idl and netlogon.idl, to
better express their consistancy.

Andrew Bartlett
2007-10-10 13:05:55 -05:00
Jelmer Vernooij
3c436590ae r3790: use a registration function that is called from dcerpc_*_init functions
rather then a large table in librpc/gen_ndr/tables.c. This will allow us
to only link in only the required gen_ndr files (speeds up linking quite a
bit, makes binaries smaller).

Each gen_ndr_* file now has a init function that calls the init functions
of the interfaces it contains. I did it this way to keep pidl's code simple,
though it might hurt startup time a bit. I'd be happy to change it if
people like one function better.
2007-10-10 13:05:53 -05:00
Stefan Metzmacher
7bb3e3751b r3789: - fix error handling
- formating changes

metze
2007-10-10 13:05:53 -05:00
Stefan Metzmacher
4839ea156f r3788: give new accounts and groups a objectGUID
metze
2007-10-10 13:05:53 -05:00
Stefan Metzmacher
a2776eca83 r3784: do a samdb lookup for the DsCrackNames server
metze
2007-10-10 13:05:53 -05:00
Stefan Metzmacher
f5ee40d6ce r3783: - don't use make proto for ldb anymore
- split ldh.h out of samba's includes.h

- make ldb_context and ldb_module private to the subsystem

- use ltdb_ prefix for all ldb_tdb functions

metze
2007-10-10 13:05:52 -05:00
Jelmer Vernooij
0d7bb2c40b r3737: - Get rid of the register_subsystem() and register_backend() functions.
- Re-disable tdbtool (it was building fine on my Debian box but other
					machines were having problems)
2007-10-10 13:05:48 -05:00
Jelmer Vernooij
64826da834 r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
2007-10-10 13:05:47 -05:00
Andrew Bartlett
9cd666bcfb r3724: Rename a number of structures, for better consistance between SAMR and
NETLOGON.

In particular, rename samr_Name to samr_String - given that many
strings in this pipe are not 'names', the previous was just confusing.
(I look forward to PIDL turning these into simple char * some day...).

Also export out a few changes from testjoin.c to allow for how I have
written the new RPC-SAMSYNC test.

Andrew Bartlett
2007-10-10 13:05:47 -05:00
Jelmer Vernooij
7466947a23 r3689: Large number of COM updates:
- Work on server side and local COM support (should work, just no
	  example classes yet)
 - Use vtables so that local and remote calls can be used transparently
 - Generate 'proxies and stubs' rather then heavily modified code in client.pm and server.pm. proxies (client side code) are generated in proxy.pm, stubs (server side dispatchers) are generated in stubs.pm
 - Support registering classes and interfaces
 - DCOM interfaces no longer have to be in the same IDL file as their
    base interface, which will allow us to split up dcom.idl
2007-10-10 13:05:44 -05:00
Andrew Bartlett
6e6cc6fb98 r3686: The results of some work on the NETLOGON pipe:
Break out the samsync tests from RPC-NETLOGON into a new RPC-SAMSYNC,
that will cross-verify all the values.

Add support for the way netlogon credentials are shared between the
pipe that sets up schannel and the pipe that is encrypted with it.

Test this support, by calling both NETLOGON and SAMR operations in the
RPC-SCHANNEL test.

Move some of the Netlogon NEG flags into the .idl, now we have an idea
what a few of them really are.

Rename the sam_pwd_hash into a name that has meaning (all other crypto
functions were renamed in Samba4 ages ago).

Break out NTLMv2 functionality for operation on the NT hash - I intend
to do NTLMv2 logins in the samsync test in future, and naturally I
only have the hash.

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Jelmer Vernooij
7484b9be74 r3667: Small COM fixes 2007-10-10 13:05:43 -05:00
Jelmer Vernooij
e995a1c0e5 r3630: More work on DCOM server side 2007-10-10 13:05:40 -05:00
Jelmer Vernooij
e7b67ff22f r3629: A bit of work on the DCOM server architecture, small fixes 2007-10-10 13:05:40 -05:00
Andrew Tridgell
151dd4593d r3599: fixed a couple of memory errors in the rpc netlogon server
(found with valgrind)
2007-10-10 13:05:37 -05:00
Jelmer Vernooij
7a8244761b r3586: Fix some of the issues with the module init functions.
Both subsystems and modules can now have init functions, which can be
specified in .mk files (INIT_FUNCTION = ...)

The build system will define :
 - SUBSYSTEM_init_static_modules that calls the init functions of all statically compiled modules. Failing to load will generate an error which is not fatal
 - BINARY_init_subsystems that calls the init functions (if defined) for the subsystems the binary depends on

This removes the hack with the "static bool Initialised = " and the
"lazy_init" functions
2007-10-10 13:05:36 -05:00
Jelmer Vernooij
c052f2e1ed r3513: Add (the infrastructure for) DCOM support. Contents:
- Support for sending over the object UUID in DCERPC calls
 - Simple torture test for the DCOM "Simple" object
 - Generate extra argument for "object" interfaces in pidl
 - Some stubs for common DCOM functions
2007-10-10 13:05:23 -05:00
Stefan Metzmacher
8e3f87b9e0 r3509: - comment out a unused var
- fix a scalar vs pointer bug

metze
2007-10-10 13:05:23 -05:00
Andrew Tridgell
0d51511d40 r3507: - added deferred replies on sharing violation in pvfs open. The
deferred reply is short-circuited immediately when the file is
  closed by another user, allowing it to be opened by the waiting user.

- added a sane set of timeval manipulation routines

- converted all the events code and code that uses it to use struct
  timeval instead of time_t, which allows for microsecond resolution
  instead of 1 second resolution. This was needed for doing the pvfs
  deferred open code, and is why the patch is so big.
2007-10-10 13:05:23 -05:00
Andrew Tridgell
7dd3a5a6da r3497: removed some include cruft, and split out librpc/gen_ndr/tables.h 2007-10-10 13:05:22 -05:00
Jelmer Vernooij
0987a5fdd6 r3486: Add RemoteActivation server 2007-10-10 13:05:21 -05:00
Andrew Tridgell
c6f4865744 r3481: split out client.h and events.h 2007-10-10 13:05:20 -05:00
Andrew Tridgell
729e0026e4 r3468: split out dcerpc_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
70d2090f6b r3464: split out registry.h, rap.h and ldap_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
b97e395c81 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) 2007-10-10 13:05:17 -05:00
Andrew Tridgell
3f75117db9 r3462: separate out the crypto includes 2007-10-10 13:05:16 -05:00
Andrew Tridgell
7b7477ac42 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
2007-10-10 13:05:13 -05:00
Andrew Tridgell
264ce91810 r3447: more include/system/XXX.h include files 2007-10-10 13:05:12 -05:00
Andrew Tridgell
2e25c71853 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.
2007-10-10 13:05:11 -05:00
Andrew Tridgell
b8f5fa8ac8 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.
2007-10-10 13:05:09 -05:00
Andrew Tridgell
3f902f8d85 r3425: got rid of a bunch of cruft from rewrite.h 2007-10-10 13:05:08 -05:00
Jelmer Vernooij
df952e95cd r3369: More registry updates
We now pass the RPC-WINREG torture test.
Also, constructions like the following work now:

regtree <-> smbd <-> NTUSER.DAT
2007-10-10 13:05:02 -05:00
Jelmer Vernooij
c526273df2 r3367: More registry updates.
Add support flush_key and close_hive.
2007-10-10 13:05:02 -05:00
Andrew Bartlett
effd10883b r3364: Add parameter to fix the compile.
Andrew Bartlett
2007-10-10 13:05:01 -05:00
Andrew Tridgell
7e942e7f1b r3360: improved the deletion of tmp files. smbd now puts all tmp files in var/locks/smbd.tmp/
and deletes that dir on startup.
2007-10-10 13:05:01 -05:00
Jelmer Vernooij
a71d51dd3b 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
2007-10-10 13:04:58 -05:00
Jelmer Vernooij
da65a248c2 r3340: Various fixes in the registry code. Implement the EnumKey call
in the server.
2007-10-10 13:04:57 -05:00
Jelmer Vernooij
42844a4e34 r3338: More work on the winreg RPC server. Opening hives is now supported, most other calls
return WERR_NOT_SUPPORTED for now.

Hive backends can be set like this:

registry:HKEY_LOCAL_MACHINE = ldb:tdb://registry.tdb
registry:HKEY_CURRENT_USER = gconf
registry:HKEY_USERS = dir:/tmp/registry
registry:HKEY_CLASSES_ROOT = nt4:/path/to/NTUSER.DAT
registry:HKEY_PERFORMANCE_DATA = w95:/path/to/USER.DAT
2007-10-10 13:04:57 -05:00
Andrew Tridgell
5921587ec2 r3323: more warning reductions 2007-10-10 13:04:55 -05:00
Andrew Tridgell
6cdf485fb2 r3320: fixed bugs in the rpc_server code in handling partial packet receives and sends
it now passes the non-blocking test suite
2007-10-10 13:04:54 -05:00
Andrew Tridgell
a16e4756cd r3304: changed the API to lib/socket/ a little.
The main change is to make socket_recv() take a pre-allocated buffer,
rather than allocating one itself. This allows non-blocking users of
this API to avoid a memcpy(). As a result our messaging code is now
about 10% faster, and the ncacn_ip_tcp and ncalrpc code is also
faster.

The second change was to remove the unused mem_ctx argument from
socket_send(). Having it there implied that memory could be allocated,
which meant the caller had to worry about freeing that memory (if for
example it is sending in a tight loop using the same memory
context). Removing that unused argument keeps life simpler for users.
2007-10-10 13:04:52 -05:00
Andrew Tridgell
7f2c771b0e 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)
2007-10-10 13:04:49 -05:00