summaryrefslogtreecommitdiff
path: root/source3/script
Commit message (Collapse)AuthorAgeFilesLines
* selftest: Add test for 'dfree cache'Christof Schmitt2018-06-071-0/+35
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13446 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit a55b3d2fcc2f7737a2702bf908dcf1f80969bf21)
* s3:smbspool: Fix cmdline argument handlingAndreas Schneider2018-05-091-0/+30
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13417 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit a753ccfd946aaad320977ae8c5f483f73077c3f8) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Wed May 9 14:22:22 CEST 2018 on sn-devel-144
* selftest: Add testcase for querying sessions after smbd crashChristof Schmitt2018-05-071-0/+55
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13407 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit e04846c7df8e3eec1f3dbb2fc5eaf47ceb1c44d2)
* s3: tests: Regression test to ensure we can never return a DIRECTORY ↵Jeremy Allison2018-05-071-0/+76
| | | | | | | | | | | | | | | | | | attribute on a stream. Tests streams_xattr and also streams_depot. Inspired from a real-world test case by Andrew Walker <awalker@ixsystems.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 12 02:04:28 CEST 2018 on sn-devel-144 (cherry picked from commit 82beaf868f252c4bc975ddafd80240af6f679b83)
* test_smbclient_s3.sh: Use correct separator in "list with backup privilege" testChristof Schmitt2018-04-111-3/+7
| | | | | | | | | | | | | Samba selftest uses the forward slash as winbind separator and in the USERNAME passed to the test. "net sam rights" expect the backslash. Map the separator used in selftest to a backslash to avoid creating an incorrect username DOMAIN\DOMAIN/USERNAME. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13312 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 6f07afad07d9c670a00d9d314a8134efdda5e424)
* s3:test: Always validate the join after changing the secretAndreas Schneider2018-01-141-3/+4
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Pair-Programmed-With: Ralph Boehme <slow@samba.org>
* s3:tests: Fix test_net_tdb.sh with system tdb-toolsAndreas Schneider2018-01-101-2/+7
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jan 10 18:30:56 CET 2018 on sn-devel-144
* selftest: Add test for failing chdir call in smbdChristof Schmitt2017-12-151-0/+56
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13189 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-selftest: fix creation of large fileJamie McClymont2017-12-091-1/+1
| | | | | | | | | | | | The dd command was skipping the first 20MB of /dev/zero then writing only one, while indending to create a 20MB sparse file. Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Dec 9 02:56:18 CET 2017 on sn-devel-144
* s3: test_smbclient_s3: Fix restore of TZ.Jeremy Allison2017-12-081-2/+2
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3: test_smbclient_s3: Correctly set and unset TZ variable for test.Jeremy Allison2017-12-051-0/+10
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Dec 5 08:55:44 CET 2017 on sn-devel-144
* s3:selftest: add samba3.blackbox.net_rpc_oldjoin testStefan Metzmacher2017-11-181-0/+32
| | | | | | | | | This demonstrates that "net rpc oldjoin" is currently broken. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13149 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbclient: tests: Test "volume" command over SMB1 and SMB2+.Jeremy Allison2017-11-151-0/+31
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13140 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 15 19:50:54 CET 2017 on sn-devel-144
* s3: smbclient: Test we can rename with a name containing.Jeremy Allison2017-10-241-0/+49
| | | | | | | | | | | | | Samba always allowed this anyway, but it's a good place to ensure we don't regress. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13093 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 24 23:32:58 CEST 2017 on sn-devel-144
* s3:tests: Fix the smblcient utimes test in EuropeAndreas Schneider2017-10-201-7/+11
| | | | | | | | 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 Oct 20 03:37:31 CEST 2017 on sn-devel-144
* s3: tests: Add smbclient test for utimes command.Jeremy Allison2017-10-191-0/+67
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* selftest: prevent interpretation of escape sequences in test_give_owner.shRalph Boehme2017-10-141-1/+1
| | | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Oct 14 06:02:50 CEST 2017 on sn-devel-144
* selftest: add some debugging to test_give_owner.shRalph Boehme2017-10-131-2/+22
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Oct 13 01:22:05 CEST 2017 on sn-devel-144
* selftest: tests for change ownership on a fileRalph Boehme2017-10-091-0/+121
| | | | | | | | | | | This test verifies that SEC_STD_WRITE_OWNER only effectively grants take-ownership permissions but NOT give-ownership. The latter requires SeRestorePrivilege privilege. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: fix samba3.blackbox.inherit_owner.default test script ↵Ralph Boehme2017-10-091-6/+11
| | | | | | | | | | | | | test_inherit_owner.sh Grant the test-user SeRestorePrivilege, this is needed for give-ownership operations. And then granting SeRestorePrivilege requires `net`, so add that as an additional argument to the script. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: fix acl_xattr test script test_acl_xattr.shRalph Boehme2017-10-091-2/+2
| | | | | | | | | | The two "nt_affects_chgrp" tests called the wrong function so the function nt_affects_chgrp() was never run. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: fix acl_xattr test: sn-devel unreliable gidRalph Boehme2017-10-091-1/+1
| | | | | | | | | | | | | | | | | | | The "nt_affects_chgrp" kept failing in a full autobuild on sn-devel because the actual gid of the created file as returned by smbclient -c getfacl was reliably the unix gid of my account. It should have been the mapped domusers group for the primary users "Domain Users" group. Running the test individually or even the full set of "samba3.blackbox" tests didn't trigger the error. Looks like an issue with vfs_fake_acls and vfs_xattr_tdb, but I wasn't able to track it down. As the test only really want to ensure that smbcacls -G set the gid to the requested value, just remove the check for the actual initial gid. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: fix acl_xattr test: grep ouput before mungingRalph Boehme2017-10-091-1/+1
| | | | | | | | | | The check of the smbclient getfacl output for presence of a "^# group:" line must be done before munging the saved output with a sed filter. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: fix acl_xattr test: group, not userRalph Boehme2017-10-091-2/+2
| | | | | | | | | | | In nt_affects_chgrp() check for domadmins *group*, not user. This didn't trigger an error as nt_affects_chgrp() isn't actually called, see next commit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: fix acl_xattr test: changing ownerRalph Boehme2017-10-091-1/+2
| | | | | | | | | | | | Don't give ownership to user "force_user" as user "$USERNAME", this would fail with NT_STATUS_INVALID_OWNER, instead just take ownership as user "force_user". Adding a corresponding ACE for "force_user" with FULL rights ensures this works. Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tests/fake_snap: sanitize pathsDavid Disseldorp via samba-technical2017-08-291-3/+16
| | | | | | | | | | | | | | | | | Ensure fake_snap.pl can be run in taint mode (-T), by sanitizing paths and the PATH env. This fixes the following samba3.rpc.fsrvp selftest failures: Insecure dependency in mkdir while running setgid at (eval 2) line 4. snap create failed: NT_STATUS_UNSUCCESSFUL snap create failed for shadow copy of /home/ddiss/isms/samba/st/nt4_dc/share Bug: https://bugzilla.samba.org/show_bug.cgi?id=12988 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 29 04:54:51 CEST 2017 on sn-devel-144
* s3:script: Untaint user supplied data in modprinter.plAndreas Schneider2017-08-241-3/+12
| | | | | | | | | | | | spoolss_SetPrinter fails because of the error produced by modprinter.pl. Perl error: Insecure dependency in open while running setgid at modprinter.pl line 76. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12950 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:tests: Add test for changing the local user password with smbpasswdAndreas Schneider2017-08-231-0/+132
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975 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): Wed Aug 23 17:05:48 CEST 2017 on sn-devel-144
* source3/client: Fix typo in help message displayed by defaultAnoop C S2017-08-071-2/+2
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12936 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:tests: Add tests for smbspool_krb5_wrapperAndreas Schneider2017-07-251-0/+44
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 25 13:17:13 CEST 2017 on sn-devel-144
* s3:tests: Add test for smbspoolAndreas Schneider2017-07-251-0/+109
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:tests: Fix directory creation and deletion of test_nosymlinks()Andreas Schneider2017-07-191-11/+78
| | | | | | | | | | | | This should fix flakey autobuild. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12914 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): Wed Jul 19 11:59:52 CEST 2017 on sn-devel-144
* s3:tests: Fix directory creation and deletion of test_local_symlinks()Andreas Schneider2017-07-191-8/+77
| | | | | | | | | This should fix flakey autobuild. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12914 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbclient: Add a test for the setmode command.Jeremy Allison2017-07-181-0/+51
| | | | | | | | | | | | Tested over SMB1 and SMB2. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12899 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 18 14:05:18 CEST 2017 on sn-devel-144
* s3: drop build_envBernhard M. Wiedemann2017-07-141-41/+0
| | | | | | | | | | | | | | | As a follow up to eedebe2ef1b ("docs-xml: Sort input file list"), this change enables reproducible builds, without the added complexity of https://lists.samba.org/archive/samba-technical/2017-June/121302.html Bug: https://bugzilla.samba.org/show_bug.cgi?id=12906 Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Jul 14 18:48:08 CEST 2017 on sn-devel-144
* selftest: add a test for accessing previous version of directories with ↵Ralph Boehme2017-07-081-0/+23
| | | | | | | | | | | | snapdirseverywhere Bug: https://bugzilla.samba.org/show_bug.cgi?id=12885 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Jul 8 00:33:51 CEST 2017 on sn-devel-144
* s3: tests: Add test for new smbclient "deltree" command.Jeremy Allison2017-07-071-0/+47
| | | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jul 7 13:38:24 CEST 2017 on sn-devel-144
* s3/tests: add a net cache samlogon testRalph Boehme2017-07-041-0/+43
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=12875 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:tests: Do *NOT* flush the complete gencache!Andreas Schneider2017-06-281-10/+15
| | | | | | | | | | | This removes important entries winbindd created during startup! BUG: https://bugzilla.samba.org/show_bug.cgi?id=12868 Pair-Programmed-With: Ralph Boehme <slow@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org>
* s3:test_smbclient_posix_large.sh: there's no posix test to rename to ↵Stefan Metzmacher2017-06-271-0/+0
| | | | | | | test_smbclient_large_file.sh Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:test_acl_xattr.sh: add more assertion about the expected output.Stefan Metzmacher2017-06-271-1/+7
| | | | | | | We should not treat 'test "" = ""' as success. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Revert "s3:test_acl_xattr.sh: use -mNT1 for the 'getfacl' commands"Stefan Metzmacher2017-06-271-6/+6
| | | | | | | | | This reverts commit 4eb29ce3266a8c05047ecf33a98d1dbdbbbd63c6. This will be passed by the caller in a following commit. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:test_acl_xattr.sh: allow passing additional arguments for smbclient and ↵Stefan Metzmacher2017-06-271-2/+4
| | | | | | | | | | smbcacls This will make it possible to test with -mNT1 as well as -mSMB3 in a following patch. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:smbclient: remove unreliable Domain=[...] OS=[Windows 6.1] Server=[...] ↵Stefan Metzmacher2017-06-271-30/+14
| | | | | | | | | | | | | | | | | | | banner On interactive sessions we print the following instead now: Try "help" do get a list of possible commands. smb: > The reason for this is that we don't get these information via SMB2 and the we only get the domain name via some layering violations from the NTLMSSP state. It's better to remove this consitently for all SMB and auth protocol combinations. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:test_smbclient_s3.sh: improve the error handlingStefan Metzmacher2017-06-271-170/+109
| | | | | | | We should directly return if he hit an error. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:test_smbclient_basic.sh: make use of $incdir/common_test_fns.incStefan Metzmacher2017-06-271-20/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:test_smbclient_basic.sh: make use of $ADDARGSStefan Metzmacher2017-06-271-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:tests: Add blackbox test for 'net usershare'Andreas Schneider2017-06-271-0/+82
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3:tests: Do not delete the contets of LOCAL_PATH with tarmode testAndreas Schneider2017-06-271-5/+5
| | | | | | | | | | | The test_smbclient_tarmode.pl test operates on $LOCAL_PATH by default and removes everything. So it deletes all precreated files and directories which the setup_fileserver() function initially set up. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12867 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: smbd: Add regression test for non-wide symlinks to directories fail over ↵Jeremy Allison2017-06-261-0/+55
| | | | | | | | | | | SMB3. Mark as knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12860 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>