summaryrefslogtreecommitdiff
path: root/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2025-10-17Add missing include needed for cmocka.hAndreas Schneider2-0/+2
This will be required in future. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2022-08-10testsuite: Reformat shell scriptsAndreas Schneider1-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>
2021-12-10s3:rpc_server: Activate samba-dcerpcdVolker Lendecke1-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>
2021-12-10unittest: Remove test_sambafs_srv_pipeVolker Lendecke2-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>
2021-09-09Don't use sysconf(_SC_NGROUPS_MAX) on macOS for getgroups()Alex Richardson1-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
2021-04-19auth3: Remove auth_skel.cVolker Lendecke1-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>
2021-04-01test: Add a test for background_job_send crashVolker Lendecke2-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>
2021-03-16librpc: Make "dcesrv_context->callbacks" a pointerVolker Lendecke1-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>
2020-10-23unittests: Mark test binaries for selftestAndreas Schneider1-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>
2020-08-28s3: safe_string: do not include string_wrappers.hMatthew DeVore1-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>
2020-03-20s3:rpc_server: Retrieve dcesrv_context from parent context to open NPSamuel Cabrero1-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>
2019-11-13build: Remove workaround for missing os.path.relpath in Python < 2.6Andrew Bartlett1-2/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-08-08unittest: workaround dependency problem in test_lib_util_modulesRalph Boehme1-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>
2019-07-22s3:rpc_server: Return NTSTATUS in is_known_pipename functionSamuel Cabrero1-6/+6
Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-03-12testsuite: Remove build_farm testsuitesTim Beale63-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
2018-09-05testsuite/headers/wscript_build: update to handle waf 2.0.4Alexander Bokovoy1-1/+1
Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-22unittests.lib_util_modules: test module probe with "skel", not "unix"Douglas Bagnall1-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>
2017-11-20source3: remove sock_execGary Lockyer1-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
2017-10-18unittests: Fix missing include of signal.hLumir Balhar1-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
2017-09-21testsuite: Fix the 32-bit test buildVolker Lendecke1-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
2017-07-05unittests: Do not install the test_dummy rpc moduleAndreas Schneider1-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
2017-07-05unittests: Add missing stdint.h includeAndreas Schneider1-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>
2017-06-06unittest: Add testsuite for smb_probe_module()Andreas Schneider2-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>
2017-06-06unittest: Add testsuite for is_known_pipename()Andreas Schneider3-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>
2017-04-10third_party: Add cmocka 1.1.1Andreas Schneider1-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
2017-03-10waf: disable-python - don't include python.h in test_headers.cIan Stakenvicius1-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
2017-02-13waf: Do not install the unit test binary for krb5sambaAndreas Schneider1-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
2016-12-16testsuite: Add cmocka unit test for smb_krb5_kt_open()Andreas Schneider2-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
2016-01-13Simplify handling of dependencies on external libraries in test_headers.Jelmer Vernooij1-11/+2
Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
2015-07-21testsuite/headers: remove unused checks for ntdb.hStefan Metzmacher1-4/+0
ntdb is already removed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org>
2015-03-17autobuild: Remove ntdb targetVolker Lendecke1-0/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17Remove ntdb from scriptsVolker Lendecke1-4/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-09third_party/popt: Initial support for popt.Ira Cooper1-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>
2013-11-15testsuit: Fix fprintf format.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2012-06-28Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.Jeremy Allison2-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.
2012-06-19ntdb: put it back into the build.Rusty Russell1-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>
2012-05-02testsuite/libsmbclient: Remove unused and expensive-to-link testsuiteAndrew Bartlett148-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
2012-02-29testsuite: Replace deprecated bzero with memsetAmitay Isaacs143-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
2011-12-12testsuite: Remove unused and unlikely to be revived DejaGNU testsAndrew Bartlett13-907/+0
2011-10-25s3-libsmbclient: make some functions static in testsuite code.Günther Deschner143-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
2011-10-20build: compile (but do not install) all the libsmbclient testsAndrew Bartlett1-0/+39
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Oct 20 13:49:39 CEST 2011 on sn-devel-104
2011-06-20tdb_compat: use tdb_open_compat.Rusty Russell1-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>
2011-05-22s3: Remove the smbtorture3 OPLOCK3 testVolker Lendecke2-3/+1
This is the last user of cli_receive_smb. Oplocks are nowadays tested in smbtorture4, this mainly has historic value
2011-03-16headers: cope with non-system popt in test_headersAndrew Tridgell1-1/+4
Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Mar 16 09:09:40 CET 2011 on sn-devel-104
2011-03-16headers: include Python.h first to avoid warningsAndrew Tridgell1-1/+1
2011-03-15build: fixed cflags for test_headerAndrew Tridgell1-0/+7
when using system libraries, we need the right cflags
2011-03-15build: added automated testing of our public headersAndrew Tridgell2-0/+77
we generate test_headers.h, which includes all of our public headers, and check it compiles
2010-05-21s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2-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>
2010-01-28testsuite/libsmbclient use source3 in the path of the C and LFLAGSLars Müller1-2/+2
2010-01-28Link testsuite/libsmbclient against required libtdb and libwbclientLars Müller1-1/+1