summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-10-10ldb:rdn_name: reject 'distinguishedName' depending of the MOD flagsStefan Metzmacher1-2/+8
This is what Windows 2008 R2 returns: LDB_MOD_ADD => LDB_ERR_UNWILLING_TO_PERFORM LDB_MOD_REPLACE => LDB_ERR_CONSTRAINT_VIOLATION LDB_MOD_DEL => LDB_ERR_UNWILLING_TO_PERFORM Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-08lib/util: remove unused (and not even compiled) lib/util/capability.c.Günther Deschner1-103/+0
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Oct 8 17:32:59 CEST 2013 on sn-devel-104
2013-09-23s4-openldap: Remove use of talloc_reference in ldb_map_outbound.cNadezhda Ivanova1-9/+13
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-23Add LDB_MAP_RENDROP optionHoward Chu4-8/+23
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-19Fix SEGV from improperly formed SUBSTRING/PRESENCE filterHoward Chu1-1/+1
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-17Cleanup map return codesHoward Chu1-18/+17
-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-17lib/ldb-samba/ldb_ildap: Also skip special base DNsAndrew Bartlett1-0/+3
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-17lib/param: add PROTOCOL_SMB3_02 handlingStefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-16ldb: Show the type of failing operation in default error messageAndrew Bartlett1-1/+26
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-12tdb: Fix some typos in comments.Björn Jacke2-5/+5
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-10loadparm: add new parameter "acl allow execute always"Michael Adam2-0/+11
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-09-10ldb: Do not build libldb-cmdline when using system ldb.Jeroen Dekkers1-4/+4
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-08tevent: Use talloc_pooled_object for tevent_req_createVolker Lendecke1-1/+4
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-08talloc: Test the pooled objectVolker Lendecke1-0/+36
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-08talloc: Add talloc_pooled_objectVolker Lendecke5-1/+174
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-08talloc: Allow nested pools.Volker Lendecke3-24/+52
Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
2013-09-08talloc: Add a separate pool sizeVolker Lendecke1-12/+23
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-08talloc: Put pool-specific data before the chunkVolker Lendecke1-79/+125
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-08talloc: Introduce __talloc_with_prefixVolker Lendecke1-10/+22
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-08talloc: Decouple the dual use of chunk->poolVolker Lendecke1-25/+23
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-08-28Fix valgrind errors with memmove and talloc pools.Jeremy Allison1-0/+21
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-27Add simple limited pool tests to test_memlimit().Jeremy Allison1-0/+27
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Remove talloc_memlimit_update(). No longer used.Jeremy Allison1-24/+0
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Inside _talloc_realloc(), keep track of size changes over malloc/realloc/free.Jeremy Allison1-4/+15
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-27Don't call talloc_memlimit_update() inside _talloc_realloc() when we're just ↵Jeremy Allison1-15/+0
manipulating pool members. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Fix a conditional check. (size - tc->size > 0) is always true if size and ↵Jeremy Allison1-1/+1
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-27In _talloc_steal_internal(), correctly decrement the memory limit in the ↵Jeremy Allison1-12/+5
source, and increment in the destination. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Inside _talloc_free_internal(), always call talloc_memlimit_update_on_free() ↵Jeremy Allison1-23/+4
before we free the real memory. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Update memory limits when we call free() on a pool.Jeremy Allison1-0/+2
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Change __talloc() to only call ↵Jeremy Allison1-12/+9
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-27Change _talloc_total_mem_internal() to ignore memory allocated from a pool ↵Jeremy Allison1-1/+8
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-27Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().Jeremy Allison1-1/+1
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-27Start to fix talloc memlimits with talloc pools.Jeremy Allison1-0/+72
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-22pkgconfig: Do not hardcode library version numbers in pc files.Günther Deschner2-2/+2
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-21ntdbtool.8.xml: Bump version up to 4.1.Karolin Seeger1-1/+1
Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21ntdbrestore.8.xml: Bump version up to 4.1.Karolin Seeger1-1/+1
Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21ntdbdump.8.xml: Bump version up to 4.1.Karolin Seeger1-1/+1
Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21ntdbbackup.8.xml: Bump version up to 4.1.Karolin Seeger1-1/+1
Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21ntdb.3.xml: Bump version up to 4.1.Karolin Seeger1-1/+1
Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-19Man pages for ntdb tools missingRusty Russell6-5/+708
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-19ldb_map: Fix CID 1034791 Dereference null return valueVolker Lendecke1-0/+6
Add NULL checks Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19pyldb: Fix CID 1034792 Dereference null return valueVolker Lendecke1-0/+4
Add a NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19ldb: Fix CID 1034793 Dereference null return valueVolker Lendecke1-0/+4
Add a proper NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-18ldb: Fix a const warningVolker Lendecke2-3/+3
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-16tevent: Remove a pointless gotoVolker Lendecke1-4/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-16loadparm: Use the new fully featured kcc by defaultMatthieu Patou1-0/+1
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-12tevent: Add tevent_received to tevent_req_simple_recv_ntstatusVolker Lendecke1-5/+8
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12tevent: Fix tutorial referenceVolker Lendecke1-5/+3
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-12lib: Remove unused "client_name"Volker Lendecke1-1/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09waf: consolidate libintl related checksChristian Ambach1-10/+36
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>