summaryrefslogtreecommitdiff
path: root/source3/script/tests
AgeCommit message (Collapse)AuthorFilesLines
2024-01-20selftest: test listing trusted domains that includes an NT4 domainRalph Boehme1-0/+25
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15533 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-01-20selftest: add a test for NT4 trustsRalph Boehme1-0/+31
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15533 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-01-16testing: case insensitive lookups fail in shadow_copy2 snapshotsVolker Lendecke1-0/+4
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15556 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2024-01-16tests: add a test for "fake directory create times"Björn Jacke1-0/+65
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jan 16 15:44:10 UTC 2024 on atb-devel-224
2024-01-16tests: add test for vfs_wormBjörn Jacke1-0/+121
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-01-16tests: add a test for vfs_recycleBjörn Jacke1-0/+102
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-01-16test_smbget.sh: reduce sleep timeBjörn Jacke1-1/+1
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-01-02shadow_copy: Add test for missing directory in "current" filesetVolker Lendecke1-0/+27
Right now we can't traverse a subdirectory in a snapshot which was deleted in the current set of files. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-12-15s3:selftest: add samba3.blackbox.smbXsrv_client_ctdb_registered_ipsStefan Metzmacher1-0/+159
This demonstrates the crash that happens if a client connects to a non-public address first followed by a connect to public address with the same client_guid and a connection to the non-public address gets disconnected first, we hit by a use-after-free talloc_get_type_abort() called from release_ip() as "xconn" is already gone, taking smbd_release_ip_state with it. Note that we also need to mark some subtests as flapping as there's a 2nd problem that happens in the interaction between smbd processes and ctdb when passing a multichannel connection to an existing process, it means we sometimes loose the 'tickle' information within ctdb to that tcp connection. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2023-12-10s3:tests: Add interactive smbget test for password entryAndreas Schneider1-0/+32
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-10s3:tests: Fix smbget testAndreas Schneider1-4/+4
Time to fix the smget share to not have `guest ok = yes` set. A new [smbget_guest] will be used for guest only tests. This way we can correctly test different authentication mechanisms. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-10s3:tests: Remove the non-working test_kerberos_upn_denied of smbgetAndreas Schneider1-22/+30
See TODO code comment for details. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-10s3:tests: Fix the test_kerberos_trust in smbget testsuiteAndreas Schneider1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-10s3:tests: Fix test_kerberos in smbget testsAndreas Schneider1-1/+5
We switched to a temporary directory, so $PREFIX doesn't exist. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-10s3:tests: Pass down a normal domain user for test_smbget.shAndreas Schneider1-10/+12
It is better to test with a normal user than administrator. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-10s3:tests: Fix authentication with smbget_user in smbget testsAndreas Schneider1-14/+14
Currently the smget share is broken. We set `guest ok = yes` so if you specify invalid names, the authentication will still succeed as we are mapped to guest. The smbget_user is a local ad_member user. We need to set the workstation as the "domain" for the user. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-07s3:tests: Add smbget test for smb://DOAMIN;user%password@server/share/fileAndreas Schneider1-0/+20
This is supported according to the smbget manpage! BUG: https://bugzilla.samba.org/show_bug.cgi?id=15525 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-07smbd: Simplify openat_pathref_fsp_case_insensitive()Volker Lendecke1-6/+6
This is more lines of code, but it's still a simplification. With this patch we don't call the full openat_pathref_fsp() anymore when looking up the last component in filename_convert_dirfsp(), instead we do the direct SMB_VFS_OPENAT(). We don't need the whole complexity of non_widelink_open() for this case, we do know that we have a real non-cwd dirfsp. The other big change that is not obvious just from looking at the patch: This removes the special case for looking up posix symlinks. Before this patch, filename_convert_dirfsp() returned a proper smb_filename but without an attached fsp when a smb1 posix client hits a symlink. This caused all sorts of special case code everywhere. For example smbd_do_qfilepathinfo() needs to cover both cases just for the smb1 posix symlink case. This special-case handling can go now. We can do the path lookup in the smb1-only qpathinfo code and call into the common code with a proper fsp. When hitting a symlink and with O_PATH available, we'll get the symlink opened with an O_PATH fd. Without O_PATH we obviously can't do that, there we get fd=-1 and an indication that we don't have the procfd fallback around. Why all this? I want to present FIFOs (and eventually symlinks) as reparse points as the very next step. Without this patch, there is no real unified way to get the file attributes from disk. Now we can use the proper logic of fdos_mode() everywhere and not rely on special cases for fsp==NULL. This patch also changes some error codes for smb1 posix extensions. I chose to just change the test instead of going after each and every change. As long as we do get an error, I'm willing to accept that we slightly change error path behaviour for this deprecated code. And, I tried to split this up into smaller patches but I failed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-11-02tests: Convert the regression test for bug15505 to pythonVolker Lendecke1-39/+0
The shell version is flapping, but I can't really figure out why. Maybe this version is not flapping, and it also shows the failure if you revert 952d6c2cf48. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-27tests: Get a file through an absolute symlink within a subdirectoryVolker Lendecke1-0/+39
This shows that read_symlink_reparse() is broken when trying to replace an absolute with a relative filename within a share. read_symlink_reparse() is used only in openat_pathref_fsp_nosymlink() so far to chase symlinks for non-lcomp path components. Chasing lcomp symlinks is done through non_widelink_open(), which gets it right. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15505 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-10-17s3:tests: Add smbspool test using kerberos authentication: test_smbspool_krb.shPavel Filipenský1-0/+90
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-10-17s3:tests: The correct name of shell variable is 'samba_smbspool_krb5'Pavel Filipenský1-2/+2
There is no shell variable named 'smbspool_krb5'. Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-10-13s3:script: Remove semicolonsJoseph Sutton2-4/+4
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-25s3:tests: Check if test_smbclient_kerberos.sh was successfulPavel Filipenský1-0/+2
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Mon Sep 25 00:14:47 UTC 2023 on atb-devel-224
2023-09-24s3:tests: Fix syntax error in test_smbclient_kerberos.shPavel Filipenský1-3/+0
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-24s3:tests: Fix init of samba_kdestroy in test_smbclient_kerberos.shPavel Filipenský1-1/+1
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-24s3:tests: test_smbspool.sh should be calling smbspool_argv_wrapperPavel Filipenský1-2/+2
There is no variable named 'smbspool_argv_wrapper', the correct name is 'samba_argv_wrapper'. The smbspool_argv_wrapper was not called from this test till now. Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Sun Sep 24 22:33:07 UTC 2023 on atb-devel-224
2023-09-24s3:tests: Fix smbspool_argv_wrapper.cPavel Filipenský1-1/+1
smbspool_argv_wrapper must copy also the last argument Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-20s3: torture: Add a new SMB2 test: SMB2-PIPE-READ-ASYNC-DISCONNECTJeremy Allison1-0/+38
Shows the server crashes if we open a named pipe, do an async read and then disconnect. Adds knownfail: BUG: https://bugzilla.samba.org/show_bug.cgi?id=15423 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-09-14s3:script: Fix script usage linesJoseph Sutton12-12/+12
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-28sefltest: Add new regression test dfs with widelinks = yesNoel Power1-0/+28
Adds a new test trying to cd into dfs path on share with widelinks enabled, should generate an error (see BUG:) Add a knownfail so CI continues BUG: https://bugzilla.samba.org/show_bug.cgi?id=15435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-07-19s3:script: Fix code spellingAndreas Schneider12-17/+17
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2023-07-05s3:tests: Add rpcclient 'dfsgetinfo' testPavel Filipenský1-0/+7
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15400 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-07-03tests: Enable a few tests for FreeBSDVolker Lendecke16-16/+16
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-06-26tests: Show smbd returns wrong error code when creating on r/o fsVolker Lendecke1-0/+34
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15402 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-06-16s3:tests: Do not export UID_WRAPPER_ROOT in test_smbXsrv_client_cross_node.shAndreas Schneider1-3/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-16s3:tests: Do not export UID_WRAPPER_ROOT in test_smbXsrv_client_dead_rec.shAndreas Schneider1-1/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-16s3:tests: Do not export UID_WRAPPER_ROOT in test_net_machine_accountAndreas Schneider1-3/+12
Just set it for the test. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-16testprogs: Do not export UID_WRAPPER_ROOT in test_net_rpc_oldjoin.shAndreas Schneider1-3/+0
This is already set for smbpasswd. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-01tests: Show that we 100% loop in cli_list_old_recv()Volker Lendecke1-0/+28
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15382 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-05-24CI: add a test that checks the dosmode of symlinksRalph Boehme1-0/+74
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15375 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-05-19tests: Replace iconv(1) UTF-16LE conversion with a python3 callSATOH Fumiyasu1-1/+1
GNU libiconv and its iconv(1) do NOT define 'utf16le' as an alias of 'UTF-16LE' encoding. Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-05-09winbind: Test wbinfo -u with more than 1000 usersVolker Lendecke1-0/+28
winbind asks dcerpc_samr_LookupRids in one batch, where samr.idl has NTSTATUS samr_LookupRids( [in,ref] policy_handle *domain_handle, [in,range(0,1000)] uint32 num_rids, [in,size_is(1000),length_is(num_rids)] uint32 rids[], [out,ref] lsa_Strings *names, [out,ref] samr_Ids *types ); limiting num_rids to 1000 entries. Test this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15366 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-28s3/utils: when encoding ace string use "FA", "FR", "FW", "FX" string rightsNoel Power1-6/+3
prior to this patch rights matching "FA", "FR", "FW", "FX" were outputted as the hex string representing the bit value. While outputting the hex string is perfectly fine, it makes it harder to compare icacls output (which always uses the special string values) Additionally adjust various tests to deal with use of shortcut access masks as sddl format now uses FA, FR, FW & FX strings (like icalcs does) instead of hex representation of the bit mask. adjust samba4.blackbox.samba-tool_ntacl samba3.blackbox.large_acl samba.tests.samba_tool.ntacl samba.tests.ntacls samba.tests.posixacl so various string comparisons of the sddl format now pass Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> [abartlet@samba.org Adapted to new stricter SDDL behaviour around leading zeros in hex numbers, eg 0x001]
2023-04-28s3:test_larg_acl: adapt for the canonical ACE flags formatDouglas Bagnall1-2/+5
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-19s3:tests: Add test that veto files works for hidden filesAndreas Schneider1-0/+25
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15360 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-04-19s3:tests: Create a temporary directory for test_veto_files.shAndreas Schneider1-2/+8
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15360 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-04-12s3:tests: Correct conditionJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-04-12s3:script: Always return a non-zero status code on failureJoseph Sutton2-4/+12
If $expected didn't match $received, these functions would still return zero. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-04-12testprogs: Make testit_expect_failure() return 0 on successJoseph Sutton1-12/+12
This is the behaviour that most existing callers expect, but the function actually returns a non-zero status code in that case. Adjust all callers expecting the opposite behaviour to match. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>