1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

121647 Commits

Author SHA1 Message Date
Andreas Schneider
865670616b selftest: Add an ad_dc_fips environment
This is not FIPS ready yet.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2020-04-08 13:02:39 +00:00
Andreas Schneider
ab3394f9f5 s4:tls: Fix generating TLS RSA certs with FIPS140-2
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2020-04-08 13:02:39 +00:00
Andreas Schneider
ecdd17c536 s4:samdb: Do not create WDdigests for HTTP if weak crypto is disabled
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2020-04-08 13:02:39 +00:00
Gary Lockyer
d1f4002b91 lib ldb: lmdb init var before calling mdb_reader_check
Initilalise "stale" to zero before passing a pointer to it to
mdb_reader_check.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr  7 12:29:00 UTC 2020 on sn-devel-184
2020-04-07 12:29:00 +00:00
Martin Schwenke
f8f3d7954d ctdb-vacuum: Reschedule vacuum event if VacuumInterval has increased
The vacuuming integration tests set VacuumInterval to a very high
number to avoid vacuuming collisions.  This is done after the cluster
is healthy, so Samba will have already been started and vacuuming will
already be scheduled *at the default interval* for databases attached
by Samba.  This means that vacuuming controls used by vacuuming tests
can still collide with the scheduled vacuuming events.

Add some logic to reschedule a vacuuming event that has fired but
where VacuumInterval has increased since it was originally scheduled.
The increase in VacuumInterval is used as the time offset for
rescheduling the event.

Although this changes production behaviour for the convenience of
testing, the new behaviour is completely reasonable and obeys the
principle of least surprise.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Apr  7 03:04:57 UTC 2020 on sn-devel-184
2020-04-07 03:04:57 +00:00
Martin Schwenke
5d03a3c86e ctdb-vacuum: Store value of VacuumInterval in ctdb_vacuum_handle
No behaviour change.  This is final staging to make the next change
completely obvious.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-04-07 01:26:41 +00:00
Martin Schwenke
7ad7c0b932 ctdb-vacuum: Use vacuum_handle local variables
No behaviour change.  This just makes future changes clearer by
avoiding reformatting (or introducing local variables).

Clean up error handling while touching a relevant line.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-04-07 01:26:41 +00:00
Andreas Schneider
c4be195da2 testprogs: Add 'net ads join createupn' test also verifying the keytab
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14336

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): Mon Apr  6 19:09:53 UTC 2020 on sn-devel-184
2020-04-06 19:09:53 +00:00
Andreas Schneider
ec69752cb9 s3:libads: Fix ads_get_upn()
This adds the userPrincipalName to ads_find_machine_acct() which
fetches the data for us.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14336

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-04-06 17:35:39 +00:00
Andreas Schneider
c012f92438 third_party: Update nss_wrapper to version 1.1.11
This fixes strict aliasing which leads to segfaults on certain
architectures, e.g. armv7hl.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>

Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Mon Apr  6 17:34:53 UTC 2020 on sn-devel-184
2020-04-06 17:34:53 +00:00
Ralph Boehme
53324c35d1 selftest: add two more nbt.dgram flapping tests
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Apr  6 10:43:18 UTC 2020 on sn-devel-184
2020-04-06 10:43:18 +00:00
Ralph Boehme
dd083d7348 selftest: remove unnecessary .* from flapping enty
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
2020-04-06 09:08:39 +00:00
Andreas Schneider
1a5b0e1105 gitlab-ci: Add coverity scan runner
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-06 09:08:39 +00:00
Noel Power
8cad448ab2 selftest/flapping: mark samba3.nbt.dgram.netlogon.* as flapping
Post SMB1/SMB2 test env split to help in removing smb1
samba3.nbt.dgram.netlogon* fails randomly. It is unrelated as far
as we can see to the changes but must be a side affect of runtime
order or some such.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Sat Apr  4 01:12:05 UTC 2020 on sn-devel-184
2020-04-04 01:12:05 +00:00
Ralph Boehme
78e1492f21 smbd: move files_struct.lock_failure_seen to a bitfield
Updated comment in vfs.h explaining ABI change.

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 Apr  3 20:41:34 UTC 2020 on sn-devel-184
2020-04-03 20:41:34 +00:00
Ralph Boehme
16a485d1be smbd: move files_struct.closing to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
e940a41c2b smbd: move files_struct.use_ofd_locks to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
34b4effc04 smbd: move files_struct.backup_intent to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
049488f6a5 smbd: move files_struct.is_sparse to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
930b7525a6 smbd: move files_struct.delete_on_close to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
b0824cf35f smbd: move files_struct.initial_delete_on_close to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
1ccd335af5 smbd: move files_struct.aio_write_behind to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
cb996cd5a3 smbd: move files_struct.is_directory to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
65a4302474 smbd: move files_struct.modified to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
b95c62bc90 smbd: move files_struct.can_write to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
8b48969241 smbd: move files_struct.can_read to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:44 +00:00
Ralph Boehme
d22096961b smbd: move files_struct.can_lock to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
4d70e92a91 smbd: move files_struct.write_time_forced to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
9c2809c517 smbd: move files_struct.update_write_time_on_close to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
adaca9597c smbd: move files_struct.update_write_time_triggered to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
7c386c08dc smbd: move files_struct.kernel_share_modes_taken to a bitfield
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
fed1bc2293 smbd: reindent if expression in real_write_file()
No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
8718dae6b8 smbd: fix if expression that checks when to call vfs_fill_sparse()
Noone complained so far, skip bugreport.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
ea0f1b3be7 smbd: reformat an if expression in smbd_smb2_close()
No change in behavour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
a72208fc8c smbd: reformat a function call in rename_internals_fsp()
No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
553e576ad9 smbd: reformat an if expression in reply_readbraw()
No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
5a5bbcd9d9 smbd: reformat calling ensure_canon_entry_valid_on_set() in unpack_canon_ace()
No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:43 +00:00
Ralph Boehme
574255a754 smbd: CHECK_WRITE macro reformatting
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:42 +00:00
Ralph Boehme
2d56412e28 smbd: CHECK_READ_IOCTL macro reformatting
A subsequent commit will replace can_read with something much longer.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:42 +00:00
Ralph Boehme
be6f8e03a0 smbd: CHECK_READ_SMB2 macro reformatting
A subsequent commit will replace can_read with something much longer.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:42 +00:00
Ralph Boehme
61e3576ad8 smbd: CHECK_READ macro reformatting
A subsequent commit will replace can_read with something much longer.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03 19:05:42 +00:00
Noel Power
23349f9d2c selftest: Add list of tests to be ported
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Apr  3 16:45:48 UTC 2020 on sn-devel-184
2020-04-03 16:45:48 +00:00
Noel Power
182635bb78 selftest: Don't skip smb1 tests and remove associate skip file
remove the skip file and the code to use it from the build as
all tests now run in either specific smb1 enabled envs or normal
(non smb1) envs

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
1840e96597 selftest: Create instructions for generating skip file entries
create_smb1_fail_skipfile.txt provides both
  + instructions
  + patch to perform the pre-requisite steps to be able to
    modify the environment and parse test output

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
adba4165a5 selftest/knownfail.d: samba3.blackbox.smbclient_basic.NT1.smbclient
Add known fail for samba3.blackbox.smbclient_basic.NT1.smbclient
which fails against nt4_schannel (because it doesn't support
SMB1)

Additionally since we don't have plans to create a nt4_schannel_smb1
test env provide additional coverage by running this test against
nt4_dc_smb1 (which still support SMB1)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
e7b4b34906 selftest/knownfail.d: Add samba4.blackbox.smbclient
This test fails for admember & chgdcpass test envs because they
don't support SMB1

Note: There is some coverage for this test with other test envs e.g.
      s4member, ad_dc_ntvfs & others

Additionally IIUC this test seems to be for testing smbclient4
(if this assumption is incorrect then we could substitute with
smbclient(s3)) However, for the moment it seems best to disable this
test as smbclient4 doesn't support SMB1 and we have sufficient coverage
with other SMB1 supporting envs

Also remove associated entries from skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
84ba205d1d selftest/knownfail.d: Add samba4.smb.signing disabled
Add know fail for these tests that run against ad_member
which won't succeed because SMB1 isn't supported

However we do have some coverage with s4member (which depends on
ad_dc_ntvfs) which still supports SMB1.

Additionally remove the associated entries from skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
eafdbba6e1 selftest/knownfail.d: Add entries for samba3.unix.whoami
samba3.unix.whoami depends of posix extensions which
currently only work with SMB1. These tests fail with
environments nt4_member & ad_member. We currently don't
have plans to provide '_smb1' variants of these environments.

So in addition to adding the knownfail we add some
coverage by running this test with test env ad_dc_smb1.

Also we remove the associated entries from skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
0721eed972 selftest/knownfail.d: Add samba3.blackbox.smbclient_s3.NT1
samba3.blackbox.smbclient_s3.NT1.plain &
samba3.blackbox.smbclient_s3.NT1.sign tests will fail running against
test envs ad_member & nt4_member (because those envs don't support SMB1)

However we do have some coverage with nt4_dc_smb1_done

We could maybe just delete these tests for those environments for
the moment just create specific knownfail entries and remove associated
entries from skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00
Noel Power
ecaaef4ff7 selftest/knownfail.d knownfail samba3.blackbox.smbclient_auth.plain
samba3.blackbox.smbclient_auth.plain will fail against
ad_member & nt4_member (because these envs don't
support SMB1) so we don't run these tests where either
'LANMAN2' or 'NT1' are in the options, in these cases
to get coverage so we use nt4_dc_smb1

Creating new envs for such a small amount of strictly SMB1 tests anyway
seems overkill. For the moment just create specific knownfail entries
and remove the associated entries from skip_smb1_fail

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:33 +00:00