summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* dbwrap_tdb: Avoid a use of talloc_stackframe()Volker Lendecke2019-11-061-10/+10
| | | | | | | For really large keys (that probably don't exist), use dump_data() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/tdb/docs/tracing.txt: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib/replace/xattr.c: typo fixesBjörn Jacke2019-10-311-8/+8
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* replace: Only link libnsl and libsocket if requriredAndreas Schneider2019-10-231-5/+31
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14168 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 23 08:23:13 UTC 2019 on sn-devel-184
* Add fuzzing binary for ldb_parse_treeMichael Hanselmann2019-10-182-0/+57
| | | | | | Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* Add fuzzing binary for ldap_decodeMichael Hanselmann2019-10-182-0/+63
| | | | | | Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* Add fuzzing binary for lzxpressMichael Hanselmann2019-10-182-0/+42
| | | | | | Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* Add fuzzing binary for regfioMichael Hanselmann2019-10-182-0/+75
| | | | | | | | | Checksums are better ignored during fuzzing, hence a flag is added to the regfio parser to disable checksums. Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* Add fuzzing binary for reg_parseMichael Hanselmann2019-10-182-0/+54
| | | | | | | | A temporary file is used to store the fuzzing input. Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* audit_logging: Don't spam the logs if dsdb_event is not foundAndreas Schneider2019-10-141-5/+4
| | | | | | | | | | This gets only registered by our tests. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 14 07:41:52 UTC 2019 on sn-devel-184
* lib:krb5_wrap: Do not create a temporary file for MEMORY keytabsAndreas Schneider2019-10-121-11/+8
| | | | | | | | | | | | | The autobuild cleanup script fails with: The tree has 3 new uncommitted files!!! git clean -n Would remove MEMORY:tmp_smb_creds_SK98Lv Would remove MEMORY:tmp_smb_creds_kornU6 Would remove MEMORY:tmp_smb_creds_ljR828 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:mdssvc: add Elasticsearch backendRalph Boehme2019-10-092-0/+2
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* replace: Improve sys/sysctl.h check to catch warning on glibc >= 2.30Andreas Schneider2019-10-071-1/+12
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 7 11:48:24 UTC 2019 on sn-devel-184
* lib/replace: Remove libaio supportVolker Lendecke2019-10-043-34/+1
| | | | | | | | | | | io_uring is the way to go these days, libaio was never really useful for Samba 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 Oct 4 18:18:41 UTC 2019 on sn-devel-184
* lib: Fix a typoVolker Lendecke2019-10-021-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib: Remove some unneeded #includes from tftw.cVolker Lendecke2019-10-021-13/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib/talloc: clang: Fix 'Value stored during its initialization is never read'Noel Power2019-09-261-1/+1
| | | | | | | | | | | | Fixes: ib/talloc/pytalloc_util.c:245:8: warning: Value stored to 'type_obj' during its initialization is never read <--[clang] void *type_obj = talloc_check_name(ptr, type_name); ^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* waf:replace: Do not link against libpthread if not necessaryAndreas Schneider2019-09-251-4/+6
| | | | | | | | | | | | | | | On Linux we should avoid linking everything against libpthread. Symbols used my most application are provided by glibc and code which deals with threads has to explicitly link against libpthread. This avoids setting LDFLAGS=-pthread globally. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140 Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Isaac Boukris <iboukris@gmail.com> Pair-Programmed-With: Isaac Boukris <iboukris@gmail.com> Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* pthreadpool: Only link pthreadpool against librt if we have toAndreas Schneider2019-09-251-1/+6
| | | | | | | | | | | | | | This calls clock_gettime() which is available in glibc on Linux. If the wscript in libreplace detected that librt is needed for clock_gettime() we have to link against it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140 Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Isaac Boukris <iboukris@gmail.com> Pair-Programmed-With: Isaac Boukris <iboukris@gmail.com> Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* replace: Only link against librt if really neededAndreas Schneider2019-09-251-3/+21
| | | | | | | | | | | | | | fdatasync() and clock_gettime() are provided by glibc on Linux, so there is no need to link against librt. Checks have been added so if there are platforms which require it are still functional. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140 Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Isaac Boukris <iboukris@gmail.com> Pair-Programmed-With: Isaac Boukris <iboukris@gmail.com> Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* krb5_wrap: let smb_krb5_parse_name() accept enterprise principalsStefan Metzmacher2019-09-241-0/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14124 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* krb5_wrap: smb_krb5_kinit_password_ccache() should always use the ↵Stefan Metzmacher2019-09-241-2/+0
| | | | | | | | | | | | | | | canonicalized principal We should always use krb5_get_init_creds_opt_set_canonicalize() and krb5_get_init_creds_opt_set_win2k() for heimdal and expect the client principal to be changed. There's no reason to have a different logic between MIT and Heimdal. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14124 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* fault.c: improve fault_report message text pointing to our wikiBjörn Jacke2019-09-231-1/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14139 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* replace: Remove crypt() reimplementationAndrew Bartlett2019-09-193-776/+0
| | | | | | | | | | | | | | | | | | | | Use of Samba with plaintext authenticaiton is incredibly rare, even more rare is plaintext authentication on systems without a crypt() call and where DES based crypt() would be the right thing to do. Remove this additional cryptographic code per our current efforts to rely entirely on external libraries instead. Similar to the arguments in this thread about zlib discussed on samba-technical here: https://lists.samba.org/archive/samba-technical/2019-May/133476.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Sep 19 09:28:21 UTC 2019 on sn-devel-184
* lib: Add talloc_full_report_printf()Volker Lendecke2019-09-183-0/+145
| | | | | | | | | | Print the talloc full report into a FILE*. talloc itself provides a very similar function, talloc_report_full(). However, that has a slightly different output, in particular it does not print the contents of strings, which is very handy for debugging. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Allow a 4th lock orderVolker Lendecke2019-09-172-2/+3
| | | | | | | We will have another tdb soon Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use server_id_cmp() in server_id_equal()Volker Lendecke2019-09-171-13/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add server_id_cmp()Volker Lendecke2019-09-172-0/+18
| | | | | | | Will be used later for sorting the share mode array Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Remove tests for getdents() and getdirentries()Andrew Bartlett2019-09-171-1/+1
| | | | | | | | | | | | | | | | These date back to 3a9beef2b7b25427ee4611cfc375e05cc82a1150 in 2003 and 829e72fe9c97feaa3d45b768984a4c47b906a23a in 1998 and appear to be related to smbwrapper. More of these should be removed but the getdirents() test caused a timeout on an ARM builder in Debian. It might just be a fluke but the tests are pointless regardless. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Sep 17 13:48:18 UTC 2019 on sn-devel-184
* lib/replace/wscript: Avoid generating nested main functionKhem Raj2019-09-171-0/+1
| | | | | | | | | | clang is not happy when it sees another main nested inside the main function and fails the test for prctl syscall, therefore avoid adding implicit main() here Signed-off-by: Khem Raj <raj.khem@gmail.com> Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* whitespace: Conform to coding conventionGarming Sam2019-09-131-1/+1
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Fri Sep 13 12:33:32 UTC 2019 on sn-devel-184
* param: Allow rpc server dynamic port range to roundtripGarming Sam2019-09-131-0/+14
| | | | | | | | | | Originally this parameter only set two other parameters, but never set the original string. By setting the string as well, we can make it be emitted by testparm -v correctly (instead of ''), and set it back as the value for the parameter. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* dbwrap: Initialize state in dbwrap_delete()Volker Lendecke2019-09-101-1/+1
| | | | | | | | Probably not required, but looks safer and gives static checkers less reason to complain about potentially uninitialized variable reads Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove an obsolete commentVolker Lendecke2019-09-101-4/+0
| | | | | | | At least as of 2ac9d0afa66 ctdb does not care about db prios anymore Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: add round_timespec_to_nttime()Ralph Boehme2019-09-102-0/+10
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib/torture: protect torture_assert[_goto]() with a do { } while(0) blockStefan Metzmacher2019-09-101-4/+6
| | | | | | | | | | This hopefully fixes a lot of coverity defects like: Control flow issues (DEADCODE) Execution cannot reach this statement: ";". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: Release tevent 0.10.1tevent-0.10.1Stefan Metzmacher2019-09-042-1/+127
| | | | | | | | | | | * Update waf to version 2.0.17 in order to fix the build with python 3.8. * Other minor build fixes. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Sep 4 11:47:04 UTC 2019 on sn-devel-184
* Spelling fixes s/preceeding/preceding/Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* Spelling fixes s/implentation/implementation/Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* Spelling fixes s/ ot / to /Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* Spelling fixes s/recieved/received/Mathieu Parent2019-09-011-2/+2
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* Spelling fixes s/avaiable/available/Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* Spelling fixes s/hierachy/hierarchy/Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* Spelling fixes s/convertion/conversion/Mathieu Parent2019-09-012-3/+3
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* replace/setxattr: correctly use our flags on DarwinBjörn Jacke2019-08-291-4/+2
| | | | | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Björn Jacke <bjacke@samba.org> Autobuild-Date(master): Thu Aug 29 17:10:32 UTC 2019 on sn-devel-184
* xattr/setxattr: fix flag support on AIXBjörn Jacke2019-08-291-2/+30
| | | | | | | AIX requires the flags to be 0, we need to do those checks manually. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replace/setxattr: set reasonable and unified errno value in case the EA ↵Björn Jacke2019-08-291-13/+41
| | | | | | | | | | value was too big FreeBSD and AIX already set errno to ENAMETOOLONG, this is what we should map other platforms also to to finally map to the correct NT error code also. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: Extend the ldb_dn_explode test matrixAndrew Bartlett2019-08-271-4/+49
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14049 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* ldb: Do not read beyond the end of the extended DN component when printingAndrew Bartlett2019-08-271-4/+8
| | | | | | | | | The print functions used in Samba NULL terminate, but do not assume they will BUG: https://bugzilla.samba.org/show_bug.cgi?id=14049 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* ldb: Add test with == true or false to boolean if statements in ldb_dn_explode()Andrew Bartlett2019-08-271-16/+16
| | | | | | | | | | | | | | This is beyond the normal level of clarity we expect in Samba, and is of course rudundent, but this is a complex routine that has confusing tests, some of pointers and some of boolean state values. This tries to make the code as clear as possible pending a more comprehensive rewrite. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14049 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>