summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* testsuite: Reformat shell scriptsAndreas Schneider2022-08-101-8/+7
| | | | | | shfmt -f testsuite/ | xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
* s3:rpc_server: Activate samba-dcerpcdVolker Lendecke2021-12-101-1/+1
| | | | | | | | | | | | | | This is the big switch to use samba-dcerpcd for the RPC services in source3/. It is a pretty big and unordered patch, but I don't see a good way to split this up into more manageable pieces without sacrificing bisectability even more. Probably I could cut out a few small ones, but a major architechtural switch like this will always be messy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* unittest: Remove test_sambafs_srv_pipeVolker Lendecke2021-12-102-119/+0
| | | | | | | | | is_known_pipename() will be removed soon Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Don't use sysconf(_SC_NGROUPS_MAX) on macOS for getgroups()Alex Richardson2021-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | On MacOS sysconf(_SC_NGROUPS_MAX) always returns 16. However, this is not the value used by getgroups(2). MacOS uses nested groups but getgroups(2) will return the flattened list which can easily exceed 16 groups. In my testing getgroups() already returns 16 groups on a freshly installed system. And on a 10.14 system the root user is in more than 16 groups by default which makes it impossible to run smbd without this change. Setting _DARWIN_UNLIMITED_GETGROUPS allows getgroups() to return more than 16 groups. This also changes set_unix_security_ctx() to only set up to 16 groups since that is the limit for initgroups() according to the manpage. BUG: https://bugzilla.samba.org/show_bug.cgi?id=8773 Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 9 17:43:19 UTC 2021 on sn-devel-184
* auth3: Remove auth_skel.cVolker Lendecke2021-04-191-10/+0
| | | | | | | | | | | | | | | Authentication is a very complex topic, and someone who is able to write a custom auth module turning a struct auth_usersupplied_info into a struct auth_serversupplied_info should be able to live without this skeleton module. This module also gave an example to load a secondary authentication module via a module parameter (the call to load_module()). We have abandoned this practice, and since the "auth methods" parameter has gone we don't use this anymore internally. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* test: Add a test for background_job_send crashVolker Lendecke2021-04-012-0/+89
| | | | | | | I haven't figured out how to properly add a crashing test to "knownfail", so this is added after the fix. Signed-off-by: Volker Lendecke <vl@samba.org>
* librpc: Make "dcesrv_context->callbacks" a pointerVolker Lendecke2021-03-161-1/+5
| | | | | | | | | This structure just grew from 3 to 6 pointers, avoid making a copy of this. All callers of dcesrv_init_context() have this as a static struct in the C object, so a pointer to that won't change. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* unittests: Mark test binaries for selftestAndreas Schneider2020-10-231-3/+3
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14550 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3: safe_string: do not include string_wrappers.hMatthew DeVore2020-08-281-0/+1
| | | | | | | | | | | | | Rather than have safe_string.h #include string_wrappers.h, make users of string_wrappers.h include it explicitly. includes.h now no longer includes string_wrappers.h transitively. Still allow includes.h to #include safe_string.h for now so that as many modules as possible get the safety checks in it. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server: Retrieve dcesrv_context from parent context to open NPSamuel Cabrero2020-03-201-22/+51
| | | | | | | | | Get the dcesrv_context from parent context and use it to search the endpoint serving the named pipe. Once we have the endpoint pass it to the make_internal_rpc_pipe_socketpair function. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Remove workaround for missing os.path.relpath in Python < 2.6Andrew Bartlett2019-11-131-2/+1
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* unittest: workaround dependency problem in test_lib_util_modulesRalph Boehme2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | waf somehow screws the dependencies and the module ends up with a bunch of missing RPC related symbols once an RPC service has special dependencies like the mdssvc RPC service. $ bin/test_lib_util_modules test: test_samba_module_probe success: test_samba_module_probe test: test_samba_module_probe_dummy Error loading module '/home/samba/src/bin/modules/rpc/test_dummy_module.so': /home/samba/src/bin/modules/rpc/test_dummy_module.so: undefined symbol: rpc_service_mode failure: test_samba_module_probe_dummy [ NT_STATUS_IS_OK(status) ../../testsuite/unittests/test_lib_util_modules.c:39: error: Failure! ] test: test_samba_module_probe_slash success: test_samba_module_probe_slash This is currently not noticed as mdssvc is not enabled in selftest, but that is going to change with a subsequent commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_server: Return NTSTATUS in is_known_pipename functionSamuel Cabrero2019-07-221-6/+6
| | | | | | Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* testsuite: Remove build_farm testsuitesTim Beale2019-03-1263-617/+1
| | | | | | | | | | | | This test code is not run (and has not been run for about a decade). Let's remove it - it's there in the git history if we ever want to try to repurpose it again. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Mar 12 02:56:05 UTC 2019 on sn-devel-144
* testsuite/headers/wscript_build: update to handle waf 2.0.4Alexander Bokovoy2018-09-051-1/+1
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* unittests.lib_util_modules: test module probe with "skel", not "unix"Douglas Bagnall2018-02-221-1/+1
| | | | | | | The unix module is not available as a module on some systems. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* source3: remove sock_execGary Lockyer2017-11-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove the sock_exec code which is no longer needed and additionally has been used by exploit code. This was originally test support code, the tests relying on the sock_exec code have been removed. Past exploits have used sock_exec as a proxy for system() matching a talloc destructor prototype. See for example: Exploit for Samba vulnerabilty (CVE-2015-0240) at https://gist.github.com/worawit/051e881fc94fe4a49295 and the Red Hat post at https://access.redhat.com/blogs/766093/posts/1976553 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-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): Mon Nov 20 07:20:13 CET 2017 on sn-devel-144
* unittests: Fix missing include of signal.hLumir Balhar2017-10-181-0/+1
| | | | | | | | | Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 18 14:24:39 CEST 2017 on sn-devel-144
* testsuite: Fix the 32-bit test buildVolker Lendecke2017-09-211-6/+6
| | | | | | | | | | | | samba_init_module returns 32-bit. For some reason on my 32-bit lxc "return 0" was converted to something but NT_STATUS_OK, making initialization fail. 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): Thu Sep 21 02:49:32 CEST 2017 on sn-devel-144
* unittests: Do not install the test_dummy rpc moduleAndreas Schneider2017-07-051-1/+2
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12879 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 Jul 5 22:21:06 CEST 2017 on sn-devel-144
* unittests: Add missing stdint.h includeAndreas Schneider2017-07-051-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12878 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* unittest: Add testsuite for smb_probe_module()Andreas Schneider2017-06-062-0/+84
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12780 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* unittest: Add testsuite for is_known_pipename()Andreas Schneider2017-06-063-0/+113
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12780 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* third_party: Add cmocka 1.1.1Andreas Schneider2017-04-101-9/+5
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Apr 10 11:38:13 CEST 2017 on sn-devel-144
* waf: disable-python - don't include python.h in test_headers.cIan Stakenvicius2017-03-101-1/+3
| | | | | | | | | Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Mar 10 11:24:13 CET 2017 on sn-devel-144
* waf: Do not install the unit test binary for krb5sambaAndreas Schneider2017-02-131-1/+2
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12552 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Feb 13 14:17:39 CET 2017 on sn-devel-144
* testsuite: Add cmocka unit test for smb_krb5_kt_open()Andreas Schneider2016-12-162-0/+160
| | | | | | | | 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): Fri Dec 16 05:43:12 CET 2016 on sn-devel-144
* Simplify handling of dependencies on external libraries in test_headers.Jelmer Vernooij2016-01-131-11/+2
| | | | Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
* testsuite/headers: remove unused checks for ntdb.hStefan Metzmacher2015-07-211-4/+0
| | | | | | | ntdb is already removed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org>
* autobuild: Remove ntdb targetVolker Lendecke2015-03-171-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Remove ntdb from scriptsVolker Lendecke2015-03-171-4/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* third_party/popt: Initial support for popt.Ira Cooper2014-08-091-1/+1
| | | | | | | ctdb, ldb, and samba are supported builds for third_party popt. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* testsuit: Fix fprintf format.Andreas Schneider2013-11-151-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.Jeremy Allison2012-06-282-4/+4
| | | | | | Will allow thread-specific credentials to be added by modifying the central definitions. Deliberately left the setXX[ug]id() call in popt as this is not used in Samba.
* ntdb: put it back into the build.Rusty Russell2012-06-191-0/+5
| | | | | | | This doesn't do anything with it yet, just wires it back into the build. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* testsuite/libsmbclient: Remove unused and expensive-to-link testsuiteAndrew Bartlett2012-05-02148-11525/+0
| | | | | | | | | | | | | | | This testsuite never got off the ground, and unlike the other libsmbclient tests, it is not integrated into make test, has no driver script we could integrate. As it has been in this state for 10 years, and adding it to the compile did not find any link-time issues (particularly in comparison to the link-time cost for so many individual binaries), I am now removing them. The libsmbclient examples are seperate to this, and remain in examples/libsmbclient. Andrew Bartlett
* testsuite: Replace deprecated bzero with memsetAmitay Isaacs2012-02-29143-347/+347
| | | | | | | | | This fixes build issues on solaris reported in bug #8767. https://bugzilla.samba.org/show_bug.cgi?id=8767 Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Feb 29 10:39:10 CET 2012 on sn-devel-104
* testsuite: Remove unused and unlikely to be revived DejaGNU testsAndrew Bartlett2011-12-1213-907/+0
|
* s3-libsmbclient: make some functions static in testsuite code.Günther Deschner2011-10-25143-159/+159
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Oct 25 17:57:25 CEST 2011 on sn-devel-104
* build: compile (but do not install) all the libsmbclient testsAndrew Bartlett2011-10-201-0/+39
| | | | | Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Oct 20 13:49:39 CEST 2011 on sn-devel-104
* tdb_compat: use tdb_open_compat.Rusty Russell2011-06-201-2/+2
| | | | | | | | | This is a helper for the common case of opening a tdb with a logging function, but it doesn't do all the work, since TDB1 and TDB2's log functions are different types. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3: Remove the smbtorture3 OPLOCK3 testVolker Lendecke2011-05-222-3/+1
| | | | | This is the last user of cli_receive_smb. Oplocks are nowadays tested in smbtorture4, this mainly has historic value
* headers: cope with non-system popt in test_headersAndrew Tridgell2011-03-161-1/+4
| | | | | Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Mar 16 09:09:40 CET 2011 on sn-devel-104
* headers: include Python.h first to avoid warningsAndrew Tridgell2011-03-161-1/+1
|
* build: fixed cflags for test_headerAndrew Tridgell2011-03-151-0/+7
| | | | when using system libraries, we need the right cflags
* build: added automated testing of our public headersAndrew Tridgell2011-03-152-0/+77
| | | | | we generate test_headers.h, which includes all of our public headers, and check it compiles
* s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2010-05-212-6/+6
| | | | | | | | | | This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* testsuite/libsmbclient use source3 in the path of the C and LFLAGSLars Müller2010-01-281-2/+2
|
* Link testsuite/libsmbclient against required libtdb and libwbclientLars Müller2010-01-281-1/+1
|
* s3: add a test to test libsmbclientBo Yang2009-08-082-2/+98
| | | | Signed-off-by: Bo Yang <boyang@samba.org>