summaryrefslogtreecommitdiff
path: root/source4/setup/tests
AgeCommit message (Collapse)AuthorFilesLines
2023-09-14s4:setup: Fix script usage lineJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-22samba-tool: let 'domain provision' to use the 2019 schema by defaultStefan Metzmacher1-5/+25
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-02-08selftest: Expect setting domain-local group as primary group to failJoseph Sutton1-2/+1
This will no longer be allowed. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-12-23s4:setup:tests: Use system ldbdump if we build with system ldbAndreas Schneider1-1/+4
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): Fri Dec 23 15:31:31 UTC 2022 on sn-devel-184
2022-08-22s4:setup: Fix shellcheck errors in provision_fileperms.shAndreas Schneider1-5/+3
source4/setup/tests/provision_fileperms.sh:27:14: error: Iterating over ls output is fragile. Use globs. [SC2045] Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2022-07-15s4:setup: Reformat shell scriptsAndreas Schneider10-155/+162
shfmt -f source4/setup/ | xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2021-11-09CVE-2020-25722 blackbox/upgrades tests: ignore SPN for ldapcmpDouglas Bagnall1-4/+4
We need to have the SPNs there before someone else nabs them, which makes the re-provisioned old releases different from the reference versions that we keep for this comparison. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14564 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-11-09CVE-2020-25722 tests: blackbox samba-tool spn non-admin testDouglas Bagnall1-0/+2
It is soon going to be impossible to add duplicate SPNs (short of going behind DSDB's back on the local filesystem). Our test of adding SPNs on non-admin users doubled as the test for adding a duplicate (using --force). As --force is gone, we add these tests on Guest after the SPN on Administrator is gone. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14564 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-11-09CVE-2020-25722 samba-tool spn add: remove --force optionDouglas Bagnall1-4/+1
This did not actually *force* the creation of a duplicate SPN, it just ignored the client-side check for the existing copy. Soon we are going to enforce SPN uniqueness on the server side, and this --force will not work. This will make the --force test fail, and if that tests fail, so will others that depend the duplicate values. So we remove those tests. It is wrong-headed to try to make duplicate SPNs in any case, which is probably why there is no sign of anyone ever having used this option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14564 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-29s4:samba: Migrate samba daemon to new cmdline option parserAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28tests: Use --configfile instead of -sAndreas Schneider3-8/+8
We should use long options in tests to make clear what we are trying to do. Also the -s short option will be removed for --configfile later. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28tests: Use ldbsearch '--scope instead of '-s'Andreas Schneider1-2/+2
We should use long options in tests to make clear what we are trying to do. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-26test samba-tool group listmembers: test listing contacts as group membersBjörn Baumbach1-0/+9
Make sure that contacts are listed as group members, even if the --hide-expired option is used. Expect failure. Fix follows up. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14692 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Rowland penny <rpenny@samba.org>
2020-01-21selftest: add test for samba-tool groupmember --member-base-dn optionBjörn Baumbach1-0/+7
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-21selftest: add tests for samba-tool group addmembers --object-types optionBjörn Baumbach1-1/+59
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-21selftest: add test for new samba-tool group addmembers --member-dn optionBjörn Baumbach1-0/+46
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-21samba-tool tests: add test-case for 'user getgrouops --full-dn'Björn Baumbach1-0/+17
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-15tests: Test samba-tool user setprimarygroup commandBjörn Baumbach1-0/+17
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jan 15 13:30:53 UTC 2020 on sn-devel-184
2020-01-15tests: Test samba-tool user getgroups commandBjörn Baumbach1-0/+24
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-01-15selftest: create working directory for blackbox testBjörn Baumbach1-0/+1
Required to run test separately. Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-08-30sefltest: Remove tests for obsolete OpenLDAP backendAndrew Bartlett1-26/+0
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2019-06-26selftest: schema version check in provision testAaron Haslett1-0/+38
Modifying blackbox provision test to check schema version. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 26 05:31:03 UTC 2019 on sn-devel-184
2019-06-26selftest: specifying 2008_R2 base schema for tests that need itAaron Haslett1-3/+3
We're going to change the default base schema so this patch changes all tests and testenvs requiring the current default (2008_R2) to specify it in all provision commands using --base-schema. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-04-08CVE-2019-3870 tests: Add test to check file-permissions are correct after ↵Tim Beale1-0/+71
provision This provisions a new DC and checks there are no world-writable files in the new DC's private directory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13834 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-10s4/setup/tests: make sure samba-tool is called with correct py versionNoel Power1-11/+11
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23s4/setup/tests: PY3 samba-tool needs to be called with correct python ver.Noel Power4-46/+46
Ensure samba-tool python version defined by $PYTHON Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-06-28tests: Add test that Samba cannot be started with a backup DBTim Beale1-0/+79
We don't want users to take a backup file, and then simply untar it and run Samba (Several modifications to the DB need to be made as part of the restore process, so users should always run the 'backup restore' command). To enforce this, prime_ldb_databases() now refuses to start Samba if the backupDate marker is present in the DB. This patch adds a test-case that proves this basic behaviour works. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-17s4/setup/tests: Add test for non ascii password setting samba-toolNoel Power1-0/+2
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-11netcmd: Split 'domain passwordsettings' into a super-commandTim Beale1-1/+1
The show and set options are not really related to each other at all, so it makes sense to split the code into 2 separate commands. We also want to add separate sub-commands for PSOs in a subsequent patch. Because of the way the sub-command was implemented previously, it meant that you could specify other command-line options before the 'set' or 'show' keyword, and the command would still be accepted. However, now that it's a super-command 'set'/'show' needs to be specified before any additional arguments, so we need to update the test code to reflect this. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
2017-12-10tests: make password valid in openldap provision testJamie McClymont1-1/+1
Test was using an invalid password, which causes test failure with early password validation patch Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2017-02-10fix blackbox_supported_features: mkdir -p its directoryDouglas Bagnall1-0/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-09samba_dsdb: Use and maintain compatibleFeatures and requiredFeatures in ↵Andrew Bartlett1-0/+86
@SAMBA_DSDB This will allow us to introduce new database features that are backward compatible from the point of view of older versions of Samba, but which will be damaged by modifying the database with such a version. For example, if linked attributes are stored in sorted order in 4.7, and this change, without any values in current_supportedFeatures is itself included in 4.6, then our sortedLinks are backward compatible to that release. That is with 4.6 (including this patch) which doesn't care about ordering -- but a downgraded 4.7 database used by 4.6 will be broken when later used with 4.7. If we add a 'sortedLinks' feature flag in compatibleFeatures, we can detect that. This will allow us to determine if the database still contains unsorted links, as that information allows us to make the code handling links much more efficient. We won't add the actual flag until all the code is in place. Andrew wrote the actual code and Douglas wrote the tests, and they cross-reviewed. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Piar-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> selftest: check for database features flags
2016-12-09ad/provision: change http://samba.org to https://www.samba.orgBjörn Jacke1-2/+2
Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Karolin Seeger <kseeger@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Fri Dec 9 16:57:31 CET 2016 on sn-devel-144
2014-10-23selftest: Fix test samba4.blackbox.group.pyMarc Muehlfeld1-12/+12
The test created two users and in later steps it tried adding two non-existend users to groups. This fix adds now the two created accounts to the groups instead. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10871 Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2014-04-02selftest: make blackbox_setpassword.sh test run independentlyAndrew Bartlett1-0/+2
Change-Id: I8f3cdfc2c66800f9a1e11aec4f25a42752b6b205 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-11provision: Remove --username and --password options from samba-tool domain ↵Andrew Bartlett1-1/+1
provision This avoids confusion, because the LDAP backend does not use these, and they do not set the password for the administrator account either! This may break support for the 'existing' backend LDAP backend, but that is nothing more than a stub for future development anyway, and new work in this area should use EXTERNAL in any case. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-26s4-openldap: Restored openldap-related options to the provision scriptNadezhda Ivanova1-6/+6
At the moment they are only available if TEST_LDAP=yes to avoid accidental use as the openldap backend is still failing some tests Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Thu Sep 26 07:31:05 CEST 2013 on sn-devel-104
2013-03-04selftest: Remove output directories to save disk spaceAndrew Bartlett1-7/+11
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04selftest: Add ldapcmp to ensure upgradeprovision of a fresh DB is a no-opAndrew Bartlett1-1/+33
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-21Tests: remove redondent testsuites in provisionMatthieu Patou1-6/+1
Removed provision are already tested somewhere else. Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Mon Jan 21 09:59:43 CET 2013 on sn-devel-104
2012-09-12s4:scripting: rename upgradeprovision -> samba_upgradeprovisionStefan Metzmacher1-2/+2
metze
2012-09-11s4:setup/tests: make use of samba-tool domain provisionStefan Metzmacher6-19/+19
metze
2012-08-28selftest: Fix comment in blackbox_s3upgrade.shAndrew Bartlett1-1/+1
2012-08-23selftest: Specify --use-ntvfs when testing the group codeAndrew Bartlett1-1/+1
We do not need to set filesystem ACLs in this case. Andrew Bartlett
2012-08-23selftest: Specify --use-ntvfs when testing the newuser codeAndrew Bartlett1-1/+1
We do not need to set filesystem ACLs in this case. Andrew Bartlett
2012-08-23selftest: Specify --use-ntvfs when testing the LDAP backend init codeAndrew Bartlett1-5/+5
We do not need to set filesystem ACLs in this case. Andrew Bartlett
2012-08-22selftest: Specify --use-ntvfs to provision in test scriptsAndrew Bartlett4-15/+15
Because these run as non-root, we need to avoid doing things that will fail during the provision. The main test of the s3fs provision is the plugin_s4_dc environment with a smb.conf that specifies vfs_fake_acls. Andrew Bartlett
2012-06-20s4-provision: Remove --slapd-path optionAndrew Bartlett1-5/+5
This just leaves a default enough for the test code to still check the start of the provision. This may well be removed in future, and we wish to reduce the extra options to provision. Andrew Bartlett
2012-06-16s4-classicupgrade: Use "samba classic" description for samba3 NT4-like ↵Andrew Bartlett1-3/+4
domains in samba3upgrade
2012-06-16s4-s3upgrade: Add my wins.dat and fix the parsing errorAndrew Bartlett1-0/+2
The issue was that the numbers at the end of the lines are space padded. Andrew Bartlett