]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agos3/selftest: Move samba3.blackbox.smbclient_s3.NT1.plain to nt4_dc_smb1
Noel Power [Fri, 13 Dec 2019 11:28:06 +0000 (11:28 +0000)] 
s3/selftest: Move samba3.blackbox.smbclient_s3.NT1.plain to nt4_dc_smb1

Test samba3.blackbox.smbclient_s3.NT1.plain as its name suggests
requires a test environment that supports SMB1 so we move it to one.
Additionally the entry from the skip_smb1_fail file is removed (for this
env) as not porting is required.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Remove unnecessary for loop
Noel Power [Fri, 13 Dec 2019 11:04:51 +0000 (11:04 +0000)] 
s3/selftest: Remove unnecessary for loop

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.blackbox.smbclient_s3.NT1.crypt to nt4_dc_smb1
Noel Power [Fri, 13 Dec 2019 10:49:51 +0000 (10:49 +0000)] 
s3/selftest: Move samba3.blackbox.smbclient_s3.NT1.crypt to nt4_dc_smb1

now that a specific SMB1 enabled env is available lets move this
test to nt4_dc_smb1 env. Additionally the entry is removed from
skip_smb1_fails as no porting is required

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Remove unnecessary 'for' loop
Noel Power [Fri, 13 Dec 2019 10:44:51 +0000 (10:44 +0000)] 
s3/selftest: Remove unnecessary 'for' loop

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.blackbox.smbclient_auth.plain to _smb1_done
Noel Power [Fri, 13 Dec 2019 10:28:40 +0000 (10:28 +0000)] 
s3/selftest: Move samba3.blackbox.smbclient_auth.plain to _smb1_done

samba3.blackbox.smbclient_auth.plain will fail in test environment
that doesn't support SMB1 so move to directly to test env
nt4_dc_smb1_done as it doesn't require porting.

This test only fails with options that require it to communicate over
SMB1, there are sibling tests that test against >= SMB2 so also we
remove the skip_smb1_fail entry as this test doen't need porting
(for this env)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.base.rw1 to nt4_dc_smb1
Noel Power [Fri, 13 Dec 2019 10:26:59 +0000 (10:26 +0000)] 
s3/selftest: Move samba3.base.rw1 to nt4_dc_smb1

Test samba3.base.rw1 only works in test environments that support
SMB1 so move test to nt4_dc_smb1 and remove the entry from
skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.raw.lock & samba3.base.lock to nt4_dc_smb1
Noel Power [Tue, 7 Jan 2020 10:32:33 +0000 (10:32 +0000)] 
s3/selftest: Move samba3.raw.lock & samba3.base.lock to nt4_dc_smb1

samba3.raw.lock & samba3.raw.lock currently will only work in
environments that negotiate SMB1 so lets move them to new nt4_dc_smb1
and remove those entries form skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: Adjust samba4.blackbox.pkinit to use (s3) smbclient
Noel Power [Thu, 12 Dec 2019 14:48:54 +0000 (14:48 +0000)] 
s4/selftest: Adjust samba4.blackbox.pkinit to use (s3) smbclient

samba4.blackbox.pkinit falls to pass in environments that don't support
SMB2 because of use (s4) smbclient4. Change test to use (s3) smbclient

Additionally a test within the test script test_kinit_trusts_heimdal.sh
explicitly uses smbclient4 which can't negotiate SMB1 in environments
that don't support it. Add knownfail to cater for this & also remove entry
from the skip file

Further reference the smbclient4 specific test is associated with
https://bugzilla.samba.org/show_bug.cgi?id=12554 so maybe we should
keep it for the moment

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: Move samba.tests.net_join_no_spnego to ad_dc_smb1
Noel Power [Thu, 12 Dec 2019 11:27:18 +0000 (11:27 +0000)] 
s4/selftest: Move samba.tests.net_join_no_spnego to ad_dc_smb1

Test samba.tests.net_join_no_spnego when run in environment
doesn't support SMB1 so move it to ad_dc_smb1 and remove
skip_smb1_fail entry

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: Move samba.tests.auth_log_pass_change to ad_dc_smb1
Noel Power [Thu, 12 Dec 2019 11:23:54 +0000 (11:23 +0000)] 
s4/selftest: Move samba.tests.auth_log_pass_change to ad_dc_smb1

Test samba.tests.auth_log_pass_change  will fail when run against
environments that don't support SMB1 so move this test 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>
5 years agos4/selftest: Move samba.tests.auth_log to ad_dc_smb1
Noel Power [Thu, 12 Dec 2019 11:22:35 +0000 (11:22 +0000)] 
s4/selftest: Move samba.tests.auth_log to ad_dc_smb1

Test samba.tests.auth_log will fail when run against environments that
don't support SMB1 so move this test to ad_dc_smb1 and removing
entry from skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.blackbox.smbclient_ntlm.plain NT1 to _smb1_done
Noel Power [Tue, 7 Jan 2020 10:28:39 +0000 (10:28 +0000)] 
s3/selftest: Move samba3.blackbox.smbclient_ntlm.plain NT1 to _smb1_done

samba3.blackbox.smbclient_ntlm.plain NT1 fails in environments that
don't support SMB2 so we need to move it to the appropriate _smb1
test env and since this test doesn't need to be ported we can actually
move it directly to the _smb1_done env to indicate that.

Also remove the samba3.blackbox.smbclient_ntlm.plain NT1(ad_dc)
entry from the skip file because we have moved this to the ad_dc_smb1
*and* this test is already ported to >=SMB2

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: Move samba4.smb.spnego to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 13:02:25 +0000 (13:02 +0000)] 
s4/selftest: Move samba4.smb.spnego to ad_dc_smb1

Moving

samba4.smb.spnego.krb5.no_optimistic(ad_dc)
samba4.smb.spnego.ntlmssp.no_optimistic(ad_dc)

and additionally removing the entries from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: Move samba4.rpc.join tests from ad_dc to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 12:53:24 +0000 (12:53 +0000)] 
s4/selftest: Move samba4.rpc.join tests from ad_dc to ad_dc_smb1

Move the following tests from ad_dc to ad_dc_smb1

samba4.rpc.join with bigendian(ad_dc)
samba4.rpc.join with seal,padcheck(ad_dc)
samba4.rpc.join with validate(ad_dc)

and additionally remove the corrosponding entries from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: Move failing samba4.rpc.authcontext.* (ad_dc) to ad_dc_smb1
Noel Power [Tue, 3 Mar 2020 17:24:36 +0000 (17:24 +0000)] 
s4/selftest: Move failing samba4.rpc.authcontext.* (ad_dc) to ad_dc_smb1

Move
samba4.rpc.authcontext with bigendian(ad_dc)
samba4.rpc.authcontext with seal,padcheck(ad_dc)
samba4.rpc.authcontext with validate(ad_dc)

to ad_dc_smb1 environment and remove the corrosponding entries in
skip_smb1_fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: run samba4.libsmbclient.*.NT1.* tests in ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 12:33:04 +0000 (12:33 +0000)] 
s4/selftest: run samba4.libsmbclient.*.NT1.* tests in ad_dc_smb1

additionally remove those related entries from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4/selftest: move samba4.dfs.domain to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 12:28:05 +0000 (12:28 +0000)] 
s4/selftest: move samba4.dfs.domain to ad_dc_smb1

Additionally remove the test entry from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.rpc.samba3.netlogon to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:48:38 +0000 (18:48 +0000)] 
s3/selftest: Move samba3.rpc.samba3.netlogon to ad_dc_smb1

Move test samba3.rpc.samba3.netlogon which fails in enviroments that
don't support SMB1 to ad_dc_smb1 and remove the test entry from
skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.raw.search to ad_dc_smb1 environments
Noel Power [Wed, 11 Dec 2019 18:46:36 +0000 (18:46 +0000)] 
s3/selftest: Move samba3.raw.search to ad_dc_smb1 environments

Test samba3.raw.search fails in envrionments that don't support SMB1
so we move it to ad_dc_smb1 and also remove the entry in skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.raw.read to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:45:33 +0000 (18:45 +0000)] 
s3/selftest: Move samba3.raw.read to ad_dc_smb1

Test samba3.raw.read fails in environments that don't support SMB1
so move it to ad_dc_smb1 and also remove the entry in skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.raw.acls to ad_dc_smb1 env
Noel Power [Wed, 11 Dec 2019 18:44:00 +0000 (18:44 +0000)] 
s3/selftest: Move samba3.raw.acls to ad_dc_smb1 env

Test samba3.raw.acls fails in environments that don't support SMB1
so move it to ad_dc_smb1 and remove the entry in skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.base.rw1 to environment ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:42:24 +0000 (18:42 +0000)] 
s3/selftest: Move samba3.base.rw1 to environment ad_dc_smb1

Test samba3.base.rw1 fails in environments that don't support
SMB1 so we move it to ad_dc_smb1 and also remove the entry in
skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.raw.session* to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:40:23 +0000 (18:40 +0000)] 
s3/selftest: Move samba3.raw.session* to ad_dc_smb1

The following tests which fail when used with environments that don't
support SMB1 fail so we move them to ad_dc_smb1 instead and also remove
th entry in skip_smb1_fails

samba3.raw.session ntlm
samba3.raw.session krb5

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.raw.chkpath to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:37:09 +0000 (18:37 +0000)] 
s3/selftest: Move samba3.raw.chkpath to ad_dc_smb1

Test samba3.raw.chkpath fails in environments that don't support SMB1
so we move it to ad_dc_smb1 and also remove the entry from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.unix.whoami* tests to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:35:10 +0000 (18:35 +0000)] 
s3/selftest: Move samba3.unix.whoami* tests to ad_dc_smb1

The following tests which fail in environments that dont support
SMB1 have been moved to ad_dc_smb1

samba3.unix.whoami
samba3.unix.whoami kerberos connection
samba3.unix.whoami anonymous connection
samba3.unix.whoami ntlm user@realm

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/sefltest: Move samba3.rap.sam to ad_dc_smb1 environment
Noel Power [Wed, 11 Dec 2019 18:32:29 +0000 (18:32 +0000)] 
s3/sefltest: Move samba3.rap.sam to ad_dc_smb1 environment

Test samba3.rap.sam fails in environments that don't support
SMB1 so we move it to enironment ad_dc_smb1 and remove the entry in
skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.base.createx_access to ad_dc_smb1 env
Noel Power [Wed, 11 Dec 2019 18:30:54 +0000 (18:30 +0000)] 
s3/selftest: Move samba3.base.createx_access to ad_dc_smb1 env

Test samba3.base.createx_access fails in environments that dont
support SMB1, moving this test to ad_dc_smb1 and removing the entry
in skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move various samba3.raw tests to _smb1 env
Noel Power [Tue, 7 Jan 2020 10:27:12 +0000 (10:27 +0000)] 
s3/selftest: Move various samba3.raw tests to _smb1 env

The following tests which fail when used in environment that
SMB1 cannot be negotiated in have been moved to ad_dc_smb1
& nt4_dc_smb1

samba3.raw.close(ad_dc_smb1)
samba3.raw.composite(ad_dc_smb1)
samba3.raw.eas(ad_dc_smb1)
samba3.raw.mkdir(ad_dc_smb1)
samba3.raw.open(ad_dc_smb1)
samba3.raw.rename(ad_dc_smb1)
samba3.raw.samba3badnameblob(ad_dc_smb1)
samba3.raw.samba3badpath(ad_dc_smb1)
samba3.raw.samba3caseinsensitive(ad_dc_smb1)
samba3.raw.samba3oplocklogoff(ad_dc_smb1)
samba3.raw.samba3rootdirfid(ad_dc_smb1)
samba3.raw.sfileinfo.bug(ad_dc_smb1)
samba3.raw.sfileinfo.end-of-file(ad_dc_smb1)
samba3.raw.sfileinfo.rename(ad_dc_smb1)
samba3.raw.streams(ad_dc_smb1)
samba3.raw.unlink(ad_dc_smb1)
samba3.raw.write(ad_dc_smb1)

verified with
   python3 source3/selftest/tests.py  | grep ad_dc_smb1 | grep "^samba3.raw" | sort -u

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move various samba3.rpc.* tests to ad_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:16:46 +0000 (18:16 +0000)] 
s3/selftest: Move various samba3.rpc.* tests to ad_dc_smb1

The following tests which fail in environments that cannot negotiate
SMB1 have been moved to ad_dc_smb1 & nt4_dc_smb1

samba3.rpc.authcontext
samba3.rpc.join
samba3.rpc.samba3.bind
samba3.rpc.samba3.getusername
samba3.rpc.samba3.sharesec
samba3.rpc.samba3.smb1-pipe-name
samba3.rpc.samba3.smb-reauth1
samba3.rpc.samba3.smb-reauth2
samba3.rpc.samba3.spoolss
samba3.rpc.samba3.wkssvc

python3 source3/selftest/tests.py  | grep ad_dc_smb1 | grep "^samba3.rpc" | sort -u

test entries have also been removed from skip_smb1_fails

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3/selftest: Move samba3.unix.info2 to ad_dc_smb1 & nt4_dc_smb1
Noel Power [Wed, 11 Dec 2019 18:09:02 +0000 (18:09 +0000)] 
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>
5 years agos3/selftest: Move samba3.rap.basic & samba3.rap.rpc to _smb1 env
Noel Power [Wed, 11 Dec 2019 18:06:47 +0000 (18:06 +0000)] 
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>
5 years agos3/selftest: Move various samba3.base.* tests to _smb1 environment(s)
Noel Power [Wed, 4 Mar 2020 17:35:40 +0000 (17:35 +0000)] 
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>
5 years agos3/selftest: move base.delaywerite, base.deny1 & base.deny2 to _smb1 env
Noel Power [Wed, 11 Dec 2019 17:24:10 +0000 (17:24 +0000)] 
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>
5 years agos3/selftest: Move samba3.smbtorture_s3.plain.* tests to fileserver_smb1
Noel Power [Tue, 3 Mar 2020 17:23:04 +0000 (17:23 +0000)] 
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>
5 years agos4/selftest: adjust samba.blackbox.pdbtest to use (s3) smbclient
Noel Power [Mon, 9 Dec 2019 19:40:09 +0000 (19:40 +0000)] 
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>
5 years agos4/selftest: Adjust samba4.blackbox.samba_tool to use (s3) smbclient
Noel Power [Mon, 9 Dec 2019 18:11:41 +0000 (18:11 +0000)] 
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>
5 years agos4/selftest: Use (s3) smbclient for test samba4.blackbox.kinit
Noel Power [Mon, 9 Dec 2019 17:19:34 +0000 (17:19 +0000)] 
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>
5 years agos4/selftest: Use s3 smbclient for samba4.blackbox.bogusdomain
Noel Power [Mon, 9 Dec 2019 11:39:58 +0000 (11:39 +0000)] 
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>
5 years agos4/selftest: Add smbclient (s3 version) binary to s4/tests
Noel Power [Mon, 9 Dec 2019 11:30:00 +0000 (11:30 +0000)] 
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>
5 years agos3/selftest: move samba3.blackbox.smbspool to ad_dc_smb1
Noel Power [Mon, 9 Dec 2019 11:12:22 +0000 (11:12 +0000)] 
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>
5 years agoselftest: Move samba3.blackbox.net.misc NT1 to ad_dc_smb1 env
Noel Power [Fri, 6 Dec 2019 17:31:32 +0000 (17:31 +0000)] 
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>
5 years agos3/selftest: Change samba3.blackbox.net.misc desc. to include protocol
Noel Power [Fri, 6 Dec 2019 17:30:38 +0000 (17:30 +0000)] 
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>
5 years agos3/selftest: Move samba3.blackbox.net.misc to ad_dc
Noel Power [Fri, 6 Dec 2019 17:27:53 +0000 (17:27 +0000)] 
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>
5 years agoselftest: Move samba3.blackbox.shadow_copy2 NT1 to fileserver_smb1
Noel Power [Fri, 6 Dec 2019 17:13:27 +0000 (17:13 +0000)] 
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>
5 years agoselftest: samba3.blackbox.* so it can run SMB1 & >= SMB2
Noel Power [Fri, 6 Dec 2019 15:13:44 +0000 (15:13 +0000)] 
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>
5 years agoautobuild: Add ad_dc_default_smb1 to autobuild jobs
Noel Power [Wed, 18 Dec 2019 10:32:59 +0000 (10:32 +0000)] 
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>
5 years agoselftest/target: Add test environment ad_dc_default_smb1_done
Noel Power [Tue, 17 Dec 2019 15:39:47 +0000 (15:39 +0000)] 
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>
5 years agoautobuild: Add nt4_dc_smb1_done to autobuild jobs
Noel Power [Wed, 18 Dec 2019 10:26:14 +0000 (10:26 +0000)] 
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>
5 years agoselftest/target: Create nt4_dc_smb1_done env (alias for nt4_dc_smb1)
Noel Power [Tue, 17 Dec 2019 15:22:42 +0000 (15:22 +0000)] 
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>
5 years agoautobuild: Add fileserver_smb1_done to autbuild jobs
Noel Power [Wed, 18 Dec 2019 10:21:49 +0000 (10:21 +0000)] 
autobuild: Add fileserver_smb1_done to autbuild jobs

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoselftest/target: Add new alias environment fileserver_smb1_done
Noel Power [Tue, 17 Dec 2019 15:26:08 +0000 (15:26 +0000)] 
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>
5 years agoautobuild: Add ad_dc_smb1_done to autobuild jobs
Noel Power [Wed, 18 Dec 2019 10:20:45 +0000 (10:20 +0000)] 
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>
5 years agoselftest/target: Add new alias environment ad_dc_smb1_done
Noel Power [Tue, 17 Dec 2019 15:31:27 +0000 (15:31 +0000)] 
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>
5 years agoselftest/target: create return_alias_env function for Samba3.pm
Noel Power [Tue, 17 Dec 2019 15:18:06 +0000 (15:18 +0000)] 
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>
5 years agoautobuild: Add ad_dc_default_smb1 to autobuild jobs
Noel Power [Wed, 18 Dec 2019 10:31:29 +0000 (10:31 +0000)] 
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>
5 years agoselftest/target: Add new alias env ad_dc_default_smb1
Noel Power [Mon, 16 Dec 2019 17:39:04 +0000 (17:39 +0000)] 
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>
5 years agoautobuild: Add new nt4_dc_smb1 env to jobs
Noel Power [Fri, 13 Dec 2019 10:24:07 +0000 (10:24 +0000)] 
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>
5 years agoselftest/target: Create new nt4_dc_smb1 environment
Noel Power [Fri, 13 Dec 2019 10:22:36 +0000 (10:22 +0000)] 
selftest/target: Create new nt4_dc_smb1 environment

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoscript: Add ad_dc_smb1 to autobuild jobs
Noel Power [Fri, 6 Dec 2019 15:20:48 +0000 (15:20 +0000)] 
script: Add ad_dc_smb1 to autobuild jobs

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoselftest: Create new test env ad_dc_smb1
Noel Power [Wed, 4 Dec 2019 15:27:04 +0000 (15:27 +0000)] 
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>
5 years agoselftest/manage-ca: Add certificiate etc. for DC addcsmb1
Noel Power [Fri, 28 Feb 2020 13:32:01 +0000 (13:32 +0000)] 
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>
5 years agoscript: Add testenv fileserver_smb1 to autobuild jobs
Noel Power [Tue, 7 Jan 2020 10:17:49 +0000 (10:17 +0000)] 
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>
5 years agoselftest: Add new test environment fileserver_smb1
Noel Power [Wed, 4 Dec 2019 11:50:48 +0000 (11:50 +0000)] 
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>
5 years agoselftest: adjust skip_file (after adjusting s4member and rpc_proxy)
Noel Power [Thu, 5 Dec 2019 17:00:29 +0000 (17:00 +0000)] 
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>
5 years agoselftest: Allow rpc_proxy & s4member also negotiate SMB1
Noel Power [Wed, 4 Dec 2019 11:06:44 +0000 (11:06 +0000)] 
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>
5 years agoselftest: disable SMB1 from testenv(s) make >=SMB2 the default
Noel Power [Fri, 27 Sep 2019 14:24:25 +0000 (15:24 +0100)] 
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>
5 years agoselftest: Exclude SMB1 tests that would fail when SMB1 is disabled
Noel Power [Tue, 22 Oct 2019 21:57:36 +0000 (22:57 +0100)] 
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>
5 years agoselftest: Create a file to exclude tests that fail with SMB1
Noel Power [Mon, 21 Oct 2019 14:27:10 +0000 (15:27 +0100)] 
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>
5 years agoselftest: Allow ad_dc_ntvfs negotiate smb1 still
Noel Power [Wed, 27 Nov 2019 08:30:06 +0000 (08:30 +0000)] 
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>
5 years agos3/selftest: Fix typo in test generator script
Noel Power [Mon, 9 Dec 2019 10:12:17 +0000 (10:12 +0000)] 
s3/selftest: Fix typo in test generator script

Introduced in a64516099936 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>
5 years agoselftest: allow SMB1 in clusteredmember env
Ralph Boehme [Fri, 21 Feb 2020 16:44:55 +0000 (17:44 +0100)] 
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>
5 years agosamba-tool group show: only shows global security groups, this patch makes it show...
Rowland Penny [Thu, 2 Apr 2020 08:29:18 +0000 (09:29 +0100)] 
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

5 years agodbwrap: fix possible memleak and false result check.
Swen Schillig [Mon, 30 Mar 2020 10:54:00 +0000 (12:54 +0200)] 
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

5 years agodbwrap: fix comment in code leading to wrong function parameter
Swen Schillig [Mon, 30 Mar 2020 10:44:59 +0000 (12:44 +0200)] 
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>
5 years agoctdbd_conn: possible memleak in ctdbd_db_attach
Swen Schillig [Mon, 30 Mar 2020 10:34:12 +0000 (12:34 +0200)] 
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>
5 years agoctdbd_conn: possible memleak in ctdbd_dbpath
Swen Schillig [Mon, 30 Mar 2020 10:29:38 +0000 (12:29 +0200)] 
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>
5 years agoctdbd_conn: possible memleak in ctdbd_working
Swen Schillig [Mon, 30 Mar 2020 10:22:46 +0000 (12:22 +0200)] 
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>
5 years agoscript/autobuild.py: allow write_system_info commands to fail
Stefan Metzmacher [Thu, 27 Feb 2020 23:00:08 +0000 (00:00 +0100)] 
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

5 years agoscript/autobuild.py: use more portable 'cp -R -a -l'
Stefan Metzmacher [Thu, 27 Feb 2020 22:59:00 +0000 (23:59 +0100)] 
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>
5 years agoscript/autobuild.py: add support git worktree
Stefan Metzmacher [Thu, 27 Feb 2020 22:58:42 +0000 (23:58 +0100)] 
script/autobuild.py: add support git worktree

.git is not always a directory, with 'git worktree' it's a file.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years ago.gitlab-ci.yml: actually run ubuntu2004-samba-o3
Stefan Metzmacher [Wed, 1 Apr 2020 22:22:26 +0000 (00:22 +0200)] 
.gitlab-ci.yml: actually run ubuntu2004-samba-o3

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3/utils: Fix double free error with smbtree
Noel Power [Wed, 1 Apr 2020 11:26:09 +0000 (12:26 +0100)] 
s3/utils: Fix double free error with smbtree

==3632==
WORKGROUP
\\ATP
\\ATP\IPC$            IPC Service ()
==3632== Invalid read of size 8
==3632==    at 0x773C926: poptResetContext (in /usr/lib64/libpopt.so.0.0.0)
==3632==    by 0x773E5DD: poptFreeContext (in /usr/lib64/libpopt.so.0.0.0)
==3632==    by 0x10A8BC: main (smbtree.c:354)
==3632==  Address 0x16085e00 is 640 bytes inside a block of size 784 free'd
==3632==    at 0x4C2F1AD: free (vg_replace_malloc.c:530)
==3632==    by 0x773E6F7: poptFreeContext (in /usr/lib64/libpopt.so.0.0.0)
==3632==    by 0x10A84B: main (smbtree.c:342)
==3632==  Block was alloc'd at
==3632==    at 0x4C2FE45: calloc (vg_replace_malloc.c:711)
==3632==    by 0x773C79A: poptGetContext (in /usr/lib64/libpopt.so.0.0.0)
==3632==    by 0x10A829: main (smbtree.c:339)
==3632==

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14332
Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Apr  1 18:51:43 UTC 2020 on sn-devel-184

5 years agos3:rpc_server: Fix talloc_free() with references error on server exit
Samuel Cabrero [Fri, 27 Mar 2020 18:52:26 +0000 (19:52 +0100)] 
s3:rpc_server: Fix talloc_free() with references error on server exit

Fixes talloc_free() with references when smbd exists and talloc_free the
global dcesrv context:

ERROR: talloc_free with references at ../../source3/rpc_server/rpc_config.c:73
reference at ../../source3/rpc_server/rpc_server.c:193
reference at ../../source3/rpc_server/rpc_server.c:592
...

The talloc_reference to make the dcerpc_ncacn_listen_state a parent of
the dcesrv context is not necessary as the listen state is allocated
under the endpoint, which is allocated under the dcesrv context:

full talloc report on 'struct dcesrv_context' (total  12298 bytes in 188 blocks)
    ...
    struct dcesrv_endpoint         contains    691 bytes in  11 blocks (ref 0) 0x55ae964d79a0
        struct dcerpc_ncacn_listen_state contains    160 bytes in   2 blocks (ref 0) 0x55ae964fca60
            struct tevent_fd               contains    104 bytes in   1 blocks (ref 0) 0x55ae964f36f0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e8a40
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e8ac0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e8870
            ../../librpc/rpc/dcesrv_core.c:327 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e8970
        struct dcerpc_binding          contains    108 bytes in   2 blocks (ref 0) 0x55ae964e87a0
            \pipe\lsass                    contains     12 bytes in   1 blocks (ref 0) 0x55ae964e88f0
        struct dcerpc_binding          contains    111 bytes in   2 blocks (ref 0) 0x55ae964e86d0
            \pipe\netlogon                 contains     15 bytes in   1 blocks (ref 0) 0x55ae964e8650
    ...
    struct dcesrv_endpoint         contains   1728 bytes in  27 blocks (ref 0) 0x55ae964e0db0
        struct dcerpc_ncacn_listen_state contains    160 bytes in   2 blocks (ref 0) 0x55ae964fd540
            struct tevent_fd               contains    104 bytes in   1 blocks (ref 0) 0x55ae964f3890
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964fbd70
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964f67a0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964fff60
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964f66c0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964eb8b0
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964eba00
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964eb200
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964eb350
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964eab70
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964eabf0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964ea360
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964ea4b0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e9cb0
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e9e00
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e96a0
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e97f0
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e8430
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e8580
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e6250
            ../../librpc/rpc/dcesrv_core.c:360 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e8070
        struct dcesrv_if_list          contains    128 bytes in   2 blocks (ref 0) 0x55ae964e7e50
            ../../librpc/rpc/dcesrv_core.c:327 contains    104 bytes in   1 blocks (ref 0) 0x55ae964e7fa0
        struct dcerpc_binding          contains    104 bytes in   2 blocks (ref 0) 0x55ae964e7ed0
            DEFAULT                        contains      8 bytes in   1 blocks (ref 0) 0x55ae964eaa10
    ....

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Apr  1 10:28:43 UTC 2020 on sn-devel-184

5 years agodlz_bind9: Avoid talloc_new(NULL), use a parent variable
Andrew Bartlett [Fri, 27 Mar 2020 03:10:44 +0000 (16:10 +1300)] 
dlz_bind9: Avoid talloc_new(NULL), use a parent variable

This will help provide a better memory tree if we ever suspect a problem
here.  The tmp_ctx varaible is always freed before the end of this
function.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agogitlab-ci: Use a shared ccache for the runners
Andreas Schneider [Sun, 29 Mar 2020 15:20:32 +0000 (17:20 +0200)] 
gitlab-ci: Use a shared ccache for the runners

https://docs.gitlab.com/ee/ci/caching/

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Apr  1 07:25:33 UTC 2020 on sn-devel-184

5 years agogitlab-ci: Add ccache and wget
Andreas Schneider [Sun, 29 Mar 2020 14:49:51 +0000 (16:49 +0200)] 
gitlab-ci: Add ccache and wget

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosmbd: remove struct privilege_paths
Ralph Boehme [Mon, 30 Mar 2020 06:06:10 +0000 (08:06 +0200)] 
smbd: remove struct privilege_paths

The last user of this had been removed by
d485c43cc74c5550d151fe728ddc53b02ab23df8.

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): Tue Mar 31 19:32:12 UTC 2020 on sn-devel-184

5 years agolib ldb: lmdb clear stale readers on write txn start
Gary Lockyer [Sun, 29 Mar 2020 23:08:30 +0000 (12:08 +1300)] 
lib ldb: lmdb clear stale readers on write txn start

In use process failures and Bind9 shut downs leave stale entries in the
lmdb reader table.  This can result in lmdb filling it's database file, as
the free list can not be reclaimed due to the stale reader.

In this fix we call mdb_reader_check at the start of each transaction,
to free any stale readers.  As the default maximum number of readers is
127, this should not impact on performance to any great extent.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 31 01:26:07 UTC 2020 on sn-devel-184

5 years agos3: smbd: RIP smb_filename->original_lcomp.
Jeremy Allison [Thu, 26 Mar 2020 23:30:48 +0000 (16:30 -0700)] 
s3: smbd: RIP smb_filename->original_lcomp.

Removed from struct smb_filename. You will not be missed :-).
Note that VFS ABI modified.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Mar 30 16:23:45 UTC 2020 on sn-devel-184

5 years agos3: smbd: Remove UCF_SAVE_LCOMP flag. Note it is no longer used.
Jeremy Allison [Thu, 26 Mar 2020 23:27:25 +0000 (16:27 -0700)] 
s3: smbd: Remove UCF_SAVE_LCOMP flag. Note it is no longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove all references to original_lcomp from name copying code.
Jeremy Allison [Thu, 26 Mar 2020 23:24:08 +0000 (16:24 -0700)] 
s3: smbd: Remove all references to original_lcomp from name copying code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Now we no longer use it, remove all references to original_lcomp from pathn...
Jeremy Allison [Thu, 26 Mar 2020 23:22:36 +0000 (16:22 -0700)] 
s3: smbd: Now we no longer use it, remove all references to original_lcomp from pathname processing code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Use get_original_lcomp() inside smb_file_rename_information().
Jeremy Allison [Thu, 26 Mar 2020 23:18:53 +0000 (16:18 -0700)] 
s3: smbd: Use get_original_lcomp() inside smb_file_rename_information().

Pass to rename_internals_fsp() and rename_internals().

Removes the last uses of the struct member original_lcomp
outside of the filename and struct util copying code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Use get_original_lcomp() inside smb2_file_rename_information().
Jeremy Allison [Thu, 26 Mar 2020 22:59:51 +0000 (15:59 -0700)] 
s3: smbd: Use get_original_lcomp() inside smb2_file_rename_information().

Pass to rename_internals_fsp(). Note this is a logic change,
as the original code only set smb_fname->original_lcomp if
it was doing a stream rename. Inside rename_internals_fsp()
we only look at original_lcomp in the stream rename case, so
this code worked. However, it is much safer to always correctly
create dst_original_lcomp than pass in a NULL here. It won't
hurt if it's not actually looked at.

Removes one more use of the struct member original_lcomp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Use get_original_lcomp() inside reply_mv().
Jeremy Allison [Thu, 26 Mar 2020 22:51:18 +0000 (15:51 -0700)] 
s3: smbd: Use get_original_lcomp() inside reply_mv().

Pass to rename_internals().

Removes one more use of the struct member original_lcomp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Use get_original_lcomp() inside reply_ntrename().
Jeremy Allison [Thu, 26 Mar 2020 22:48:08 +0000 (15:48 -0700)] 
s3: smbd: Use get_original_lcomp() inside reply_ntrename().

Pass to rename_internals().

Removes one more use of the struct member original_lcomp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Inside rename_internals() wildcard case, re-purpose dst_original_lcomp.
Jeremy Allison [Thu, 26 Mar 2020 22:32:36 +0000 (15:32 -0700)] 
s3: smbd: Inside rename_internals() wildcard case, re-purpose dst_original_lcomp.

Pass to rename_internals_fsp() instead of using smb_fname_dst->original_lcomp.

Removes one more use of the struct member original_lcomp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Add 'const char *dst_original_lcomp' parameter to rename_internals()
Jeremy Allison [Thu, 26 Mar 2020 01:41:10 +0000 (18:41 -0700)] 
s3: smbd: Add 'const char *dst_original_lcomp' parameter to rename_internals()

Pass through the existing smb_fname_dst->original_lcomp
parameter so no logic change. Preparing to remove the
use of original_lcomp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Reformatting caller of rename_internals() to make it easer to see changed...
Jeremy Allison [Thu, 26 Mar 2020 00:17:30 +0000 (17:17 -0700)] 
s3: smbd: Reformatting caller of rename_internals() to make it easer to see changed parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Add a dst_original_lcomp parameter to rename_internals_fsp().
Jeremy Allison [Wed, 25 Mar 2020 23:20:23 +0000 (16:20 -0700)] 
s3: smbd: Add a dst_original_lcomp parameter to rename_internals_fsp().

Currently passed in as dst_fname->original_lcomp in all callers
but will eventually be converted to allow original_lcomp to be
removed from struct smb_filename.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>