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

121631 Commits

Author SHA1 Message Date
Noel Power
1368124731 s3/selftest: Move samba3.unix.info2 to ad_dc_smb1 & nt4_dc_smb1
verified with

  python3 source3/selftest/tests.py  | grep _smb1 | grep "^samba3.unix" | sort -u

Additionally the test entries in skip_smb1_fail also removed

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
25efadd5f3 s3/selftest: Move samba3.rap.basic & samba3.rap.rpc to _smb1 env
Tests:
  samba3.rap.basic
  samba3.rap.rpc

have been moved to ad_dc_smb1, nt4_dc_smb1

verified by
  python3 source3/selftest/tests.py  | grep ad_dc_smb1 | grep "^samba3.rap"

these tests have been removed from skip_smb1_fails
Additionally
samba3.rap.basic.netsessiongetinfo was already marked as knownfail
in ad_dc so in ad_dc_smb1 also true

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
e16aba83fc s3/selftest: Move various samba3.base.* tests to _smb1 environment(s)
From list of tests identified as failing with environments that
cannot negotiate SMB2 the following tests have been moved to ad_dc_smb1
& nt4_dc_smb1 (and additionally removed from skip_smb1_fails)

samba3.base.attr
samba3.base.chkpath
samba3.base.defer_open
samba3.base.delete
samba3.base.deny3
samba3.base.denydos
samba3.base.dir1
samba3.base.dir2
samba3.base.disconnect
samba3.base.fdpass
samba3.base.mangle
samba3.base.negnowait
samba3.base.ntdeny1
samba3.base.ntdeny2
samba3.base.open
samba3.base.openattr
samba3.base.properties
samba3.base.rename
samba3.base.samba3error
samba3.base.secleak
samba3.base.tcon
samba3.base.tcondev
samba3.base.trans2
samba3.base.unlink
samba3.base.vuid
samba3.base.xcopy

list of tests verified with

python3 source3/selftest/tests.py  | egrep 'ad_dc_smb1|nt4_dc_smb1' | grep "^samba3.base" | sort -u

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
08171c0392 s3/selftest: move base.delaywerite, base.deny1 & base.deny2 to _smb1 env
the following tests

samba3.base.delaywrite
samba3.base.deny1
samba3.base.deny2

have been moved to fileserver_smb1 env and removed from skip_file

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
f3ae2dcec1 s3/selftest: Move samba3.smbtorture_s3.plain.* tests to fileserver_smb1
with the exception of tests containing
  "SMB2", "BAD-NBT-SESSION", "DIR1", "LOCK12", "OPLOCK4"

so the following tests have been moved

output below from
   python3 source3/selftest/tests.py | grep samba3.smbtorture_s3.plain |
sort -u

samba3.smbtorture_s3.plain.ATTR
samba3.smbtorture_s3.plain.BROWSE
samba3.smbtorture_s3.plain.CASE-INSENSITIVE-CREATE
samba3.smbtorture_s3.plain.CHAIN1
samba3.smbtorture_s3.plain.CHAIN2(
samba3.smbtorture_s3.plain.CHAIN3
samba3.smbtorture_s3.plain.CHKPATH
samba3.smbtorture_s3.plain.CLEANUP1
samba3.smbtorture_s3.plain.CLEANUP2
samba3.smbtorture_s3.plain.CLEANUP4
samba3.smbtorture_s3.plain.CLI_SPLICE
samba3.smbtorture_s3.plain.DELETE
samba3.smbtorture_s3.plain.DELETE-LN
samba3.smbtorture_s3.plain.DELETE-STREAM
samba3.smbtorture_s3.plain.DIR-CREATETIME
samba3.smbtorture_s3.plain.DIR(
samba3.smbtorture_s3.plain.FDPASS
samba3.smbtorture_s3.plain.FDSESS
samba3.smbtorture_s3.plain.IOCTL
samba3.smbtorture_s3.plain.LARGE_READX
samba3.smbtorture_s3.plain.LOCK10
samba3.smbtorture_s3.plain.LOCK11
samba3.smbtorture_s3.plain.LOCK13
samba3.smbtorture_s3.plain.LOCK1
samba3.smbtorture_s3.plain.LOCK2
samba3.smbtorture_s3.plain.LOCK3
samba3.smbtorture_s3.plain.LOCK4
samba3.smbtorture_s3.plain.LOCK5
samba3.smbtorture_s3.plain.LOCK6
samba3.smbtorture_s3.plain.LOCK7
samba3.smbtorture_s3.plain.LOCK9A
samba3.smbtorture_s3.plain.LOCK9B
samba3.smbtorture_s3.plain.NTTRANS-FSCTL
samba3.smbtorture_s3.plain.OPEN
samba3.smbtorture_s3.plain.OPLOCK1
samba3.smbtorture_s3.plain.OPLOCK2
samba3.smbtorture_s3.plain.OPLOCK5
samba3.smbtorture_s3.plain.OWNER-RIGHTS
samba3.smbtorture_s3.plain.PIDHIGH
samba3.smbtorture_s3.plain.RENAME
samba3.smbtorture_s3.plain.RW1
samba3.smbtorture_s3.plain.RW2
samba3.smbtorture_s3.plain.RW3
samba3.smbtorture_s3.plain.RW-SIGNING
samba3.smbtorture_s3.plain.SHORTNAME-TEST
samba3.smbtorture_s3.plain.STREAMERROR
samba3.smbtorture_s3.plain.TCON2
samba3.smbtorture_s3.plain.TCONDEV
samba3.smbtorture_s3.plain.TCON
samba3.smbtorture_s3.plain.TRANS2
samba3.smbtorture_s3.plain.UID-REGRESSION-TEST
samba3.smbtorture_s3.plain.UNLINK
samba3.smbtorture_s3.plain.W2K
samba3.smbtorture_s3.plain.WILDDELETE
samba3.smbtorture_s3.plain.XCOPY

corrosponding entries removed 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:28 +00:00
Noel Power
422e6c5a79 s4/selftest: adjust samba.blackbox.pdbtest to use (s3) smbclient
smbclient4 only negotiates smb1, this test should use smbclient(s3)
instead.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
7e04d84b5f s4/selftest: Adjust samba4.blackbox.samba_tool to use (s3) smbclient
(s4) smbclient doesn't negotiate smb2, (s3) smbclient is what
is used and what we really should be testing.

Additionally remove entry from ski_smb1_fails file

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
1c3f954ab4 s4/selftest: Use (s3) smbclient for test samba4.blackbox.kinit
Additionally we remove the entry from skip_smb1_fails as it is
no longer relevant

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
3558332228 s4/selftest: Use s3 smbclient for samba4.blackbox.bogusdomain
Additionally remove the test from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
87d77b3ea9 s4/selftest: Add smbclient (s3 version) binary to s4/tests
smbclient4 only negotiates smb1, tests probably should use smbclient
instead (except for tests that intentionally are testing smbclient4
itself)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:28 +00:00
Noel Power
2b35d8e07b s3/selftest: move samba3.blackbox.smbspool to ad_dc_smb1
and remove entry 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:28 +00:00
Noel Power
32506f2853 selftest: Move samba3.blackbox.net.misc NT1 to ad_dc_smb1 env
Additionally remove this test from the skip file as the file doesn't
need to be ported

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
df4b8b80b3 s3/selftest: Change samba3.blackbox.net.misc desc. to include protocol
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
c86171aa8b s3/selftest: Move samba3.blackbox.net.misc to ad_dc
we have an ad_dc_smb1 env and there is not reason why we need
to use nt4_dc for this test. In a later commit we will move the
NT1 test to the ad_dc_smb1 env.

Addionally we change the existing entry in the skip_smb1_fails
skip file.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
47ad2551b4 selftest: Move samba3.blackbox.shadow_copy2 NT1 to fileserver_smb1
Additionally since we already have a SMB3 version of the test we
can remove it from the skip file

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
6accac6291 selftest: samba3.blackbox.* so it can run SMB1 & >= SMB2
Move tests that have SMB1 & >=SMB2 versions to fileserver_smb1_done

Additionally this commit removes the entries for fileserver for the same
tests from skip_smb1.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
a11c58c5f9 autobuild: Add ad_dc_default_smb1 to autobuild jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
02a16b3171 selftest/target: Add test environment ad_dc_default_smb1_done
Adding test env ad_dc_default_smb1_done an alias for
test environment ad_dc_default_smb1

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
ffe856ce32 autobuild: Add nt4_dc_smb1_done to autobuild jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
ba3fe03b51 selftest/target: Create nt4_dc_smb1_done env (alias for nt4_dc_smb1)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
814a6d43f4 autobuild: Add fileserver_smb1_done to autbuild jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
4948dfc63d selftest/target: Add new alias environment fileserver_smb1_done
setup_fileserver_smb1_done is an alias for setup_fileserver_smb1

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
bbce98c264 autobuild: Add ad_dc_smb1_done to autobuild jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
7dbfdd8121 selftest/target: Add new alias environment ad_dc_smb1_done
Adding ad_dc_smb1_done, and alias for test env ad_dc_smb1

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
f1139ac5c6 selftest/target: create return_alias_env function for Samba3.pm
This will allow us easily create lightweight alias environments
like ad_dc_smb1_done etc.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
e468b03fc4 autobuild: Add ad_dc_default_smb1 to autobuild jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
34b14c4fd2 selftest/target: Add new alias env ad_dc_default_smb1
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:27 +00:00
Noel Power
82e4dd5025 autobuild: Add new nt4_dc_smb1 env to jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
3e5131e06d selftest/target: Create new nt4_dc_smb1 environment
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
087eb9d744 script: Add ad_dc_smb1 to autobuild jobs
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
b0ea347c50 selftest: Create new test env ad_dc_smb1
ad_dc_smb1 is a copy of the ad_dc test environment but
with the difference that it still supports SMB1, this will allow
use to still run SMB1 tests for that env.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
fc0d10d023 selftest/manage-ca: Add certificiate etc. for DC addcsmb1
Preparatory commit pre adding new addc_smb1 environment.

In order to support new addc_smb1 test environment we need new
certificate(s) in order to satisfy some tests
(e.g. samba4.blackbox.pkinit.*)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
1954972cfd script: Add testenv fileserver_smb1 to autobuild jobs
Adjust the existing autobuild jobs that currently include/exclude
test env fileserver to also use fileserver_smb1.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
fcae89684e selftest: Add new test environment fileserver_smb1
fileserver_smb1 is a copy of the fileserver test environment but
with the difference that it still supports SMB1, this will allow
use to still run SMB1 tests.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
e13e0cf0ce selftest: adjust skip_file (after adjusting s4member and rpc_proxy)
The orig skip file was created with *all* test environments by
default not support SMB1.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
f64e032a35 selftest: Allow rpc_proxy & s4member also negotiate SMB1
Test environments rpc_proxy & s4member depend on ad_dc_ntvfs
so these environments additionally need to also be able to
still support SMB1.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
49ba8f2155 selftest: disable SMB1 from testenv(s) make >=SMB2 the default
Change the values of 'min protocol' set for the various test
environments to be SMB2_02.

Servers will only offer protocols starting with the min specified in the
conf files. We don't change the client value here yet (until SMB1 is
truely gone) as we still want to be able to run SMB1 tests.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
7f2cdadfef selftest: Exclude SMB1 tests that would fail when SMB1 is disabled
Exclude the tests specified in the file 'skip_smb1_fails' which
contains the list of tests that would fail if min protocol >= SMB2_02

Note: a subsequent commit will change the default min protocol so
      in order to maintain bisectability we skip the tests before
      we change the default.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
10c879a98b selftest: Create a file to exclude tests that fail with SMB1
skip_smb1_fails contains tests that will fail when the min protocol
of the test environments is set to SMB2_02

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
5898c72318 selftest: Allow ad_dc_ntvfs negotiate smb1 still
The default for most test envs will be changed in a future
commit(s) to be >= SMB2 then we need to still allow  ad_dc_ntvfs to
support SMB1. This will make the number of tests to port easier to
deal with. In addition to test env ad_dc_ntvfs still supporting SMB1
we need to do the same with test other environments that depend on
ad_dc_ntvfs (this will be handled in followup commits).

In addition to the above this change will ensure we don't trigger
failures for ntvfs tests when we switch to default >= SMB2 which will
make the associated skip file (added in a future commit) smaller.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-03 15:08:26 +00:00
Noel Power
0f83d9153c s3/selftest: Fix typo in test generator script
Introduced in a645160999 but only makes a difference when
environments limit protocols for testing.

Reviewed-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Noel Power <noel.power@suse.com>
2020-04-03 15:08:26 +00:00
Ralph Boehme
a45e637025 selftest: allow SMB1 in clusteredmember env
This is a relatively new test environment that only uses very few tests
yet. Skip the env name rename dance for this env, but someone has to convert the
tests later on.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2020-04-03 15:08:25 +00:00
Rowland Penny
84c130a655 samba-tool group show: only shows global security groups, this patch makes it show all groups.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14335

Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Björn Baumbach <bb@samba.org>

Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Thu Apr  2 15:27:53 UTC 2020 on sn-devel-184
2020-04-02 15:27:53 +00:00
Swen Schillig
130c26b43f dbwrap: fix possible memleak and false result check.
A cstatus != 0 or a data.dsize != sizeof(uint32_t)
does not guarantee to have no received data referenced by data.dptr.
Therefore, make sure data.dptr is free'd.
Reusing the same data structure as data input and data output parameter
can lead to wrong results, especially when the output parameters value
is used to detect errors. Create the additional local variable outdata
to prevent this issue.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Apr  2 11:26:32 UTC 2020 on sn-devel-184
2020-04-02 11:26:32 +00:00
Swen Schillig
f34582af1d dbwrap: fix comment in code leading to wrong function parameter
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2020-04-02 09:51:39 +00:00
Swen Schillig
2bdb5a7578 ctdbd_conn: possible memleak in ctdbd_db_attach
A cstatus != 0 or a data.dsize != sizeof(uint32_t)
does not guarantee to have no received data referenced by data.dptr.
Therefore, make sure data.dptr is free'd.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2020-04-02 09:51:39 +00:00
Swen Schillig
95fc8bd44a ctdbd_conn: possible memleak in ctdbd_dbpath
A cstatus != 0 does not guarantee to have no received data
referenced by rdata.dptr.
Therefore, make sure rdata.dptr is free'd.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2020-04-02 09:51:39 +00:00
Swen Schillig
6e146c855a ctdbd_conn: possible memleak in ctdbd_working
A cstatus != 0 does not guarantee to have no received data
referenced by outdata.dptr.
Therefore, make sure outdata.dptr is free'd.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2020-04-02 09:51:39 +00:00
Stefan Metzmacher
9b1e96197e script/autobuild.py: allow write_system_info commands to fail
These commands are just there as hints to debug possible problems.
In order to support autobuild.py on non-linux platforms we should
just ignore errors here.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr  2 07:36:07 UTC 2020 on sn-devel-184
2020-04-02 07:36:07 +00:00
Stefan Metzmacher
0312a10e09 script/autobuild.py: use more portable 'cp -R -a -l'
On platforms like FreeBSD 12 cp doesn't accept the long options,
using the one letter options works there and keeps working on Linux
as well.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-04-02 06:01:39 +00:00