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

3350 Commits

Author SHA1 Message Date
Jeremy Allison
2ec41571a3 Sync tdb with the tdb changes in ctdb. Spoke to tridge about
this. Fixes insidious problem with order n^2 freelist merging.
Jeremy.
(This used to be commit c6609c042b128e7d63eb64cfdfb0f6b65cb59d76)
2008-01-11 15:08:37 -08:00
Günther Deschner
c79ce2ffa3 As long as DsGetDcName is not part of libnetapi, lowercase the fn name.
Guenther
(This used to be commit 19a980f52044a170618629e5b0484c1f6b586e5f)
2008-01-11 15:32:20 +01:00
Günther Deschner
efcf285e27 Fix libnetapi error string callers.
Guenther
(This used to be commit 1ad7a0a361edfa5ac738f011db1d6a9db256ac2c)
2008-01-11 15:28:24 +01:00
Günther Deschner
7a87256cd1 Include some basic headers in netapi.h.
Guenther
(This used to be commit 23b92a6fa57858c8a23c737a9cd00c076ef5dadd)
2008-01-11 15:10:15 +01:00
Günther Deschner
4eed7883bb Refactor libnetapi error string functions a bit.
Guenther
(This used to be commit 3b450a8bcc97b6d03c4b7b9373a3a382c0fcea30)
2008-01-11 15:09:54 +01:00
Volker Lendecke
b7d222c690 Tiny cosmetic fix
(This used to be commit c82c1d462be6ddccd6e395b4a9630df91dacbda2)
2008-01-10 22:12:57 +01:00
Michael Adam
ba2a255282 Move transfer_file and transfer_file_internal to a module of their own.
Also, don't auto-generate prototypes of the (two) exported functions
but make a start in having handwritten prototypes in dedicated header
files (not in includes.h ... :-)

Michael
(This used to be commit 395f29d8b768a56af20b37f185eccdc5f37b68d5)
2008-01-10 14:31:25 +01:00
Michael Adam
386caead47 Reformat some code I just touched.
Michael
(This used to be commit 4ed238b1e46f7680a29ebdbfe9500d16718f9057)
2008-01-10 14:28:12 +01:00
Michael Adam
9f6d0479d7 Fix a really silly typo.
Michael
(This used to be commit 7b0af7cdc97d4bbcbd73a9474871217511b92c3a)
2008-01-10 14:18:46 +01:00
Michael Adam
5661ac6a38 Correctly abstract the transfer_file mechanism with callbacks and void ptrs.
This removes the in_fsp and out_fsp global variables hack from smbd/vfs.c.

Michael
(This used to be commit b2e7cdc6e899ca3c16edbb6c8786ff9aa999fa6e)
2008-01-10 13:30:46 +01:00
Volker Lendecke
9f67ee6334 use talloc_tos() in share_access_check()
(This used to be commit ac2bb838d537ca563ad2fe770b3e1c2fe8b1d9e7)
2008-01-10 13:19:59 +01:00
Volker Lendecke
138954e70e Fix a c++ warning
(This used to be commit ee905a085fff5410d02c3e5fa2664e989de4afd4)
2008-01-10 12:28:20 +01:00
Volker Lendecke
97a50593fe talloc_free_children can only reset pool if it's empty
(This used to be commit 0272b46515b4c4515d5cad8e86fab61d8e91e29e)
2008-01-10 12:28:20 +01:00
Volker Lendecke
4803cc5d3c Mark talloc_pool memory for valgrind
(This used to be commit d89e42f1d2faa018c584025296d6be8195cbcf20)
2008-01-10 12:28:20 +01:00
Volker Lendecke
7579e08599 Form a proper hierarchy in talloc_stack
This way talloc_stackframe() can benefit from a pool put on the stack further
up. No need to remove talloc_stackframe().
(This used to be commit be6fe381168321ae62e079cd977cbef675c532d4)
2008-01-10 09:54:06 +01:00
Jeremy Allison
980ac09849 Fixup hot paths - add macro for toupper (c < 0x80).
This now matches 3.0.x on my micro-tests.
Jeremy.
(This used to be commit 329b924cba8225002ca40db26c45b31d141a0925)
2008-01-09 17:32:26 -08:00
Jeremy Allison
5df6018114 Add the calls to make use of talloc_pools in a talloc_stackframe.
Jeremy.
(This used to be commit d27e6c0548d21394f6399d3b737d175ffed8420d)
2008-01-09 17:07:58 -08:00
Volker Lendecke
1ed4fcb271 Implement talloc_pool()
A talloc pool is a chunk of memory that can be used as a context for further
talloc calls. Allocations with the pool as the parent just chew from that
memory by incrementing a pointer. If the talloc pool is full, then we fall back
to the normal system-level malloc(3) to get memory.

The use case for talloc pools is the transient memory that is used for handling
a single SMB request. Incrementing a pointer will be way faster than any malloc
implementation.

There is a downside of this: If you use talloc_steal() to move something out of
the pool, the whole pool memory is kept around until the last object inside the
pool is freed. So if you talloc_free() the pool, it might happen that the
memory is freed later. So don't hang anything off a talloc pool that should
live long.

Volker
(This used to be commit 287e29d988813007eeebc0c2bef3b46ab8bedee9)
2008-01-09 17:05:19 -08:00
Volker Lendecke
66d6eb27a4 Fix the max_dead_record calculations
(This used to be commit 2a5c53220a5cc2b4a80fc7c6cb38e87789c5e797)
2008-01-09 23:24:30 +01:00
Michael Adam
22068a0c16 Change registry_create_admin_token() to return NTSTATUS.
Michael
(This used to be commit 9cd30fb25c42e79946b5140994d0bf2ef4c62f90)
2008-01-09 01:47:10 +01:00
Michael Adam
f269ed866d Move content of comment.
Michael
(This used to be commit ed4dd00c5ae8e4995ace9326f915ae4bd15d96b3)
2008-01-09 01:47:10 +01:00
Michael Adam
f3603d5a5a Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
Michael
(This used to be commit 6b2b9a60ef857ec31da5fea631535205fbdede4a)
2008-01-09 01:47:10 +01:00
Michael Adam
2e3ac4d3fe Add a comment.
Michael
(This used to be commit 3a4bf4b7c3081048f0d5491dae6610388c268c2f)
2008-01-09 01:35:43 +01:00
Michael Adam
ebb21268df Fix talloctort: move size check after referenced ptr check.
Michael
(This used to be commit 45b219642c529865a898625eeb0433c60b233867)
2008-01-09 01:34:21 +01:00
Volker Lendecke
148f1eee43 Save one popular malloc
(This used to be commit 2150663d9eaf5cdab08de2ad1fcc952d7e85936c)
2008-01-09 00:10:43 +01:00
Volker Lendecke
0af2efcdc4 Don't shrink a talloc area if we have less than 1k to gain
(This used to be commit 28a72ebd4541fb54f284da49081345e54130c75a)
2008-01-09 00:10:16 +01:00
Volker Lendecke
5274d8cda3 Only realloc the talloc stack if necessary
(This used to be commit c7cb98d486ef8af1dc7111c2316fd73db9fef9f8)
2008-01-08 22:18:08 +01:00
Jelmer Vernooij
bfab6ab14b Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit ea36c3add588061cf338deabb2d8952f2213a8bd)
2008-01-08 15:43:11 +01:00
Günther Deschner
67f2afe3c4 Correctly free buffers in netdomjoin-gui.
Guenther
(This used to be commit 04d78d4d9a8cffe44c927036038aef1d6d6b44b2)
2008-01-08 11:59:01 +01:00
Günther Deschner
200bba3ad6 Make name_buffer in NetGetJoinInformation() talloced.
Guenther
(This used to be commit 421905fb608df6736944ac21ac67abee24991521)
2008-01-08 11:59:01 +01:00
Günther Deschner
a01dc30db7 Add NetApiBufferFree() to libnetapi.
Guenther
(This used to be commit c49196954d38f0c2851abbfe25086cd6fe660a2e)
2008-01-08 11:59:01 +01:00
Günther Deschner
ab216a1b4e Fix crash bug when strequal is used too late in libnetapi_free.
Guenther
(This used to be commit ba2b8a310e1d6f78116350e24c17ae4db08b9bed)
2008-01-08 11:59:01 +01:00
Michael Adam
5921607f26 Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().
Michael
(This used to be commit 9296e93588c0e795cae770765050247ac1474a74)
2008-01-08 01:54:19 +01:00
Michael Adam
62e9d503d8 Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().
Michael
(This used to be commit 42663e8736e1a3dfb57e0aafdcbf5fec880da779)
2008-01-07 23:54:07 +01:00
Günther Deschner
e3ea1e1391 Enable talloc reporting in libnetapi if DEVELOPER compiled.
Guenther
(This used to be commit 01e9151546a83e0c772a144efa85437ca0c8a307)
2008-01-07 22:57:30 +01:00
Volker Lendecke
c3c19615c1 make db_tdb_fetch use tdb_parse_record
(This used to be commit 88d82d0623e71ae1ef4f8fdefba10e3a230ea526)
2008-01-07 21:18:12 +01:00
Volker Lendecke
6dc988c918 Change db_tdb_fetch_locked to use only one talloc
(This used to be commit 921c8657e2eeb71d5b9ae2675255a852b26cc30d)
2008-01-07 21:18:07 +01:00
Volker Lendecke
8d261ee580 talloc_stackframe only needs 1 talloc
(This used to be commit c0c2084d40b79e949dab7c68626aa665b9ea1a8e)
2008-01-07 21:18:00 +01:00
Günther Deschner
74fc0bf9e5 In libnetapi example, use libnetapi_get_error_string().
Guenther
(This used to be commit b624db92d61809a44881abbdd09dfa3a74ff7a88)
2008-01-07 20:13:40 +01:00
Günther Deschner
d6659f8ac8 In the local path of NetJoinDomain, try to get error string from libnetjoin.
Guenther
(This used to be commit 0f0f0e13022da584b77e850fec2cef6169e1ac28)
2008-01-07 20:13:26 +01:00
Günther Deschner
751fc874be Add libnetapi_set_error_string and libnetapi_get_error_string.
Guenther
(This used to be commit f8806bad8134d544229c426f58bee143ba752cf8)
2008-01-07 20:13:18 +01:00
Günther Deschner
1b3520db88 Add krb5 cc env to libnetapi_ctx.
Guenther
(This used to be commit df2b078fa1658bdbff1280f7fe0b062d9eabd60c)
2008-01-07 20:13:02 +01:00
Günther Deschner
1fba8c8019 Let libnetapi use it's own krb5 cred cache in memory if necessary.
Guenther
(This used to be commit 863fb30038e384585502f0154a742481594b99d0)
2008-01-07 20:12:38 +01:00
Günther Deschner
528d253cc8 Rearrange order of libnet join context init.
Guenther
(This used to be commit 89669c66f27fb47c9769d1058e29bff83f862752)
2008-01-07 19:38:35 +01:00
Günther Deschner
0b92d8bc79 Free libnet_JoinCtx after joining.
Guenther
(This used to be commit 5abae9ef15fa9884c5c4a0e256274f70f6ecd779)
2008-01-07 19:38:22 +01:00
Günther Deschner
cc1982ab1c Close registry in libnetapi_free().
Guenther
(This used to be commit e7258a4408e40686ff090d0f8e120ce78acbd097)
2008-01-07 19:38:10 +01:00
Günther Deschner
fa1e5e95d5 Add NET_API_STATUS_SUCCESS define.
Guenther
(This used to be commit a72ad63163a8c642ea762087a739e6d63c37647a)
2008-01-07 19:37:54 +01:00
Günther Deschner
02f67cfcfa Add free_local_machine_name().
Guenther
(This used to be commit f3ebb4f96bb0364dae9924e798652e759b63bb52)
2008-01-07 14:53:07 +01:00
Günther Deschner
be7df54c39 Fix two memleaks in libnetapi.
Guenther
(This used to be commit d73bde99e8518607bb78b5625ce5fb1991d8e402)
2008-01-07 12:48:21 +01:00
Günther Deschner
68ec314277 In gfree_debugsyms() free the format_bufr as well.
Guenther
(This used to be commit 48f09ca376f9fc7923309f3466e5d72f7c21a56f)
2008-01-07 12:48:21 +01:00