summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* krb5_wrap: Remove incorrect absolute path checks in smb_krb5_kt_open_relative()Andreas Schneider2016-12-161-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* krb5_wrap: More checks for absolute path in smb_krb5_kt_open()Andreas Schneider2016-12-161-4/+21
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Add tests for talloc destructor behaviour after talloc_realloc()Andrew Bartlett2016-12-131-1/+66
| | | | | | | | | | | That this behaved correctly was not clear, so I added tests to prove it to myself. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Dec 13 06:47:58 CET 2016 on sn-devel-144
* lib: Remove xfileVolker Lendecke2016-12-113-640/+2
| | | | | | | | | | | | | The days of operating systems with a 255 file descriptor limit on FILE (I'm looking at you Solaris - Solaris 10 finally fixed this) are long gone. 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 Dec 11 15:01:12 CET 2016 on sn-devel-144
* lib: Add fgets_slashVolker Lendecke2016-12-112-0/+84
| | | | | | | | | | Copy x_fgets_slash with conversion to stdio and talloc. Probably I'd do this functionality a bit differently, but for simplicity I chose to make it the same as what is there. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* util: use SCOPE_DELIMITER for the IPv6 scope delimiterBjörn Jacke2016-12-091-4/+4
| | | | | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Dec 9 20:45:15 CET 2016 on sn-devel-144
* replace: make sure we have a SCOPE_DELIMITER defineBjörn Jacke2016-12-091-0/+4
| | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* man pages: change http://samba.org to https://www.samba.orgBjörn Jacke2016-12-097-7/+7
| | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Karolin Seeger <kseeger@samba.org>
* lib/util: Fix indentation within routine description for dbghdrclassAnoop C S2016-12-091-15/+15
| | | | | | | | | Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Dec 9 02:02:36 CET 2016 on sn-devel-144
* lib/util: Fix input arguments description for dbghdrclass() routineAnoop C S2016-12-081-3/+1
| | | | | | Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* tevent: remove shebang from tevent.pyLukas Slebodnik2016-12-081-1/+0
| | | | | | | | | | | | | | | The tevent.py is not a executable python script. And rpmlint consider it as an error if module file contians shebang python2-tevent.x86_64: E: non-executable-script /usr/lib64/python2.7/site-packages/tevent.py 644 /usr/bin/python python3-tevent.x86_64: E: non-executable-script /usr/lib64/python3.5/site-packages/tevent.py 644 /usr/bin/python Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Add minimalist D_* macrosMartin Schwenke2016-12-051-0/+6
| | | | | | | | | | These don't include the function name or any other header. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Dec 5 05:58:48 CET 2016 on sn-devel-144
* libsocket: Make sure ifr.ifr_name is null-terminatedAndreas Schneider2016-12-031-1/+1
| | | | | | | | | | Found by Coverity 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): Sat Dec 3 03:40:53 CET 2016 on sn-devel-144
* util: Initialize pointerAndreas Schneider2016-12-021-1/+1
| | | | | | | Coverity warns about so this will silence it. Reviewed-by: Jeremy Allison <jra@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
* lib: Avoid includes.h in bitmap.cVolker Lendecke2016-12-021-1/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* replace: Include libgen.h if availableAmitay Isaacs2016-12-011-0/+4
| | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Dec 1 18:08:54 CET 2016 on sn-devel-144
* ldb: new ldb version 1.1.29ldb-1.1.29Andrew Bartlett2016-12-014-1/+273
| | | | | | | | | | | - new OID LDB_CONTROL_RECALCULATE_RDN_OID - honour LDB_CONTROL_RECALCULATE_RDN_OID in rdn_modify - fix handling of @ATTRIBUTES containing * in rdn_modify - improve startup performance on AD DC databases - These have lots of index attributes and attributes specified Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Add test for behaviour of rdn_nameAndrew Bartlett2016-12-011-0/+13
| | | | | | | Cover a wildcard in @ATTRIBUTES and the normal case. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Cope with a->name being *Andrew Bartlett2016-12-011-4/+4
| | | | | | | | | | The default schema when loaded from the DB will have a name of *, not NULL. This feature is rarely used, and was incompatible with the rdn_name module until now. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb:rdn_name: add support for LDB_CONTROL_RECALCULATE_RDN_OID on ldb_modify()Stefan Metzmacher2016-12-011-0/+141
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12399 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb:rdn_name: normalize rdn_name in rdn_rename_callback()Stefan Metzmacher2016-12-011-0/+10
| | | | | | | | | | We already do that on 'add'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12399 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: load @ATTRIBUTES faster by sorting once, not at each insertionAndrew Bartlett2016-12-011-8/+69
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Add helper function ldb_schema_attribute_fill_with_syntax()Andrew Bartlett2016-12-012-0/+41
| | | | | | | | This will allow us to avoid calling ldb_schema_attribute_add_with_syntax() in a tight loop. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Reduce per-attribute memory allocation during @ATTRIBUTES loadAndrew Bartlett2016-12-011-1/+4
| | | | | | | This means we do just a few allocations, not multiple per configured attribute (there can be 1000s) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Reduce scope of allocation and de-allocation of @ATTRIBUTESAndrew Bartlett2016-12-012-36/+24
| | | | | | | This memory does not need to be around long-term Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Add helper function ldb_schema_attribute_remove_flagged()Andrew Bartlett2016-12-013-0/+44
| | | | | | | This helps us avoid keeping a list of attributes to later remove on @ATTRIBUTES reload Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb:controls: add LDB_CONTROL_RECALCULATE_RDN_OIDStefan Metzmacher2016-12-011-0/+7
| | | | | | | | | | | | This will be used by 'samba-tool dbcheck' to fix the rdn attribute name. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12399 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (Patch reduced by Andrew Bartlett to only allocate the OID)
* ldb: Avoid individual memory allocations when searching for indexlistAndrew Bartlett2016-12-011-1/+4
| | | | | | | This reduces the talloc_free() cost when the ldb is terminated. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* talloc: Add tests for talloc_parent() after realloc() of the parentAndrew Bartlett2016-12-011-4/+13
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* talloc: clarify that talloc_magic never includes the bits in TALLOC_FLAG_MASKAndrew Bartlett2016-12-011-3/+4
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* talloc: add ASCII art to describe parent/child arrangementAndrew Bartlett2016-12-011-0/+25
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Fix an unused variable warningVolker Lendecke2016-11-301-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* ldb: Fix typosVolker Lendecke2016-11-301-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tdb: version 1.3.12tdb-1.3.12Stefan Metzmacher2016-11-302-1/+71
| | | | | | | | | | * Bug 12455 - tdb mutexes don't work on FreeBSD Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Nov 30 20:02:28 CET 2016 on sn-devel-144
* tdb: Fix mutexes on FreeBSDVolker Lendecke2016-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | susv4 on mmap has the following snippet: > The state of synchronization objects such as mutexes, semaphores, > barriers, and conditional variables placed in shared memory mapped > with MAP_SHARED becomes undefined when the last region in any process > containing the synchronization object is unmapped. This means we can't keep the mutex mmap area unmapped at any point in time. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455 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): Tue Nov 29 23:59:52 CET 2016 on sn-devel-144
* tdb: Only mmap the mutex area if not already mmap'edVolker Lendecke2016-11-291-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: NULL out tdb->mutexes in tdb_mutex_munmapVolker Lendecke2016-11-291-1/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Make sys_rw available to CTDBMartin Schwenke2016-11-291-6/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ldb: version 1.1.28ldb-1.1.28Volker Lendecke2016-11-234-1/+271
| | | | | | | | | | | | | | | * Fix the build with installed ldb-devel 1.1.27 We depend on LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC. * Some build fixes. * More performance improvements. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Nov 23 20:48:31 CET 2016 on sn-devel-144
* pyldb: protect PyErr_LDB_ERROR_IS_ERR_RAISE() with do {} while(0)Stefan Metzmacher2016-11-231-2/+3
| | | | | | | | | | This should avoid the following warning: CID 1394274: Control flow issues (DEADCODE) Execution cannot reach this statement: ";". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib:torture: Make variables constAndreas Schneider2016-11-201-4/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove global xfile.h includesVolker Lendecke2016-11-201-1/+0
| | | | | | | | | | This makes it more obvious where this legacy code is used 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): Sun Nov 20 06:23:19 CET 2016 on sn-devel-144
* lib: Move x_fgets_slash to xfile.cVolker Lendecke2016-11-204-99/+101
| | | | | | | This makes it easier to remove the global #include xfile.h Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Apply an overflow checkVolker Lendecke2016-11-201-3/+11
| | | | | | | | Very unlikely here, as the realloc will have failed long before, but still I would like to check overflow. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Reformat x_fgets_slashVolker Lendecke2016-11-201-64/+68
| | | | | | | | | | This is so old code that I'd like to move somewhere else next, but before that I'd like to clean it up a bit. No code change, just indentation changed and some {} added. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Rename fgets_slash to x_fgets_slashVolker Lendecke2016-11-202-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Avoid includes.h in access.cVolker Lendecke2016-11-161-1/+3
| | | | | | | | 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): Wed Nov 16 22:26:14 CET 2016 on sn-devel-144
* lib: memcache.h needs some includesVolker Lendecke2016-11-161-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib: util: Add allow_access_nolog().Jeremy Allison2016-11-162-5/+22
| | | | | | | | | Make allow_access() call allow_access_nolog(), then log. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Move source3/lib/access.c to toplevel lib/util/access.cJeremy Allison2016-11-163-0/+378
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>