1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

3429 Commits

Author SHA1 Message Date
Nadezhda Ivanova
7570577692 s4-openldap: Remove use of talloc_reference in ldb_map_outbound.c
Instead of referencing the values array of the element to the new element, copy them, to
avoid use of talloc_reference and remove a warning of talloc_steal with reference.
The issue is only relevant when openldap backend is used.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-23 18:40:25 -07:00
Howard Chu
93f3aba5e0 Add LDB_MAP_RENDROP option
Like LDB_MAP_RENAME, but drop the attribute if it occurs in an Add request.
Used for distinguishedName attribute, is read-only and generated but for
some bizarre reason AD allows it in an Add request.

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-09-23 18:40:25 -07:00
Howard Chu
d9bf88dc74 Fix SEGV from improperly formed SUBSTRING/PRESENCE filter
Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Simo Sorce <idra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Sep 19 01:42:43 CEST 2013 on sn-devel-104
2013-09-19 01:42:43 +02:00
Howard Chu
6ed5b1c159 Cleanup map return codes
-1 was never a valid LDB return code, just use OPERATIONS_ERROR

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Tue Sep 17 07:51:45 CEST 2013 on sn-devel-104
2013-09-17 07:51:45 +02:00
Andrew Bartlett
f2bccebd91 lib/ldb-samba/ldb_ildap: Also skip special base DNs
This is so we do not search for @REPLCHANGED against ldap

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-09-17 05:56:56 +02:00
Stefan Metzmacher
66d3064333 lib/param: add PROTOCOL_SMB3_02 handling
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-17 04:00:37 +02:00
Andrew Bartlett
347b2c65a4 ldb: Show the type of failing operation in default error message
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-16 19:35:49 +02:00
Björn Jacke
20999fcaa1 tdb: Fix some typos in comments.
Thanks to Stewart A. Levin for reporting.

fixes bug #10136 (Documentation typos).

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Karolin Seeger <kseeger@samba.org>

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Sep 12 13:54:41 CEST 2013 on sn-devel-104
2013-09-12 13:54:41 +02:00
Michael Adam
de3bc10ef6 loadparm: add new parameter "acl allow execute always"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-09-10 23:30:19 +02:00
Jeroen Dekkers
0af09f0179 ldb: Do not build libldb-cmdline when using system ldb.
Cleanup leftover include and linking of libldb-cmdline in
oLschema2ldif. Do not build libldb-cmdline anymore when using the
system ldb, oLschema2ldif was the only reason for building
libldb-cmdline.

Signed-off-by: Jeroen Dekkers <jeroen@dekkers.ch>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 10 12:52:26 CEST 2013 on sn-devel-104
2013-09-10 12:52:26 +02:00
Volker Lendecke
8f4069c7cd tevent: Use talloc_pooled_object for tevent_req_create
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Sep  8 13:39:25 CEST 2013 on sn-devel-104
2013-09-08 13:39:25 +02:00
Volker Lendecke
256d10f579 talloc: Test the pooled object
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-08 11:34:07 +02:00
Volker Lendecke
e82320e519 talloc: Add talloc_pooled_object
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-08 11:34:06 +02:00
Volker Lendecke
20ad6d7aa3 talloc: Allow nested pools.
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-09-08 11:34:06 +02:00
Volker Lendecke
a3d9099d9a talloc: Add a separate pool size
This is necessary to allow talloc pools to be objects on their own. It
is an incompatible change in the sense that talloc_get_size(pool) now
returns 0 instead of the pool size. When the talloc_pooled_object()
call is added, this will start to make sense again.

Maybe we should add a talloc_pool_size call? Or is that overkill?

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-08 11:34:06 +02:00
Volker Lendecke
b87c8fd435 talloc: Put pool-specific data before the chunk
This is a preparation to make talloc pool real objects themselves.

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-09-08 11:34:06 +02:00
Volker Lendecke
9887f387a1 talloc: Introduce __talloc_with_prefix
This will allow to exchange the extra talloc pool header with the
talloc_chunk structure

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-09-08 11:34:06 +02:00
Volker Lendecke
1334c745e1 talloc: Decouple the dual use of chunk->pool
If we want nested pools, we will have pools that are pool members. So
we will have to have a separate "next object" pointer  for pools. As
we have struct talloc_pool_chunk now, this additional pointer does not
affect normal talloc objects.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-08 11:34:06 +02:00
Jeremy Allison
617c647b8e Fix valgrind errors with memmove and talloc pools.
bin/smbtorture //127.0.0.1 local.talloc now runs with no valgrind errors.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 28 02:44:17 CEST 2013 on sn-devel-104
2013-08-28 02:44:16 +02:00
Jeremy Allison
cbfc3efbfd Add simple limited pool tests to test_memlimit().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
3d0f717d43 Remove talloc_memlimit_update(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
8e2a543e08 Inside _talloc_realloc(), keep track of size changes over malloc/realloc/free.
Replace the last use of talloc_memlimit_update() with talloc_memlimit_grow()/
talloc_memlimit_shrink().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
314508dd73 Don't call talloc_memlimit_update() inside _talloc_realloc() when we're just manipulating pool members.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
0fbcfcc824 Fix a conditional check. (size - tc->size > 0) is always true if size and tc->size are unsigned.
Replace with (size > tc->size).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
4386029322 In _talloc_steal_internal(), correctly decrement the memory limit in the source, and increment in the destination.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Jeremy Allison
6bc190d6dd Inside _talloc_free_internal(), always call talloc_memlimit_update_on_free() before we free the real memory.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Jeremy Allison
4dfde7d33e Update memory limits when we call free() on a pool.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Jeremy Allison
a4ebbe73b4 Change __talloc() to only call talloc_memlimit_check()/talloc_memlimit_grow() on actual malloc allocation.
Don't check the memlimit if the allocation was successful from a pool. We already
checked the memory limit when we created the pool.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Jeremy Allison
4159a78ed7 Change _talloc_total_mem_internal() to ignore memory allocated from a pool when calculating limit size.
We must only count normal tallocs, or a talloc pool itself.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Jeremy Allison
7a6beae68e Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().
Callers already account for TC_HDR_SIZE, do not add it twice.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Jeremy Allison
fe790f6cbc Start to fix talloc memlimits with talloc pools.
Add the functions:

talloc_memlimit_grow(), talloc_memlimit_shrink(),
talloc_memlimit_update_on_free().

as replacements for talloc_memlimit_update().
The interface to talloc_memlimit_update() is very
hard to understand and use. The above functions
are (to me) much clearer.

The goal of these changes is to only update
the memlimits on malloc/free/realloc, not
on every pool allocation. That way we only
count pool creation as allocation from any
imposed limits, not allocation from an already
created pool.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:19 -07:00
Günther Deschner
573b455de9 pkgconfig: Do not hardcode library version numbers in pc files.
We control version numbers via 'vnum' from the wscript_build files for all other
libraries.  In case of libndr we already reported a wrong 0.0.1 version via
pkgconfig while in fact the library is versioned as 0.0.2.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Thu Aug 22 20:48:44 CEST 2013 on sn-devel-104
2013-08-22 20:48:44 +02:00
Karolin Seeger
cc82c161bf ntdbtool.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
178023ad72 ntdbrestore.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
20d22f0b9a ntdbdump.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
9bef5aadac ntdbbackup.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
8d021b34b4 ntdb.3.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Rusty Russell
3e11421e74 Man pages for ntdb tools missing
Copied and modified from tdb man pages.  Avoided reproducing API documentation
which is extensively documented in the ntdb.h header already.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10000

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-19 15:57:50 -07:00
Volker Lendecke
cb598ddab6 ldb_map: Fix CID 1034791 Dereference null return value
Add NULL checks

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:27 +12:00
Volker Lendecke
cbb5c1ce39 pyldb: Fix CID 1034792 Dereference null return value
Add a NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:25 +12:00
Volker Lendecke
15bd82550d ldb: Fix CID 1034793 Dereference null return value
Add a proper NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:23 +12:00
Volker Lendecke
0627350458 ldb: Fix a const warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Aug 18 10:26:27 CEST 2013 on sn-devel-104
2013-08-18 10:26:27 +02:00
Volker Lendecke
6c0758219a tevent: Remove a pointless goto
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-16 16:50:23 +02:00
Matthieu Patou
52ec52b677 loadparm: Use the new fully featured kcc by default
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 16 04:44:01 CEST 2013 on sn-devel-104
2013-08-16 04:44:01 +02:00
Volker Lendecke
a39c956315 tevent: Add tevent_received to tevent_req_simple_recv_ntstatus
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12 13:59:53 -07:00
Volker Lendecke
6a081e9919 tevent: Fix tutorial reference
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug 12 09:17:10 CEST 2013 on sn-devel-104
2013-08-12 09:17:10 +02:00
Volker Lendecke
52c51752e8 lib: Remove unused "client_name"
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-12 17:25:49 +12:00
Christian Ambach
07b3a04872 waf: consolidate libintl related checks
consolidate the dealing with functions from libintl and the
handling of checking if libiconv is required or not
to a common place in lib/replace

also add a new samba_intl subsystem that has dependencies
on the appropriate set of libraries (libintl, libintl+libiconv or none)
that can be used as a general dependency by code that depends
on the internationalization libraries

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09 22:46:57 +02:00
Matthieu Patou
0602009b99 pyldb: decrement ref counters on py_results and quiet warnings
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Tue Aug  6 00:32:46 CEST 2013 on sn-devel-104
2013-08-06 00:32:46 +02:00
Volker Lendecke
cae48e9a36 tevent: Add echo server sample code
This is under a deliberately permissive license. I would like people to start
using libtevent and tevent_req (LGPL) without any worries about where to start
from.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Aug  5 04:07:58 CEST 2013 on sn-devel-104
2013-08-05 04:07:57 +02:00