Tim Potter [Sun, 3 Oct 2004 07:00:17 +0000 (07:00 +0000)]
r2795: Split status code constants into a separate file.
(This used to be commit
12a3f75c1cf39c74952077cc00fd86a4e935f74b)
Andrew Tridgell [Sun, 3 Oct 2004 06:46:29 +0000 (06:46 +0000)]
r2794: a very simple version of the unixuid NTVFS pass-thru module. In
conjunction with the posix backend this gives us a way to correctly
setup the unix security context in Samba4.
I chose the following method to determine the unix uid's and gid's to
use given the list of SIDs from the login process
- look for a "UnixID" field in the sam record. If present, then use it
(check if the record is of the right type as well)
- if UnixID is not present, then look for the "UnixName" sam
field. If it is present then use getpwnam() or getgrnam() to find
the unix id.
- if UnixID and UnixName are not present, then look for a unix
account of the right type called by the same name as the sAMAccountName field.
- if none of the above work then fail the operation with NT_STATUS_ACCESS_DENIED
obviously these steps only work well with a local SAM. It will need to
be more sophisticated in future.
I did not put any cache in place at all. That will need to be added
for decent performance.
(This used to be commit
78b67d19b9766131f0270e451089ee5bb1aa8bd9)
Andrew Tridgell [Sun, 3 Oct 2004 06:40:40 +0000 (06:40 +0000)]
r2793: fixed the handling of primaryGroupID in auth_sam. There were two bugs,
the first was it didn't pass primaryGroupID as an attributed it
wanted, the second was it didn't cope with primaryGroupID not being
present.
(This used to be commit
8373bfcdeca13dcdce3081af420d8bb7d842ad18)
Andrew Tridgell [Sun, 3 Oct 2004 06:39:19 +0000 (06:39 +0000)]
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
(This used to be commit
1246f80d806fb5f63cfbf3879de6d546384552a8)
Andrew Tridgell [Sun, 3 Oct 2004 00:04:30 +0000 (00:04 +0000)]
r2791: got rid of talloc_unreference() and instead created talloc_unlink(),
which is much clearer and simpler to use. It removes a specific parent
from a pointer, no matter whether that parent is a "reference" or a
direct parent. This gives complete control over the free process.
(This used to be commit
6c563887f1b9b8c842309a523e88b6f2a32db10f)
Tim Potter [Sat, 2 Oct 2004 23:35:50 +0000 (23:35 +0000)]
r2790: Add code to generate WERROR exceptions. Arrange inclusion of autogenerated
interface files to divvy them up into pipes that return WERRORs and pipes
that return NTSTATUS values.
(This used to be commit
294d1ae35c09432a41e5a07a3aa1884bfb9a93be)
Simo Sorce [Sat, 2 Oct 2004 15:28:16 +0000 (15:28 +0000)]
r2789: fix compile
(This used to be commit
a34ba8dafebb65e59616a0e68cc3d6fe3a349801)
Andrew Tridgell [Sat, 2 Oct 2004 13:29:20 +0000 (13:29 +0000)]
r2788: prevent a memory leak in the pvfs search backend
(This used to be commit
1de22070610231e60d329f56997bbec2cc674a4e)
Andrew Tridgell [Sat, 2 Oct 2004 12:30:02 +0000 (12:30 +0000)]
r2787: force masktest to use RAW_SEARCH_BOTH_DIRECTORY_INFO so it can obtain the short name
(This used to be commit
ad5a5ea08d5be812e0ef662948477add2433bc6f)
Andrew Tridgell [Sat, 2 Oct 2004 12:25:02 +0000 (12:25 +0000)]
r2786: - match on both long and short name for search posix backend
- a final name component of . is illegal
(This used to be commit
11c852170b83e5adbdb58407e1c7d3aeb4ab5bb8)
Andrew Tridgell [Sat, 2 Oct 2004 12:18:59 +0000 (12:18 +0000)]
r2785: call init_iconv() in smbtorture to ensure we have no memory allocated
when a test started, thus making leak detection easier
(This used to be commit
6c46e4622a9851bdef25ba9d353bdebc25f6ec8d)
Andrew Tridgell [Sat, 2 Oct 2004 12:16:46 +0000 (12:16 +0000)]
r2784: - fixed alignment of ascii directory listings
- fixed minimum parameter size for ascii qpathinfo call
(This used to be commit
ee065ae7f92e60600966cb1d44cd0e30498b93dd)
Andrew Tridgell [Sat, 2 Oct 2004 12:14:23 +0000 (12:14 +0000)]
r2783: got rid of the unused remote architecture detection code
(This used to be commit
9a04664531601b8251dbf6a0922ab48e675adb90)
Tim Potter [Sat, 2 Oct 2004 11:58:35 +0000 (11:58 +0000)]
r2782: Reformat IDL for winreg_EnumValue()
(This used to be commit
9250f745adc22b3f179cf363a9a9a5fba1ec6fc9)
Tim Potter [Sat, 2 Oct 2004 11:26:58 +0000 (11:26 +0000)]
r2781: Got winreg_EnumValue() working. Check it in so I don't break it trying
to clean it up. (-:
(This used to be commit
cc646f73b873292eaba152770be9500beff1c988)
Tim Potter [Sat, 2 Oct 2004 11:22:20 +0000 (11:22 +0000)]
r2780: Add conversion routines for DATA_BLOB. I'm not convinced that DATA_BLOB's
should be treated as scalar types though.
(This used to be commit
c9e96038f821783c30b5cf509334176f982403d9)
Tim Potter [Sat, 2 Oct 2004 06:32:53 +0000 (06:32 +0000)]
r2777: Correctly abort if an idl file fails to parse. Bloody perl...
(This used to be commit
35ff140b43b353a8848e417bb309046605e98085)
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
(This used to be commit
8d879cf54c2fe09d62a5c28b02a070cb80984744)
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.
(This used to be commit
bae2baeb0247ae8f840b3d3b5488c98d081789c5)
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
(This used to be commit
630fefb24a2f8d332dfa39f6c4980cd230407142)
Andrew Tridgell [Sat, 2 Oct 2004 01:42:06 +0000 (01:42 +0000)]
r2773: allow zero sized array talloc
(This used to be commit
06c58ad221ec40e46310e847ebf640bd53e8e468)
Tim Potter [Fri, 1 Oct 2004 07:38:09 +0000 (07:38 +0000)]
r2767: Get rid of some unnecessary %s formatting.
(This used to be commit
b63a0ef0d41e6f0fdc6bf46435fb7b81925946da)
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.
(This used to be commit
37af942d08da9ba9dcf351853f9064b5d179d5e4)
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.
(This used to be commit
6f3f6de058e806f13f48d3d1300db3784d2f470c)
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.
(This used to be commit
c4c748ce63fd2d87d4388a1eac9afa586867ce28)
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"
(This used to be commit
f3adabf6896b75f5293dbde3f9de737f35d95a10)
Simo Sorce [Thu, 30 Sep 2004 16:08:09 +0000 (16:08 +0000)]
r2758: keep docos handy while developing it
(This used to be commit
5f9b58c785950e9871ef6411ff2ef34f988959ed)
Stefan Metzmacher [Thu, 30 Sep 2004 13:29:27 +0000 (13:29 +0000)]
r2757: some minor fixes
metze
(This used to be commit
991b4777c8690337bb319c57550e918ced5d7503)
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.
(This used to be commit
ba2970c3a44562f071309198494c4b68659b2f3f)
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
(This used to be commit
3ff03b5cb21bb79afdd3b1609be9635f6688a539)
Stefan Metzmacher [Wed, 29 Sep 2004 13:06:26 +0000 (13:06 +0000)]
r2750: decode AbandonRequest correct (untested:-)
metze
(This used to be commit
4233067921d386d4bf02218b479083cdbe2bd3c1)
Stefan Metzmacher [Wed, 29 Sep 2004 12:40:30 +0000 (12:40 +0000)]
r2749: add asn1_read_implicit_Integer()
metze
(This used to be commit
a62fbcb30f63245d9dfb48c83a5f449965bb1ca7)
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
(This used to be commit
6825e78e01a220bc837ea51aa6afbf3f26a02c49)
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
(This used to be commit
72dfea2b07aea83d0965a585f6e388eb88a7c6d1)
Andrew Tridgell [Wed, 29 Sep 2004 06:35:34 +0000 (06:35 +0000)]
r2745: added some example talloc reports
(This used to be commit
10e2a4fd2b85d69b55efa8c36eb553dceda844ad)
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
(This used to be commit
8d4dc99b82efdf24b6811851c7bdd4af5a4c52c9)
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
(This used to be commit
43079cfc80317b6d0d2679f9377aac259e0f8fc7)
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
(This used to be commit
18d3e2647f0bedbba699d1ba2649c0cfe4526ef6)
Jelmer Vernooij [Tue, 28 Sep 2004 22:58:56 +0000 (22:58 +0000)]
r2741: Definition for ISystemActivator...
(This used to be commit
0bb42ba898a0d02c98bbefcfe5b9e42409658609)
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)
(This used to be commit
ea0b0bfea97067118dab634efefd3115b7a0fd85)
Tim Potter [Tue, 28 Sep 2004 21:44:05 +0000 (21:44 +0000)]
r2739: Start of torture test for winreg wrappers.
(This used to be commit
cf9b984b8457843d2b6bb1c4ac90d52c9b802d89)
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
(This used to be commit
f4a7a3282af6c6ff771547d2efdbba0fe0451b3e)
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.
(This used to be commit
e62bd7ef7ec80365ab00ce5b2051b7dc1726304b)
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
(This used to be commit
1bb471832830d73f0c7290e2ec12878518598379)
Andrew Tridgell [Tue, 28 Sep 2004 14:38:13 +0000 (14:38 +0000)]
r2734: the samdb_destructor can be static
(This used to be commit
feb63e74f923f2a50c6836e18a6c2bda39644e71)
Andrew Tridgell [Tue, 28 Sep 2004 14:37:28 +0000 (14:37 +0000)]
r2733: added a note on performance
(This used to be commit
171fe8209794bb1e61283126ccc165b43fbcfa62)
Stefan Metzmacher [Tue, 28 Sep 2004 13:50:15 +0000 (13:50 +0000)]
r2731: use debug level 10 everywhere
metze
(This used to be commit
a0e4dca3dab1da02edc09fd5f80690ec0b764c17)
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.
(This used to be commit
799b377badebf9a3f388b7d3fdc36484aa5e3376)
Stefan Metzmacher [Tue, 28 Sep 2004 12:42:03 +0000 (12:42 +0000)]
r2727: mark the password fields as hidden
metze
(This used to be commit
7ff118ecc90dd9cc9a5d1870e93fc5792bf66903)
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.
(This used to be commit
476674af5519960300c0a07349c7cdf307af3822)
Andrew Tridgell [Tue, 28 Sep 2004 12:38:59 +0000 (12:38 +0000)]
r2725: fixed ldbtest to give the basedn to ldb_search()
(This used to be commit
19925f5bd8dd24742e5d216b0c491975ceb7d3a6)
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
(This used to be commit
0aa622bdc497e4ae1a23bd47ad9d9bf2757c8fd5)
Stefan Metzmacher [Tue, 28 Sep 2004 12:30:42 +0000 (12:30 +0000)]
r2723: fix some debug messages
metze
(This used to be commit
9600c1a2c7789ebfb0a06cf21772cdacab0fb356)
Stefan Metzmacher [Tue, 28 Sep 2004 12:17:03 +0000 (12:17 +0000)]
r2722: remove tmp debug messages
metze
(This used to be commit
60dcba3e91cedca78d2eb7e01bc04790739a4aad)
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
(This used to be commit
fd2725f5c0a2ea89bbfcb0403d1bc03fa7b7ec25)
Stefan Metzmacher [Tue, 28 Sep 2004 11:57:56 +0000 (11:57 +0000)]
r2720: -implement sldb_Modify() call
metze
(This used to be commit
e74d3895f01369606254250f77376ae6ba3682ac)
Andrew Tridgell [Tue, 28 Sep 2004 11:57:40 +0000 (11:57 +0000)]
r2719: an additional note on talloc_unreference()
(This used to be commit
078d13181313f98c1df50185ebae4629cca98ee0)
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
(This used to be commit
a87584c8e3fb06cd3ff29a918f681b5c6c32b9ff)
Andrew Tridgell [Tue, 28 Sep 2004 11:08:43 +0000 (11:08 +0000)]
r2717: added talloc_p() docs
(This used to be commit
6743ca1b1a24776559aa1c04f0f4a33c67cea8a7)
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.
(This used to be commit
c4c427576c02b27d829ae4aaee31cbf893b4a2ad)
Stefan Metzmacher [Tue, 28 Sep 2004 10:44:44 +0000 (10:44 +0000)]
r2714: - add sldb_Add() implementation
- fix some errstr settings
metze
(This used to be commit
7419c6dabbe09b4a5628fc36c7636a1763e4876f)
Andrew Tridgell [Tue, 28 Sep 2004 09:34:49 +0000 (09:34 +0000)]
r2713: better handling of binary values in index key creation
(This used to be commit
b0c92616fb69d8139f66dc8144cfcc88ea6825dc)
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
(This used to be commit
3f776a9b5c240312f161b651201458e43a9dd6a9)
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
(This used to be commit
91669ea830c16db2730c5e43a7cad26d9db5c585)
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.
(This used to be commit
e14ee428ec357fab76a960387a9820a673786e27)
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.
(This used to be commit
911a8d590cb184bcb892810729955c2c4cf02550)
Jelmer Vernooij [Tue, 28 Sep 2004 01:12:55 +0000 (01:12 +0000)]
r2705: Don't try RemQueryInterface2 for now (doesn't validate)
(This used to be commit
b2f4532e906e1a5bf134812072aad211ba2d01bb)
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
(This used to be commit
e364e46a88e5a222c94cdb9cf8e7a124e43f0bcf)
Jelmer Vernooij [Mon, 27 Sep 2004 22:06:27 +0000 (22:06 +0000)]
r2699: Correct handle ServerAlive() and ServerAlive2() + add torture tests
(This used to be commit
9e74144aa8e5f9a8b6e3d5293833c4afeebeddb0)
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()
(This used to be commit
b54d14a01a71082251ff926ab57974c6eb3c0a41)
Simo Sorce [Mon, 27 Sep 2004 15:40:12 +0000 (15:40 +0000)]
r2695: revert "Del" renaming
(This used to be commit
ddd74dae8efe4e04b5a56ee9ecd9d4f87f99d104)
Simo Sorce [Mon, 27 Sep 2004 15:37:43 +0000 (15:37 +0000)]
r2694: DN -> DC these are domain components ...
(This used to be commit
35135033ffbae42a3a946ea30ba46f6ed9b12898)
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
(This used to be commit
1de1beca66da68e5af0869629d2c50016c25e776)
Simo Sorce [Mon, 27 Sep 2004 14:18:25 +0000 (14:18 +0000)]
r2690: deleted by mistake
(This used to be commit
3d587a7141908362657afc2dfd0c78d73a5fed07)
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
(This used to be commit
5ed9a6eb184f34eb572dd81202237042518ec7cd)
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
(This used to be commit
af1501a28d700f90cd2243fbfdce6527a0f62961)
Jelmer Vernooij [Mon, 27 Sep 2004 12:57:59 +0000 (12:57 +0000)]
r2687: Add ORPC flag (used by DCOM)
(This used to be commit
b7ac0cb692ea373f754d7a40b44a7b0756459287)
Stefan Metzmacher [Mon, 27 Sep 2004 11:38:36 +0000 (11:38 +0000)]
r2686: remove unused gtk+ check
metze
(This used to be commit
d1e8b340a9942553ec7f281affd11ea4315ac448)
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
(This used to be commit
e62cd75d3786f3d638ac2a27d6e864c826eaa48f)
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)
(This used to be commit
b90da2337b83eb261a8072f9d0b13ec28caf3c4d)
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
(This used to be commit
4668384717eda878583477b8f455809056885120)
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
(This used to be commit
740347255b8f1aafda1ebd10d63fdde1c4041af0)
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
(This used to be commit
67bb49172567af9d106ded55c1257b808d2a97ff)
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
(This used to be commit
c82a9cf750829c4f6982ca3133295c8599023c4e)
Andrew Tridgell [Mon, 27 Sep 2004 08:39:51 +0000 (08:39 +0000)]
r2679: fixed an uninitialised variable found with valgrind
(This used to be commit
9087fab0adcf1791caeb795509ca9f14f5f47e82)
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
(This used to be commit
f3844cc0a5ad6b03f166435d44db02763df345d7)
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
(This used to be commit
a87d3d11344069284604a7294a54cadcc6e1a096)
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.
(This used to be commit
f31e5d56e364ce8ab76fdb20b30e179b458b2ffa)
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.
(This used to be commit
dc5315086156644fad093cbe6b02d999adba8540)
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.
(This used to be commit
c60ff99c3129c26a9204bac1c6e5fb386114a923)
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
(This used to be commit
c51ca7c0e73b97435c245cd440a4fb979cf6a4f3)
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
(This used to be commit
015db2ed8cdde6d6eb79857cb9b6d72185382acc)
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.
(This used to be commit
8dc23821c9f54b2f13049b5e608a0cafb81aa540)
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.
(This used to be commit
d78eea9eb8540f137d30aef5fbb397295312eb1b)
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
(This used to be commit
278cef77f083c002d17ecbbe18c20825a380eda3)
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
(This used to be commit
417d0c0ba182aab3a3a23db76ff7ac7cbc663cb6)
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
(This used to be commit
8768168aadf51b9559831954e349d9aa94101c41)
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
(This used to be commit
1ff41bbcae8dc7514a85d69679e44dc7c5b0342f)
Andrew Tridgell [Sun, 26 Sep 2004 12:50:36 +0000 (12:50 +0000)]
r2663: fix an epmapper server leak - another talloc_realloc(NULL, ) leak
(This used to be commit
2662be3a2be04aa7f4dcfde3453389595bf43496)
Andrew Tridgell [Sun, 26 Sep 2004 12:48:06 +0000 (12:48 +0000)]
r2662: make --leak-check completely silent if not blocks are allocated
(This used to be commit
00518201754dc2de583267071ebd2adecbadcb59)