summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
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>
2013-08-06pyldb: decrement ref counters on py_results and quiet warningsMatthieu Patou1-0/+4
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-05tevent: Add echo server sample codeVolker Lendecke1-0/+664
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-01tevent: change version to 0.9.19Stefan Metzmacher2-1/+84
* Fix tevent testsuite issue on Solaris. * Add tevent tuturial and documentation updates * Fix Coverity ID 989236 Operands don't affect result * Bug: https://bugzilla.samba.org/show_bug.cgi?id=10012 Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Aug 1 17:05:02 CEST 2013 on sn-devel-104
2013-08-01tevent: Remove the signal pipe if no signal events are aroundVolker Lendecke1-1/+13
It makes adding/removing the first/last sigevents a bit more expensive, but it will fix tevent_loop_wait not finishing when one signal event was added and removed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10012 Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-07-22tdb: Fix CID 1034959 Uninitialized scalar variableVolker Lendecke1-1/+1
log_ctx.log_private was used uninitialized. Not a real bug here, as tdb_log does not access it, but tdb_open_ex still moves around uninitialized data. So this would show up in valgrind as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-22tdb: Fix CID 1034960 Uninitialized scalar variableVolker Lendecke1-1/+1
log_ctx.log_private was used uninitialized. Not a real bug here, as tdb_log does not access it, but tdb_open_ex still moves around uninitialized data. So this would show up in valgrind as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-17Fix bug 10025 - Lack of Sanity Checking in calls to malloc()/calloc().Bill Parker5-0/+62
In reviewing various files in Samba-4.0.7, I found a number of instances where malloc()/calloc() were called without the checking the return value for a value of NULL, which would indicate failure. (NB. The changes needed to ccan, iniparser, popt and heimdal will be reported upstream, not patched inside Samba). Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Source <idra@samba.org>
2013-07-11ccan: Fix calling memset with zero length parameterVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jul 11 16:55:49 CEST 2013 on sn-devel-104
2013-07-09lib/param: sync debug related options with source3/paramStefan Metzmacher1-1/+17
The most important change is "debug hires timestamp = Yes" and "syslog = 1". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Tue Jul 9 17:15:15 CEST 2013 on sn-devel-104
2013-07-09lib/ldb-samba: only debug LDB_DEBUG_TRACE at level 10Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de>
2013-07-09lib/ldb-samba: make use of DBGC_LDBStefan Metzmacher1-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de>
2013-07-09lib/util: add 'ldb' debug classStefan Metzmacher2-1/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de>
2013-07-08tevent: document tevent_req_create state zeroingDavid Disseldorp1-3/+3
Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 8 20:43:49 CEST 2013 on sn-devel-104
2013-07-05time: prefer CLOCK_BOOTTIME for clock_gettime_mono()Björn Jacke1-2/+12
this clock moves on while the machine was suspended. This is what we prefer actually. Signed-off-by: Björn Jacke <bj@sernet.de> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Jul 5 16:47:34 CEST 2013 on sn-devel-104
2013-07-05time: don't try to use the coarse clockBjörn Jacke1-9/+2
as we prefer to use the suspend aware CLOCK_BOOTTIME as monotonic clock source we cannot deal with the mono coarse clock any more. Actually I never saw a real performance gain with it. Signed-off-by: Björn Jacke <bj@sernet.de> Reviewed-by: Simo Sorce <idra@samba.org>
2013-07-05tevent: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Fri Jul 5 11:10:07 CEST 2013 on sn-devel-104
2013-07-01tsocket: Pass the full port number to getaddrinfo().Andreas Schneider1-1/+1
The code stripped port numbers above 9999 down to 4 digits. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jul 1 21:10:53 CEST 2013 on sn-devel-104
2013-06-24ldb: bump version to allow a depencency on the substring crash fixAndrew Bartlett3-1/+265
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-24ldb: Cope with substring match with no chunks in ldb_filter_from_treeAndrew Bartlett1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-24build: Remove the struct MD5Context conf file check.Andrew Bartlett1-1/+0
Fix the build. Reviewed-by: Jeremy Allison <jra@samba.org> Tested-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Mon Jun 24 14:11:09 CEST 2013 on sn-devel-104
2013-06-22ldb: Ensure not to segfault on a filter such as (mail=)Andrew Bartlett1-0/+5
As reported by Robin McCorkell <xenopathic@gmail.com> triggered by Mozilla Thunderbird as an LDAP client. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Jun 22 09:33:14 CEST 2013 on sn-devel-104
2013-06-21Fix some blank line endingsVolker Lendecke1-4/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jun 21 19:57:06 CEST 2013 on sn-devel-104
2013-06-19build: Build with system md5.h on OpenIndianaAndrew Bartlett6-8/+9
This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
2013-06-14tsocket: Add some constVolker Lendecke2-3/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-06-14genrand: Slightly simplify do_reseedVolker Lendecke1-13/+11
The only caller set "use_fd" to "true". Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 14 20:29:56 CEST 2013 on sn-devel-104
2013-06-14tevent: Fix Coverity ID 989236 Operands don't affect resultVolker Lendecke1-1/+1
"unsigned" could be less than uint64_t, so idx==UINT64_MAX is always false. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-12tevent: Link the tutorial on the mainpage.Andreas Schneider2-157/+535
Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jun 12 19:54:30 CEST 2013 on sn-devel-104
2013-06-12tevent: Add tevent tutorial files.David Koňař8-0/+1034
Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-06-12krb5wrap: Move mask to the right position.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>