1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

2182 Commits

Author SHA1 Message Date
Andrew Tridgell
a93e366379 r2733: added a note on performance
(This used to be commit 171fe8209794bb1e61283126ccc165b43fbcfa62)
2007-10-10 12:59:27 -05:00
Stefan Metzmacher
ab5a0d31a3 r2731: use debug level 10 everywhere
metze
(This used to be commit a0e4dca3dab1da02edc09fd5f80690ec0b764c17)
2007-10-10 12:59:27 -05:00
Tim Potter
83d0f6ffae r2728: Break arg parsing stuff out of samr.py into a standalone program.
(This used to be commit 799b377badebf9a3f388b7d3fdc36484aa5e3376)
2007-10-10 12:59:27 -05:00
Stefan Metzmacher
169cf23812 r2727: mark the password fields as hidden
metze
(This used to be commit 7ff118ecc90dd9cc9a5d1870e93fc5792bf66903)
2007-10-10 12:59:27 -05:00
Andrew Tridgell
443d8fd05e r2726: added a -r option to ldbdel to allow easy delete of a whole
subtree. Useful when cleaning up a mess after testing.
(This used to be commit 476674af5519960300c0a07349c7cdf307af3822)
2007-10-10 12:59:27 -05:00
Andrew Tridgell
ca3765ca78 r2725: fixed ldbtest to give the basedn to ldb_search()
(This used to be commit 19925f5bd8dd24742e5d216b0c491975ceb7d3a6)
2007-10-10 12:59:27 -05:00
Stefan Metzmacher
6baf350771 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
(This used to be commit 0aa622bdc497e4ae1a23bd47ad9d9bf2757c8fd5)
2007-10-10 12:59:26 -05:00
Stefan Metzmacher
250b6254bd r2723: fix some debug messages
metze
(This used to be commit 9600c1a2c7789ebfb0a06cf21772cdacab0fb356)
2007-10-10 12:59:26 -05:00
Stefan Metzmacher
aee52f2b57 r2722: remove tmp debug messages
metze
(This used to be commit 60dcba3e91cedca78d2eb7e01bc04790739a4aad)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
b2f9612e5d r2721: added a -b option to ldbtest so it can be used with the new smbd ldap server
without changing realms
(This used to be commit fd2725f5c0a2ea89bbfcb0403d1bc03fa7b7ec25)
2007-10-10 12:59:26 -05:00
Stefan Metzmacher
4d541b26ea r2720: -implement sldb_Modify() call
metze
(This used to be commit e74d3895f01369606254250f77376ae6ba3682ac)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
4ff5ffa4a0 r2719: an additional note on talloc_unreference()
(This used to be commit 078d13181313f98c1df50185ebae4629cca98ee0)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
8ae2cd82ca 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
(This used to be commit a87584c8e3fb06cd3ff29a918f681b5c6c32b9ff)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
0a93af206c r2717: added talloc_p() docs
(This used to be commit 6743ca1b1a24776559aa1c04f0f4a33c67cea8a7)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
864abe0e45 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.
(This used to be commit c4c427576c02b27d829ae4aaee31cbf893b4a2ad)
2007-10-10 12:59:25 -05:00
Stefan Metzmacher
7c0efa5cf1 r2714: - add sldb_Add() implementation
- fix some errstr settings

metze
(This used to be commit 7419c6dabbe09b4a5628fc36c7636a1763e4876f)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
14a0e37582 r2713: better handling of binary values in index key creation
(This used to be commit b0c92616fb69d8139f66dc8144cfcc88ea6825dc)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
0244414a58 r2712: fixed a bug in ldbtest to make it cope with an existing index
(This used to be commit 3f776a9b5c240312f161b651201458e43a9dd6a9)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
7cc7c553cb 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
(This used to be commit 91669ea830c16db2730c5e43a7cad26d9db5c585)
2007-10-10 12:59:25 -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 e14ee428ec357fab76a960387a9820a673786e27)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
a675b09e8d 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.
(This used to be commit 911a8d590cb184bcb892810729955c2c4cf02550)
2007-10-10 12:59:24 -05:00
Jelmer Vernooij
c0af446d57 r2705: Don't try RemQueryInterface2 for now (doesn't validate)
(This used to be commit b2f4532e906e1a5bf134812072aad211ba2d01bb)
2007-10-10 12:59:24 -05:00
Jelmer Vernooij
8925932e81 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
(This used to be commit e364e46a88e5a222c94cdb9cf8e7a124e43f0bcf)
2007-10-10 12:59:24 -05:00
Jelmer Vernooij
322d1ccd9f r2699: Correct handle ServerAlive() and ServerAlive2() + add torture tests
(This used to be commit 9e74144aa8e5f9a8b6e3d5293833c4afeebeddb0)
2007-10-10 12:59:24 -05:00
Jelmer Vernooij
fc3c05e63f r2696: DCOM updates:
- Start working on OXIDResolver interface
 - Add torture test for SimplePing()
(This used to be commit b54d14a01a71082251ff926ab57974c6eb3c0a41)
2007-10-10 12:59:24 -05:00
Simo Sorce
eac532ee3a r2695: revert "Del" renaming
(This used to be commit ddd74dae8efe4e04b5a56ee9ecd9d4f87f99d104)
2007-10-10 12:59:24 -05:00
Simo Sorce
250996aa5a r2694: DN -> DC these are domain components ...
(This used to be commit 35135033ffbae42a3a946ea30ba46f6ed9b12898)
2007-10-10 12:59:23 -05:00
Stefan Metzmacher
43d45f80ad r2693: - send a reply when no attributes there
- add some debug messages

metze
(This used to be commit 1de1beca66da68e5af0869629d2c50016c25e776)
2007-10-10 12:59:23 -05:00
Simo Sorce
159b8c2d38 r2690: deleted by mistake
(This used to be commit 3d587a7141908362657afc2dfd0c78d73a5fed07)
2007-10-10 12:59:22 -05:00
Simo Sorce
456e2f82e8 r2689: Use consistent naming Del -> Delete
Add delete functionality to ldb simple lda server backend
add some const in ldap.h
(This used to be commit 5ed9a6eb184f34eb572dd81202237042518ec7cd)
2007-10-10 12:59:22 -05:00
Stefan Metzmacher
718bb5e8ff 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
(This used to be commit af1501a28d700f90cd2243fbfdce6527a0f62961)
2007-10-10 12:59:22 -05:00
Jelmer Vernooij
f64b8cf9cd r2687: Add ORPC flag (used by DCOM)
(This used to be commit b7ac0cb692ea373f754d7a40b44a7b0756459287)
2007-10-10 12:59:22 -05:00
Stefan Metzmacher
f63e3ae1f7 r2686: remove unused gtk+ check
metze
(This used to be commit d1e8b340a9942553ec7f281affd11ea4315ac448)
2007-10-10 12:59:22 -05:00
Stefan Metzmacher
c8a7c5b95e r2685: ALLOC_CHECK() after talloc_steal() isn't needed
(thanks simo:-)

metze
(This used to be commit e62cd75d3786f3d638ac2a27d6e864c826eaa48f)
2007-10-10 12:59:22 -05:00
Jelmer Vernooij
073e9af19b r2684: Free the right talloc context (don't panic when encountering illegal multibyte
sequences)
(This used to be commit b90da2337b83eb261a8072f9d0b13ec28caf3c4d)
2007-10-10 12:59:22 -05:00
Jelmer Vernooij
8c039e5c91 r2683: Fix a couple of compile warnings, depend on gtk+-2.4
(This used to be commit 4668384717eda878583477b8f455809056885120)
2007-10-10 12:59:21 -05:00
Stefan Metzmacher
ccdb6138ab r2682: as sambdb holds all search data, don't double free the data
metze
(This used to be commit 740347255b8f1aafda1ebd10d63fdde1c4041af0)
2007-10-10 12:59:21 -05:00
Stefan Metzmacher
965feb2cff 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
(This used to be commit 67bb49172567af9d106ded55c1257b808d2a97ff)
2007-10-10 12:59:21 -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 c82a9cf750829c4f6982ca3133295c8599023c4e)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
3aa3428bc9 r2679: fixed an uninitialised variable found with valgrind
(This used to be commit 9087fab0adcf1791caeb795509ca9f14f5f47e82)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
6f068e207a r2678: from_name and to_name aren't needed in smb_iconv_t
(This used to be commit f3844cc0a5ad6b03f166435d44db02763df345d7)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
2f5cf5d794 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
(This used to be commit a87d3d11344069284604a7294a54cadcc6e1a096)
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 f31e5d56e364ce8ab76fdb20b30e179b458b2ffa)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
61a7dfc237 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.
(This used to be commit dc5315086156644fad093cbe6b02d999adba8540)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
351ca44e8b 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.
(This used to be commit c60ff99c3129c26a9204bac1c6e5fb386114a923)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
0be5523afb 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
(This used to be commit c51ca7c0e73b97435c245cd440a4fb979cf6a4f3)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
d13bbcf9e3 r2672: don't call a variable "dup" as that conflicts with a standard system call name
(This used to be commit 015db2ed8cdde6d6eb79857cb9b6d72185382acc)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
5b44130afa 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.
(This used to be commit 8dc23821c9f54b2f13049b5e608a0cafb81aa540)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
f095a8e748 r2670: use a destructor to auto-close the samr ldb when the last user
disconnects. Previously the ldb was always kept open.
(This used to be commit d78eea9eb8540f137d30aef5fbb397295312eb1b)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
5a064d4a62 r2669: convert make_user_info() and associated functions from malloc to talloc
(This used to be commit 278cef77f083c002d17ecbbe18c20825a380eda3)
2007-10-10 12:59:19 -05:00