1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

1615 Commits

Author SHA1 Message Date
Andrew Tridgell
160ae47430 r2052: rewrote the talloc section of the programming guide
(This used to be commit 7d3effccb2)
2007-10-10 12:58:21 -05:00
Andrew Tridgell
ede02ee038 r2051: switched the samdb over to using the new destructor and reference
count features of talloc, instead of re-implementing both those
features inside of samdb (which is what we did before).

This makes samdb considerably simpler, and also fixes some bugs, as I
found some error paths that didn't call samdb_close(). Those are now
handled by the fact that a talloc_free() will auto-close and destroy
the samdb context, using a destructor.
(This used to be commit da60987a92)
2007-10-10 12:58:21 -05:00
Andrew Tridgell
294f6f1694 r2050: fixed a case where code assumed you could Realloc the result of a data_blob()
(This used to be commit 1fdccf8dc7)
2007-10-10 12:58:21 -05:00
Andrew Tridgell
4f55a7af08 r2049: talloc now has destructors and reference counts
this means you can do:

  talloc_set_destructor(ptr, my_destructor);

and your destructor will be called with the pointer as an argument
when the pointer is about to be freed. The destructor can refuse the
free by returning -1.

You can also increase the reference count on a pointer like this:

  talloc_increase_ref_count(ptr);

and a talloc_free() will just reduce the reference count, only
actually freeing the memory when the count reaches zero.
(This used to be commit b5608d52d3)
2007-10-10 12:58:21 -05:00
Stefan Metzmacher
c4a2128db5 r2048: fix memory leak found by abartlet
metze
(This used to be commit 0cab7a32f8)
2007-10-10 12:58:20 -05:00
Andrew Bartlett
3d065b198e r2047: Warn on 'declaration after statement' (breaks non-gcc).
Andrew Bartlett
(This used to be commit ce96816d0e)
2007-10-10 12:58:20 -05:00
Andrew Tridgell
15d0ce1977 r2046: fixed two server packet format errors found with the RAW-* tests
(This used to be commit 9fdbe60230)
2007-10-10 12:58:20 -05:00
Andrew Tridgell
cc7d62d3d1 r2045: fixed a date format push in SMBsearch
(This used to be commit a6cc0bedad)
2007-10-10 12:58:20 -05:00
Andrew Tridgell
c595ec9936 r2044: fixed two unin
(This used to be commit d17e088ebb)
2007-10-10 12:58:20 -05:00
Andrew Tridgell
716e6c1efb r2043: data_blob() now returns a talloc'd pointer. If everyone has been
following the data_blob() API properly then this will cause no
problems. I'm expecting chaos.

this is part of the general move towards using talloc for everything
in samba4
(This used to be commit 3f6b3c21e4)
2007-10-10 12:58:20 -05:00
Andrew Tridgell
98875066fb r2042: missed a couple of places that should be talloc_free()
(This used to be commit e1575a72a1)
2007-10-10 12:58:19 -05:00
Andrew Bartlett
fa5a99b7a6 r2041: Fix NTLMSSP RPC sealing, client -> win2k3 server.
The bug (found by tridge) is that Win2k3 is being tighter about the
NTLMSSP flags.  If we don't negotiate sealing, we can't use it.

We now have a way to indicate to the GENSEC implementation mechanisms
what things we want for a connection.

Andrew Bartlett
(This used to be commit 86f61568ea)
2007-10-10 12:58:19 -05:00
Andrew Tridgell
b13a9a8f98 r2040: fixed a memory handling error in clisocket (caught with valgrind)
(This used to be commit f6dc62bf11)
2007-10-10 12:58:19 -05:00
Andrew Tridgell
600144050c r2039: got rid of the free() ptr in DATA_BLOB
I plan on replacing the concept by adding a generic destructor in all talloc ptrs, so you can do:

  talloc_set_destructor(ptr, my_destructor);

to setup a function that will be called on free.
(This used to be commit 957b260621)
2007-10-10 12:58:19 -05:00
Andrew Tridgell
2ed3ab021d r2038: get rid of the optimisation in the dcerpc server that tries to avoid a
data copy by playing internal games with DATA_BLOB and free().
(This used to be commit 5894b5c0f3)
2007-10-10 12:58:19 -05:00
Andrew Tridgell
35d65298d5 r2037: switched the asn.1 code to use talloc
(This used to be commit c0862278ca)
2007-10-10 12:58:19 -05:00
Andrew Tridgell
bc5b92c0e0 r2036: switched the spnego code to use talloc
now that talloc_free() doesn't need to take a context ptr, there is no
reason we can't use talloc everywhere that we currently use malloc().
(This used to be commit a2ad77fb3a)
2007-10-10 12:58:19 -05:00
Andrew Bartlett
5e34ee629a r2035: Fix spelling.
Andrew Bartlett
(This used to be commit 4e2c5a5fb3)
2007-10-10 12:58:19 -05:00
Jeremy Allison
85d8d24d3d r2034: Allow user-selectable hash functions on open only.
Jeremy.
(This used to be commit b43320ee5c)
2007-10-10 12:58:18 -05:00
Andrew Tridgell
c58b64b7bf r2031: add a check for a blank secret return in lsa secret tests
(This used to be commit eddb31d196)
2007-10-10 12:58:18 -05:00
Andrew Tridgell
53415ebf8a r2030: quick hack to allow the simple NTVFS backend to handler base directories with mixed case names
(This used to be commit efecc3306e)
2007-10-10 12:58:18 -05:00
Andrew Tridgell
5e122da655 r2029: changed our client side dcerpc padding to match what w2k3 does - a 16
byte padding of the payload portion of the packet.
(This used to be commit 271831f97f)
2007-10-10 12:58:18 -05:00
Stefan Metzmacher
13c899de96 r2021: add password change fallback to SetUserInfo level 25,24,23
metze
(This used to be commit d31405ff2f)
2007-10-10 12:58:18 -05:00
Stefan Metzmacher
36e52d5d9a r2020: fix compiler warnings
metze
(This used to be commit 17268837d2)
2007-10-10 12:58:18 -05:00
Stefan Metzmacher
bee751ed17 r2019: fix compiler warnings
metze
(This used to be commit 699248fe82)
2007-10-10 12:58:17 -05:00
Stefan Metzmacher
527bafcf73 r2017: fix compiler warnings
metze
(This used to be commit eb75d9323f)
2007-10-10 12:58:17 -05:00
Stefan Metzmacher
2ed6f07ccd r2012: --enable-developer also sets debug=yes now
and we how set the CFLAGS="-g -Wall" and the rest only
if the compiler supports it.

CFLAGS is now not empty when we call PROG_CC
so there won't be a "-O2" in the final CFLAGS

metze
(This used to be commit 479f681694)
2007-10-10 12:58:17 -05:00
Stefan Metzmacher
335e741671 r2011: remove this broken and never reached test
as PROG_CC will set CFLAGS to the default ones

normaly "-g -O2"

metze
(This used to be commit 424af1a9df)
2007-10-10 12:58:17 -05:00
Stefan Metzmacher
bdec66f0ed r2010: trigger the config.smb_build.dump output by --enable-*developer not --enable-debug
metze
(This used to be commit ffbfc41033)
2007-10-10 12:58:17 -05:00
Stefan Metzmacher
45a69c44e7 r2005: fix compiler warnings
metze
(This used to be commit 71992c90cc)
2007-10-10 12:58:17 -05:00
Stefan Metzmacher
7d1a0239bb r2004: remove unused file
metze
(This used to be commit 46d5ce350a)
2007-10-10 12:58:16 -05:00
Andrew Tridgell
694ac65faa r2003: got rid of next_token_nr(), which involved some horrible globals
and nasy pointer tricks.

this involved fixing some of the internals of smbclient
(This used to be commit 126fec6169)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
af057bdf84 r2000: remove unused var
metze
(This used to be commit 5d5b651739)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
94b7bf91fe r1999: fix compiler warning
metze
(This used to be commit 8c9c702bc3)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
38188de793 r1998: fix compiler warning
metze
(This used to be commit bf06f476db)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
e89e5eee38 r1997: fix compiler warning
metze
(This used to be commit eb9de893b8)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
b0856b8ad0 r1996: fix compiler warnings
metze
(This used to be commit dd8d68f3ec)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
8460fc7df9 r1995: a ndrdump file from abartlet make it clear that this isn't a pointer
to a uint32, there're two uint32 with 0x00000000

metze
(This used to be commit 80f27766cb)
2007-10-10 12:58:16 -05:00
Stefan Metzmacher
ae95563caf r1994: fix compiler warning
metze
(This used to be commit a3a4b9c9ea)
2007-10-10 12:58:15 -05:00
Andrew Bartlett
aca6a1e1ee r1993: Allow WinXP domain logon to progress a bit further (it seems broken for me).
Fix indent, and add a few more useful debug messages.

Send a fault, if the bind is not accepted - don't just leave the client hanging.

Andrew Bartlett
(This used to be commit 486215edc1)
2007-10-10 12:58:15 -05:00
Andrew Bartlett
0e5260c4f5 r1992: Make the NTLMSSP torture test show more detail, and return failure etc.
Andrew Bartlett
(This used to be commit a8e76085a7)
2007-10-10 12:58:15 -05:00
Andrew Bartlett
39a3d5eedc r1991: After finding a talloc inconsistancy is a very good time to smb_panic(),
it can only indicate programmer error, and doing a smb_panic() ensures
an automatic backtrace (and eventually an abort()).

Andrew Bartlett
(This used to be commit b2d93d0010)
2007-10-10 12:58:15 -05:00
Andrew Bartlett
dcd43a4cbe r1990: Fix breakage caused by the recent talloc changes. (Failure to process
an SPNEGO login from WinXP at least).

talloc_asprintf_append() lost an argument, but because TALLOC_CTX is
now a void*, this was not picked up by the compiler.

I've tested the login (asn1), but not the registry/gtk changes.

Andrew Bartlett
(This used to be commit 4294be4405)
2007-10-10 12:58:15 -05:00
Andrew Tridgell
ca885cb2d1 r1989: fixed a couple of bugs in code that assumes sizeof(time_t) == sizeof(int)
(This used to be commit cc3d420c33)
2007-10-10 12:58:15 -05:00
Paul Green
0be0e8effc r1988: Let Samba use all POSIX features available on VOS.
paulg
(This used to be commit a489ea5ebe)
2007-10-10 12:58:15 -05:00
Tim Potter
ef7c734976 r1986: Janitor for myself. Merge -r1907:1908 from SAMBA_3_0 branch.
(This used to be commit 99f7feec0a)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
b7e1ea20dc r1985: take advantage of the new talloc in a few more places
(This used to be commit 6ffdfd7799)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
b45f4ebbb8 r1984: this change is what you should read to understand the new talloc()
It simplifies our structure handling a lot, making the code shorter
and easier to understand. Look at the diff carefully and see if you
can understand it. If you're still confused then please ask.
(This used to be commit 03c341aca7)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
b83ba93eae r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
(This used to be commit e35bb094c5)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
326f562e72 r1982: i is not initialised or used
(This used to be commit db4bc88f9a)
2007-10-10 12:58:14 -05:00