Andrew Tridgell [Sat, 2 Oct 2004 05:09:16 +0000 (05:09 +0000)]
r2776: if there are no wildcard characters then use StrCaseCmp()
note that this is not just an optimisation, it fixes a rare edge case
when LANMAN1 is negotiated
Andrew Tridgell [Sat, 2 Oct 2004 01:43:43 +0000 (01:43 +0000)]
r2775: rewrote our ms_fnmatch code to be much more efficient, and to exactly
match w2k behaviour for older negotiated protocols.
Andrew Tridgell [Sat, 2 Oct 2004 01:42:41 +0000 (01:42 +0000)]
r2774: get rid of the lanman specific code in masktest, and add a -l option
Andrew Tridgell [Sat, 2 Oct 2004 01:42:06 +0000 (01:42 +0000)]
r2773: allow zero sized array talloc
Tim Potter [Fri, 1 Oct 2004 07:38:09 +0000 (07:38 +0000)]
r2767: Get rid of some unnecessary %s formatting.
Tim Potter [Fri, 1 Oct 2004 07:37:37 +0000 (07:37 +0000)]
r2766: Test OpenKey, QueryInfoKey, EnumKey, CloseKey functions.
The IDL for EnumValue is wrong - can't figure it out right now.
Tim Potter [Fri, 1 Oct 2004 07:36:47 +0000 (07:36 +0000)]
r2765: Allow functions containing WERROR values to be compiled.
Add winreg.i to list of extensions.
Tim Potter [Fri, 1 Oct 2004 05:28:20 +0000 (05:28 +0000)]
r2764: Use hand-written function for all occurrences of IDL strings, not just
those with a single pointer.
Andrew Tridgell [Fri, 1 Oct 2004 05:19:51 +0000 (05:19 +0000)]
r2763: use no-auth bind on ncacn_np unless we specify at least one of "sign", "seal" or "connect"
Simo Sorce [Thu, 30 Sep 2004 16:08:09 +0000 (16:08 +0000)]
r2758: keep docos handy while developing it
Stefan Metzmacher [Thu, 30 Sep 2004 13:29:27 +0000 (13:29 +0000)]
r2757: some minor fixes
metze
Simo Sorce [Wed, 29 Sep 2004 17:37:59 +0000 (17:37 +0000)]
r2754: Change sldb_trim_dn() to be sldb_fix_dn() as we are not really trimming.
Make it handle all cases:
- remove spaces before and after ','
- remove spaces after '='
TODO: check if there are escape chars in the RFC, they are not handled here yet.
Simo.
Stefan Metzmacher [Wed, 29 Sep 2004 13:17:09 +0000 (13:17 +0000)]
r2751: this is a new ntvfs design which tries to solve:
- the stacking of modules
- finding the modules private data
- hide the ntvfs details from the calling layer
- I set NTVFS_INTERFACE_VERSION 0 till we are closer to release
(because we need to solve some async problems with the module stacking)
metze
Stefan Metzmacher [Wed, 29 Sep 2004 13:06:26 +0000 (13:06 +0000)]
r2750: decode AbandonRequest correct (untested:-)
metze
Stefan Metzmacher [Wed, 29 Sep 2004 12:40:30 +0000 (12:40 +0000)]
r2749: add asn1_read_implicit_Integer()
metze
Stefan Metzmacher [Wed, 29 Sep 2004 12:20:59 +0000 (12:20 +0000)]
r2748: implement sldb_Compare()
Simo: this commit should not conflict much with your changes:-)
metze
Stefan Metzmacher [Wed, 29 Sep 2004 12:18:06 +0000 (12:18 +0000)]
r2747: use DATA_BLOB for attribute values
en/decode CompareRequest/Response correct
metze
Andrew Tridgell [Wed, 29 Sep 2004 06:35:34 +0000 (06:35 +0000)]
r2745: added some example talloc reports
Andrew Tridgell [Wed, 29 Sep 2004 06:31:14 +0000 (06:31 +0000)]
r2744: ben elliston taught me about gcov today, which allows you to measure
the % coverage in terms of lines of code of a test suite. I thought a
good first place to start with gcov was the talloc test suite. When I
started the test suite covered about 60% of all lines of code in
talloc.c, and now it covers about 99%. The only lines not covered are
talloc corruption errors, as that would cause smb_panic() to fire.
It will be interesting to try gcov on the main Samba test suite for
smbd. We won't achieve 100% coverage, but it would be nice to get to
90% or more.
I also modified the talloc.c sources to be able to be build standalone, using:
gcc -c -D_STANDALONE_ -Iinlcude lib/talloc.c
that should make it much easier to re-use talloc in other projects
Andrew Tridgell [Tue, 28 Sep 2004 23:31:52 +0000 (23:31 +0000)]
r2743: fixed some errors in the description of talloc_reference(). Volker
told me he found the description confusing, and given that some of it
was not correct I am not surprised!
added some more docs on the reporting calls
Andrew Tridgell [Tue, 28 Sep 2004 23:30:14 +0000 (23:30 +0000)]
r2742: - fixed a bug in talloc_unreference()
- made the LOCAL-TALLOC smbtorture test much stricter, checking that
block counts for every pointer are correct after every operation
Jelmer Vernooij [Tue, 28 Sep 2004 22:58:56 +0000 (22:58 +0000)]
r2741: Definition for ISystemActivator...
Jelmer Vernooij [Tue, 28 Sep 2004 22:04:35 +0000 (22:04 +0000)]
r2740: Finish the RemoteActivation interface. Torture tests will follow
after pidl has been fixed (to be able to use input variables
inside size_is() for output variables)
Tim Potter [Tue, 28 Sep 2004 21:44:05 +0000 (21:44 +0000)]
r2739: Start of torture test for winreg wrappers.
Andrew Tridgell [Tue, 28 Sep 2004 21:42:49 +0000 (21:42 +0000)]
r2738: free up the session information as soon as it is invalidated in the
RAW-CONTEXT test case
Andrew Tridgell [Tue, 28 Sep 2004 21:41:33 +0000 (21:41 +0000)]
r2737: fixed up a corner case where talloc_unreference() and talloc_free()
might not place the pointer in the context specified in the docs. The
code was assuming that pointer was at the head of the child list,
which it may not be, depending on what other operations have happened
in between.
Jelmer Vernooij [Tue, 28 Sep 2004 19:20:00 +0000 (19:20 +0000)]
r2735: More DCOM updates:
- Several updates to the interface definitions after reading some more of the
specs
- Add Remote Activation interface
- Add body extension uuids
- Add oxidresolve torture test to list
- Make pidl complain about object interfaces that don't inherit from IUnknown
Andrew Tridgell [Tue, 28 Sep 2004 14:38:13 +0000 (14:38 +0000)]
r2734: the samdb_destructor can be static
Andrew Tridgell [Tue, 28 Sep 2004 14:37:28 +0000 (14:37 +0000)]
r2733: added a note on performance
Stefan Metzmacher [Tue, 28 Sep 2004 13:50:15 +0000 (13:50 +0000)]
r2731: use debug level 10 everywhere
metze
Tim Potter [Tue, 28 Sep 2004 12:49:05 +0000 (12:49 +0000)]
r2728: Break arg parsing stuff out of samr.py into a standalone program.
Stefan Metzmacher [Tue, 28 Sep 2004 12:42:03 +0000 (12:42 +0000)]
r2727: mark the password fields as hidden
metze
Andrew Tridgell [Tue, 28 Sep 2004 12:39:41 +0000 (12:39 +0000)]
r2726: added a -r option to ldbdel to allow easy delete of a whole
subtree. Useful when cleaning up a mess after testing.
Andrew Tridgell [Tue, 28 Sep 2004 12:38:59 +0000 (12:38 +0000)]
r2725: fixed ldbtest to give the basedn to ldb_search()
Stefan Metzmacher [Tue, 28 Sep 2004 12:36:20 +0000 (12:36 +0000)]
r2724: - use ldapsrv_service and set it up with the rootDSE and default partition
(this is not complete yet)
- call asn1_free() after each call
metze
Stefan Metzmacher [Tue, 28 Sep 2004 12:30:42 +0000 (12:30 +0000)]
r2723: fix some debug messages
metze
Stefan Metzmacher [Tue, 28 Sep 2004 12:17:03 +0000 (12:17 +0000)]
r2722: remove tmp debug messages
metze
Andrew Tridgell [Tue, 28 Sep 2004 12:06:22 +0000 (12:06 +0000)]
r2721: added a -b option to ldbtest so it can be used with the new smbd ldap server
without changing realms
Stefan Metzmacher [Tue, 28 Sep 2004 11:57:56 +0000 (11:57 +0000)]
r2720: -implement sldb_Modify() call
metze
Andrew Tridgell [Tue, 28 Sep 2004 11:57:40 +0000 (11:57 +0000)]
r2719: an additional note on talloc_unreference()
Andrew Tridgell [Tue, 28 Sep 2004 11:54:17 +0000 (11:54 +0000)]
r2718: - added a talloc_unreference() function as requested by metze.
- added documentation for talloc_unreference()
- made the abandoned child logic in talloc_free() clearer and more consistent
Andrew Tridgell [Tue, 28 Sep 2004 11:08:43 +0000 (11:08 +0000)]
r2717: added talloc_p() docs
Andrew Tridgell [Tue, 28 Sep 2004 11:04:55 +0000 (11:04 +0000)]
r2716: created a separate detailed talloc_guide.txt document, after volker
complained it was all too confusing :-)
I recommend that everyone who wants to work on Samba4 have a read of this.
Stefan Metzmacher [Tue, 28 Sep 2004 10:44:44 +0000 (10:44 +0000)]
r2714: - add sldb_Add() implementation
- fix some errstr settings
metze
Andrew Tridgell [Tue, 28 Sep 2004 09:34:49 +0000 (09:34 +0000)]
r2713: better handling of binary values in index key creation
Andrew Tridgell [Tue, 28 Sep 2004 08:17:20 +0000 (08:17 +0000)]
r2712: fixed a bug in ldbtest to make it cope with an existing index
Andrew Tridgell [Tue, 28 Sep 2004 06:12:07 +0000 (06:12 +0000)]
r2711: added a simple talloc speed tester. I get the following on my laptop:
MEASURING TALLOC VS MALLOC SPEED
talloc: 279154 ops/sec
malloc: 318758 ops/sec
which I think is an acceptable overhead for the increased functionality
Andrew Tridgell [Tue, 28 Sep 2004 05:44:59 +0000 (05:44 +0000)]
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.
Andrew Tridgell [Tue, 28 Sep 2004 05:42:02 +0000 (05:42 +0000)]
r2709: finally solved the talloc reference problem.
The problem was that the simple "uint_t ref_count;" in a talloc chunk
did not give enough information. It told us that a pointer was
referenced more than once, but it didn't say who it was referenced
by. This means that when the pointer was freed we had no sane way to
clean up the reference.
I have now replaced ref_count with a "refs" list, which means that
references point to the pointer, and the pointer has a linked list of
references. So now we can cleanup from either direction without losing track of anything.
I've also added a LOCAL-TALLOC smbtorture test that tests talloc
behaviour for some common uses.
Jelmer Vernooij [Tue, 28 Sep 2004 01:12:55 +0000 (01:12 +0000)]
r2705: Don't try RemQueryInterface2 for now (doesn't validate)
Jelmer Vernooij [Tue, 28 Sep 2004 01:11:40 +0000 (01:11 +0000)]
r2704: Complain about 'object interfaces' that don't have version 0.0 (the standard
doesn't allow them to! I think the idea is that you just create a new
interface that inherits your old interface, thus ensuring backwards-compatibility)
Re-enable to validator
Jelmer Vernooij [Mon, 27 Sep 2004 22:06:27 +0000 (22:06 +0000)]
r2699: Correct handle ServerAlive() and ServerAlive2() + add torture tests
Jelmer Vernooij [Mon, 27 Sep 2004 16:37:41 +0000 (16:37 +0000)]
r2696: DCOM updates:
- Start working on OXIDResolver interface
- Add torture test for SimplePing()
Simo Sorce [Mon, 27 Sep 2004 15:40:12 +0000 (15:40 +0000)]
r2695: revert "Del" renaming
Simo Sorce [Mon, 27 Sep 2004 15:37:43 +0000 (15:37 +0000)]
r2694: DN -> DC these are domain components ...
Stefan Metzmacher [Mon, 27 Sep 2004 15:11:42 +0000 (15:11 +0000)]
r2693: - send a reply when no attributes there
- add some debug messages
metze
Simo Sorce [Mon, 27 Sep 2004 14:18:25 +0000 (14:18 +0000)]
r2690: deleted by mistake
Simo Sorce [Mon, 27 Sep 2004 14:11:11 +0000 (14:11 +0000)]
r2689: Use consistent naming Del -> Delete
Add delete functionality to ldb simple lda server backend
add some const in ldap.h
Stefan Metzmacher [Mon, 27 Sep 2004 13:20:59 +0000 (13:20 +0000)]
r2688: - fix case where listed attributes are asked
- use the return code of the functions
and only call ldapsrv_terminate_connection from ldapsrv_recv() or ldapsrv_send()
- the rootdse is now a normal partition
metze
Jelmer Vernooij [Mon, 27 Sep 2004 12:57:59 +0000 (12:57 +0000)]
r2687: Add ORPC flag (used by DCOM)
Stefan Metzmacher [Mon, 27 Sep 2004 11:38:36 +0000 (11:38 +0000)]
r2686: remove unused gtk+ check
metze
Stefan Metzmacher [Mon, 27 Sep 2004 10:14:24 +0000 (10:14 +0000)]
r2685: ALLOC_CHECK() after talloc_steal() isn't needed
(thanks simo:-)
metze
Jelmer Vernooij [Mon, 27 Sep 2004 10:13:41 +0000 (10:13 +0000)]
r2684: Free the right talloc context (don't panic when encountering illegal multibyte
sequences)
Jelmer Vernooij [Mon, 27 Sep 2004 09:26:37 +0000 (09:26 +0000)]
r2683: Fix a couple of compile warnings, depend on gtk+-2.4
Stefan Metzmacher [Mon, 27 Sep 2004 09:21:52 +0000 (09:21 +0000)]
r2682: as sambdb holds all search data, don't double free the data
metze
Stefan Metzmacher [Mon, 27 Sep 2004 08:52:31 +0000 (08:52 +0000)]
r2681: commit the first semi working search implementation
which exports data from a ldb.
I commit this code, so that someone can help me to find a strange
bug
metze
Andrew Tridgell [Mon, 27 Sep 2004 08:41:39 +0000 (08:41 +0000)]
r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit
Andrew Tridgell [Mon, 27 Sep 2004 08:39:51 +0000 (08:39 +0000)]
r2679: fixed an uninitialised variable found with valgrind
Andrew Tridgell [Mon, 27 Sep 2004 08:39:06 +0000 (08:39 +0000)]
r2678: from_name and to_name aren't needed in smb_iconv_t
Andrew Tridgell [Mon, 27 Sep 2004 08:38:13 +0000 (08:38 +0000)]
r2677: - fixed a bug in the recursive logic talloc_free() when there are
circular references (circular references are allowed, they just need
to be handled carefully inside talloc)
- mark talloc_reference() pointers nicely in the --leak-report-full
code, so you see what has a reference to what in a useful manner
Andrew Tridgell [Mon, 27 Sep 2004 05:15:14 +0000 (05:15 +0000)]
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.
Andrew Tridgell [Mon, 27 Sep 2004 05:13:00 +0000 (05:13 +0000)]
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.
Andrew Tridgell [Mon, 27 Sep 2004 04:20:18 +0000 (04:20 +0000)]
r2674: I have realised that talloc() should have its context marked const, as
a const pointer really means that "the data pointed to by this pointer
won't change", and that is certainly true of talloc(). The fact that
some behind-the-scenes meta-data can change doesn't matter from the
point of view of const.
this fixes a number of const warnings caused by const data structures
being passed as talloc contexts. That will no longer generate a
warning.
also changed the talloc leak reporting option from --leak-check to
--leak-report, as all it does is generate a report on exit. A new
--leak-report-full option has been added that shows the complete tree
of memory allocations, which is is quite useful in tracking things down.
NOTE: I find it quite useful to insert talloc_report_full(ptr, stderr)
calls at strategic points in the code while debugging memory
allocation problems, particularly before freeing a major context (such
as the connection context). This allows you to see if that context has
been accumulating too much data, such as per-request data, which
should have been freed when the request finished.
Andrew Tridgell [Mon, 27 Sep 2004 04:11:37 +0000 (04:11 +0000)]
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
Andrew Tridgell [Mon, 27 Sep 2004 04:00:23 +0000 (04:00 +0000)]
r2672: don't call a variable "dup" as that conflicts with a standard system call name
Andrew Tridgell [Mon, 27 Sep 2004 01:36:19 +0000 (01:36 +0000)]
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.
Andrew Tridgell [Mon, 27 Sep 2004 00:48:01 +0000 (00:48 +0000)]
r2670: use a destructor to auto-close the samr ldb when the last user
disconnects. Previously the ldb was always kept open.
Andrew Tridgell [Sun, 26 Sep 2004 23:39:18 +0000 (23:39 +0000)]
r2669: convert make_user_info() and associated functions from malloc to talloc
Andrew Tridgell [Sun, 26 Sep 2004 23:38:14 +0000 (23:38 +0000)]
r2668: steal the cli pointer into the pipe context so a single free destroys the cli context too
Jelmer Vernooij [Sun, 26 Sep 2004 22:19:48 +0000 (22:19 +0000)]
r2667: Remove forward declaration of static function from function. GCC 3.5 and 4.0 don't accept declarations of static functions inside other
functions, see http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02514.html
Andrew Tridgell [Sun, 26 Sep 2004 12:51:49 +0000 (12:51 +0000)]
r2664: fixed the final server leak for normal operation. We now get a clean report from --leak-check
Andrew Tridgell [Sun, 26 Sep 2004 12:50:36 +0000 (12:50 +0000)]
r2663: fix an epmapper server leak - another talloc_realloc(NULL, ) leak
Andrew Tridgell [Sun, 26 Sep 2004 12:48:06 +0000 (12:48 +0000)]
r2662: make --leak-check completely silent if not blocks are allocated
Andrew Tridgell [Sun, 26 Sep 2004 11:45:14 +0000 (11:45 +0000)]
r2661: fixed a client side memory leak in the clilist code.
This sort of bug happens quite easily with the new talloc_realloc()
interface. talloc_realloc() now looks like this:
void *talloc_realloc(void *ptr, size_t size);
and if ptr is not NULL then everything is fine. If ptr is NULL then
talloc_realloc() presumes you want to allocate in the NULL context,
which is probably not what is wanted.
For now the solution is to initialise ptr like this:
ptr = talloc(mem_ctx, 0);
so when the realloc happens it has a context to get hold of.
I might change the interface of talloc_realloc() later to prevent this
problem in a more robust manner
Andrew Tridgell [Sun, 26 Sep 2004 11:30:20 +0000 (11:30 +0000)]
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
Andrew Tridgell [Sun, 26 Sep 2004 11:27:01 +0000 (11:27 +0000)]
r2659: removed some extraneous debug msgs
Andrew Tridgell [Sun, 26 Sep 2004 11:25:33 +0000 (11:25 +0000)]
r2658: fixed a couple of error codes found with RAW-CONTEXT
Andrew Tridgell [Sun, 26 Sep 2004 11:24:39 +0000 (11:24 +0000)]
r2657: if we are already fully authenticated in session setup then the vuid is ignored
Andrew Tridgell [Sun, 26 Sep 2004 07:44:15 +0000 (07:44 +0000)]
r2656: moved the seteuid configure tests into the posix backend (these tests
don't actually work yet, that will come later)
Andrew Tridgell [Sun, 26 Sep 2004 07:04:35 +0000 (07:04 +0000)]
r2655: fixed an error in the shutdown of the sock->transport->session->tree
smbcli raw context handling
Andrew Tridgell [Sun, 26 Sep 2004 06:44:08 +0000 (06:44 +0000)]
r2654: fixed some more server memory leaks. We are now down to a single leak
of 16 bytes, caused by the 16 byte data_blob in the smb_signing
code.
Andrew Tridgell [Sun, 26 Sep 2004 06:41:59 +0000 (06:41 +0000)]
r2653: - data_blob() and data_blob_talloc() now get automatic names
- talloc_strdup() and related functions get automatic names
Andrew Tridgell [Sun, 26 Sep 2004 05:38:45 +0000 (05:38 +0000)]
r2650: fixed a memory leak in make_server_info()
Andrew Tridgell [Sun, 26 Sep 2004 04:59:03 +0000 (04:59 +0000)]
r2649: - used some cpp tricks to make users of talloc() and talloc_realloc()
to get auto-naming of pointers very cheaply.
- fixed a couple of memory leaks found with the new tricks
A typical exit report for smbd is now:
talloc report on 'null_context' (total 811 bytes in 54 blocks)
auth/auth_sam.c:334 contains 20 bytes in 1 blocks
struct auth_serversupplied_info contains 498 bytes in 33 blocks
UNNAMED contains 8 bytes in 1 blocks
lib/data_blob.c:40 contains 16 bytes in 1 blocks
iconv(CP850,UTF8) contains 61 bytes in 4 blocks
iconv(UTF8,CP850) contains 61 bytes in 4 blocks
iconv(UTF8,UTF-16LE) contains 67 bytes in 4 blocks
iconv(UTF-16LE,UTF8) contains 67 bytes in 4 blocks
UNNAMED contains 13 bytes in 1 blocks
which is much better than before
Andrew Tridgell [Sun, 26 Sep 2004 03:50:24 +0000 (03:50 +0000)]
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.
Andrew Tridgell [Sun, 26 Sep 2004 03:05:04 +0000 (03:05 +0000)]
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
Andrew Tridgell [Sun, 26 Sep 2004 02:16:25 +0000 (02:16 +0000)]
r2645: converted the NTLMSSP code to the new style of talloc
Andrew Tridgell [Sun, 26 Sep 2004 02:14:25 +0000 (02:14 +0000)]
r2644: removed an unused function
Andrew Tridgell [Sun, 26 Sep 2004 01:43:05 +0000 (01:43 +0000)]
r2643: convert more of the auth subsyystem to the new talloc methods. This
also fixes a memory leak found with --leak-check.
Andrew Tridgell [Sun, 26 Sep 2004 01:41:55 +0000 (01:41 +0000)]
r2642: smb_iconv_t is a pointer, so checks against -1 errors should use a cast