]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
6 years agos4:torture: Convert samba4.base.secleak test to smb2
David Mulder [Fri, 17 Jan 2020 16:07:00 +0000 (09:07 -0700)] 
s4:torture: Convert samba4.base.secleak test to smb2

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Noel Power <noel.power@suse.com>
6 years agos3: smbd: Allow a SHUTDOWN_CLOSE on a file with outstanding aio if there are no clien...
Jeremy Allison [Tue, 16 Jun 2020 22:01:49 +0000 (15:01 -0700)] 
s3: smbd: Allow a SHUTDOWN_CLOSE on a file with outstanding aio if there are no client connections alive.

The process is exiting now so pthreads will never complete to cause
problems.

Remove the knownfail.d/aio_outstanding entry.

Followup-bugfix for:

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 24 20:14:15 UTC 2020 on sn-devel-184

6 years agos3: smbd: Make smbXsrv_client_valid_connections() external.
Jeremy Allison [Tue, 16 Jun 2020 21:58:54 +0000 (14:58 -0700)] 
s3: smbd: Make smbXsrv_client_valid_connections() external.

We will need to this ensure our client connections are
terminated in close_file before exiting with outstanding
aio.

Followup-bugfix for:

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agos3: selftest: Add samba3.blackbox.aio-outstanding test.
Jeremy Allison [Mon, 22 Jun 2020 20:44:12 +0000 (13:44 -0700)] 
s3: selftest: Add samba3.blackbox.aio-outstanding test.

Shows smbd panics if connection is terminated (torn down)
by killing the client with outstanding aio requests in the
queue. As we're closing smbd we should cope with this.

Followup-bugfix for:

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agogpo: Test samba-tool gpo admxload
David Mulder [Thu, 18 Jun 2020 18:06:28 +0000 (12:06 -0600)] 
gpo: Test samba-tool gpo admxload

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Tue Jun 23 17:53:22 UTC 2020 on sn-devel-184

6 years agosamba-tool: add command for installing gpo samba admx
David Mulder [Tue, 16 Oct 2018 09:36:09 +0000 (03:36 -0600)] 
samba-tool: add command for installing gpo samba admx

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agoAdd python binding for DATADIR build path
David Mulder [Tue, 16 Oct 2018 09:23:34 +0000 (03:23 -0600)] 
Add python binding for DATADIR build path

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agogpo: Test gpo scripts apply
David Mulder [Tue, 16 Jun 2020 21:29:40 +0000 (15:29 -0600)] 
gpo: Test gpo scripts apply

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agogpo: Run Group Policy Scripts
David Mulder [Mon, 27 Apr 2020 22:02:55 +0000 (16:02 -0600)] 
gpo: Run Group Policy Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agoCreate Registry.pol group policy extension parser
David Mulder [Thu, 9 Aug 2018 15:47:38 +0000 (09:47 -0600)] 
Create Registry.pol group policy extension parser

Create a parent class for parsing Registry.pol
files by group policy extensions.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agonsswitch: silence openpam error messages about unexpected responses
Andrew [Fri, 19 Jun 2020 17:11:48 +0000 (13:11 -0400)] 
nsswitch: silence openpam error messages about unexpected responses

Openpam will log an error message when it receives an unexpected
response. On servers using openpam, convert an unexpected response
into PAM_SERVICE_ERR and log what we're doing so that logging behavior
is more user-configurable.

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

Signed-off-by: Andrew <awalker@ixsystems.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jun 23 08:08:29 UTC 2020 on sn-devel-184

6 years agothird_party/socket_wrapper: Update socket_wrapper to version 1.2.5
Stefan Metzmacher [Mon, 8 Jun 2020 12:18:00 +0000 (14:18 +0200)] 
third_party/socket_wrapper: Update socket_wrapper to version 1.2.5

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 23 06:46:39 UTC 2020 on sn-devel-184

6 years agopython: Correctly re-raise the LdbError if the embedded error is not ldb.ERR_UNWILLIN...
Andrew Bartlett [Wed, 17 Jun 2020 20:39:09 +0000 (08:39 +1200)] 
python: Correctly re-raise the LdbError if the embedded error is not ldb.ERR_UNWILLING_TO_PERFORM

The current code attempts a SAMR based password set for all errors,
we want to continue on LDAP or local LDB (in the restore case) unless
we really got the specific error given by Windows 2000.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Tue Jun 23 05:07:00 UTC 2020 on sn-devel-184

6 years agolibcli ldap tests: remove use of zero length array
Gary Lockyer [Mon, 22 Jun 2020 01:42:56 +0000 (13:42 +1200)] 
libcli ldap tests: remove use of zero length array

libcli/ldap/tests/ldap_message_test.c defines a zero length array
(uint8_t buf[0]), which is a GCC extension and breaks the build with
some strict compilers like xlc.

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

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 Jun 23 02:15:35 UTC 2020 on sn-devel-184

6 years agoldap.c: clarify the need for ldap_get_values_len() in a code comment
Isaac Boukris [Mon, 22 Jun 2020 21:08:57 +0000 (23:08 +0200)] 
ldap.c: clarify the need for ldap_get_values_len() in a code comment

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotests: Only run mdsparser test if we build with spotlight support
Andreas Schneider [Mon, 22 Jun 2020 14:06:36 +0000 (16:06 +0200)] 
tests: Only run mdsparser test if we build with spotlight support

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 Jun 22 15:53:30 UTC 2020 on sn-devel-184

6 years agogitlab-ci: Use Fedora 32 to test FIPS mode
Andreas Schneider [Mon, 22 Jun 2020 11:52:05 +0000 (13:52 +0200)] 
gitlab-ci: Use Fedora 32 to test FIPS mode

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agobootstrap: Add back quota-devel on CentOS8
Andreas Schneider [Wed, 17 Jun 2020 12:16:13 +0000 (14:16 +0200)] 
bootstrap: Add back quota-devel on CentOS8

https://bugs.centos.org/view.php?id=16549

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agolibcli: Remove define STATUS_EA_LIST_INCONSISTENT
Christof Schmitt [Fri, 19 Jun 2020 20:07:39 +0000 (13:07 -0700)] 
libcli: Remove define STATUS_EA_LIST_INCONSISTENT

The auto-generated define NT_STATUS_EA_LIST_INCONSISTENT is still
available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jun 22 13:30:51 UTC 2020 on sn-devel-184

6 years agolibcli: Remove define STATUS_STOPPED_ON_SYMLINK
Christof Schmitt [Fri, 19 Jun 2020 20:06:08 +0000 (13:06 -0700)] 
libcli: Remove define STATUS_STOPPED_ON_SYMLINK

The auto-generated define NT_STATUS_STOPPED_ON_SYMLINK is still
available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Remove define for STATUS_PENDING
Christof Schmitt [Fri, 19 Jun 2020 20:03:18 +0000 (13:03 -0700)] 
libcli: Remove define for STATUS_PENDING

The auto-generated define NT_STATUS_PENDING is still available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosmbd: Use NT_STATUS_PENDING instead of STATUS_PENDING
Christof Schmitt [Fri, 19 Jun 2020 20:00:23 +0000 (13:00 -0700)] 
smbd: Use NT_STATUS_PENDING instead of STATUS_PENDING

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosource4/smb_server: Use NT_STATUS_PENDING instead of STATUS_PENDING
Christof Schmitt [Fri, 19 Jun 2020 19:59:12 +0000 (12:59 -0700)] 
source4/smb_server: Use NT_STATUS_PENDING instead of STATUS_PENDING

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosource4/libcli: Use NT_STATUS_PENDING instead of STATUS_PENDING
Christof Schmitt [Fri, 19 Jun 2020 19:58:04 +0000 (12:58 -0700)] 
source4/libcli: Use NT_STATUS_PENDING instead of STATUS_PENDING

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosmbtorture: Use NT_STATUS_PENDING instead of STATUS_PENDING
Christof Schmitt [Fri, 19 Jun 2020 19:56:56 +0000 (12:56 -0700)] 
smbtorture: Use NT_STATUS_PENDING instead of STATUS_PENDING

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Use NT_STATUS_PENDING instead of STATUS_PENDING
Christof Schmitt [Fri, 19 Jun 2020 19:55:13 +0000 (12:55 -0700)] 
libcli: Use NT_STATUS_PENDING instead of STATUS_PENDING

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Remove define for STATUS_NOTIFY_ENUM_DIR
Christof Schmitt [Fri, 19 Jun 2020 19:54:16 +0000 (12:54 -0700)] 
libcli: Remove define for STATUS_NOTIFY_ENUM_DIR

The auto-generated define NT_STATUS_NOTIFY_ENUM_DIR is still available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agontvfs: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR
Christof Schmitt [Fri, 19 Jun 2020 19:47:06 +0000 (12:47 -0700)] 
ntvfs: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosmbtorture: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR
Christof Schmitt [Fri, 19 Jun 2020 19:45:36 +0000 (12:45 -0700)] 
smbtorture: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosmbclient: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR
Christof Schmitt [Fri, 19 Jun 2020 19:43:54 +0000 (12:43 -0700)] 
smbclient: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosmbd: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR
Christof Schmitt [Fri, 19 Jun 2020 19:42:50 +0000 (12:42 -0700)] 
smbd: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Remove define for STATUS_NOTIFY_CLEANUP
Christof Schmitt [Fri, 19 Jun 2020 19:41:33 +0000 (12:41 -0700)] 
libcli: Remove define for STATUS_NOTIFY_CLEANUP

The auto-generated NT_STATUS_NOTIFY_CLEANUP is still available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agotorture: Use NT_STATUS_NOTIFY_CLEANUP instead of STATUS_NOTIFY_CLEANUP
Christof Schmitt [Fri, 19 Jun 2020 19:39:22 +0000 (12:39 -0700)] 
torture: Use NT_STATUS_NOTIFY_CLEANUP instead of STATUS_NOTIFY_CLEANUP

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agosmbd: Use NT_STATUS_NOTIFY_CLEANUP instead of STATUS_NOTIFY_CLEANUP
Christof Schmitt [Fri, 19 Jun 2020 19:38:59 +0000 (12:38 -0700)] 
smbd: Use NT_STATUS_NOTIFY_CLEANUP instead of STATUS_NOTIFY_CLEANUP

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Remove define for STATUS_INVALID_EA_FLAG
Christof Schmitt [Fri, 19 Jun 2020 19:33:29 +0000 (12:33 -0700)] 
libcli: Remove define for STATUS_INVALID_EA_FLAG

The auto-generated define NT_STATUS_INVALID_EA_FLAG is still available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Remove define STATUS_NO_MORE_EAS
Christof Schmitt [Fri, 19 Jun 2020 19:28:55 +0000 (12:28 -0700)] 
libcli: Remove define STATUS_NO_MORE_EAS

The auto-generated define NT_STATUS_NO_MORE_EAS is still available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agolibcli: Remove define for ERROR_INVALID_DATATYPE
Christof Schmitt [Fri, 19 Jun 2020 19:19:03 +0000 (12:19 -0700)] 
libcli: Remove define for ERROR_INVALID_DATATYPE

The auto-generated define WERR_INVALID_DATATYPE is still available.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agoFix usage of ldap_get_values_len for msDS-AdditionalDnsHostName
Isaac Boukris [Sat, 20 Jun 2020 15:17:33 +0000 (17:17 +0200)] 
Fix usage of ldap_get_values_len for msDS-AdditionalDnsHostName

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jun 22 09:59:04 UTC 2020 on sn-devel-184

6 years agovfs_shadow_copy2: Fix a log message
Anoop C S [Sat, 20 Jun 2020 11:44:40 +0000 (17:14 +0530)] 
vfs_shadow_copy2: Fix a log message

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Sun Jun 21 16:20:26 UTC 2020 on sn-devel-184

6 years agovfs_shadow_copy: Fix a log message
Anoop C S [Sat, 20 Jun 2020 11:43:49 +0000 (17:13 +0530)] 
vfs_shadow_copy: Fix a log message

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agopython: Fix get_max_worker_count() to always have two runners
Andreas Schneider [Fri, 19 Jun 2020 15:35:19 +0000 (17:35 +0200)] 
python: Fix get_max_worker_count() to always have two runners

Thanks to Jim Brown.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 19 19:54:04 UTC 2020 on sn-devel-184

6 years agopython: Run cmdline tools for arbitary docs test in parallel
Andreas Schneider [Wed, 17 Jun 2020 09:24:13 +0000 (11:24 +0200)] 
python: Run cmdline tools for arbitary docs test in parallel

Running samba.tests.docs on my machine:
before -> (2m6.952s)
after  -> (22.298s)

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): Fri Jun 19 10:59:30 UTC 2020 on sn-devel-184

6 years agopython: Run cmdline tools for default docs test in parallel
Andreas Schneider [Wed, 17 Jun 2020 08:04:27 +0000 (10:04 +0200)] 
python: Run cmdline tools for default docs test in parallel

Running samba.tests.docs on my machine:
before -> (3m52.582s)
after  -> (2m6.952s)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 years agoldb_ldap: fix off-by-one increment in lldb_add_msg_attr
Alexander Bokovoy [Thu, 18 Jun 2020 07:45:41 +0000 (10:45 +0300)] 
ldb_ldap: fix off-by-one increment in lldb_add_msg_attr

Fix regression introduced by commit ce2bf5c72b6423fff680b3d6a9042103a6cdda55

lldb_add_msg_attr() calls ldb_msg_add_empty() which, in turn, calls
calls _ldb_msg_add_el() which already increments msg->num_elements by one.

As a result, msg->num_elements is bigger than the actual number of
elements and any iteration over elements would step over elements array
boundary.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14413
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 19 08:35:33 UTC 2020 on sn-devel-184

6 years agolib/ldb: add unit test for ldb_ldap internal code
Alexander Bokovoy [Thu, 18 Jun 2020 08:49:08 +0000 (11:49 +0300)] 
lib/ldb: add unit test for ldb_ldap internal code

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14413
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoProperly handle msDS-AdditionalDnsHostName returned from Windows DC
Isaac Boukris [Thu, 11 Jun 2020 13:51:27 +0000 (16:51 +0300)] 
Properly handle msDS-AdditionalDnsHostName returned from Windows DC

Windows DC adds short names for each specified msDS-AdditionalDnsHostName
attribute, but these have a suffix of "\0$" and thus fail with
ldap_get_values(), use ldap_get_values_len() instead.

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Isaac Boukris <iboukris@samba.org>
Autobuild-Date(master): Thu Jun 18 16:43:47 UTC 2020 on sn-devel-184

6 years agoselftest: add tests for binary msDS-AdditionalDnsHostName
Isaac Boukris [Tue, 16 Jun 2020 19:01:49 +0000 (22:01 +0300)] 
selftest: add tests for binary msDS-AdditionalDnsHostName

Like the short names added implicitly by Windows DC.

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoFix a typo in recent net man page changes
Isaac Boukris [Thu, 11 Jun 2020 18:05:07 +0000 (21:05 +0300)] 
Fix a typo in recent net man page changes

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3:lib:tls: Use better priority lists for modern GnuTLS
Andreas Schneider [Mon, 15 Jun 2020 09:50:16 +0000 (11:50 +0200)] 
s3:lib:tls: Use better priority lists for modern GnuTLS

We should use the default priority list. That is a good practice,
because TLS protocol hardening and phasing out of legacy algorithms,
is easier to co-ordinate when happens at a single place. See crypto
policies of Fedora.

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

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): Wed Jun 17 17:42:02 UTC 2020 on sn-devel-184

6 years agodocs: Add caution against extending this list
Andrew Bartlett [Tue, 16 Jun 2020 21:25:17 +0000 (09:25 +1200)] 
docs: Add caution against extending this list

We want correct documentation if at all possible.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 17 15:48:06 UTC 2020 on sn-devel-184

6 years agodocs: Remove defaults test exception for "mit kdc command"
Andrew Bartlett [Tue, 16 Jun 2020 20:42:08 +0000 (08:42 +1200)] 
docs: Remove defaults test exception for "mit kdc command"

This ensures the documentation matches the code.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agodocs: Ensure "use mmap" always has the correct default
Andrew Bartlett [Tue, 16 Jun 2020 21:21:56 +0000 (09:21 +1200)] 
docs: Ensure "use mmap" always has the correct default

We clarify the smb.conf manpage entry for "use mmap" to match the actual behaviour

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agovfs_glusterfs: Enable caching of selinux xattr by default
Anoop C S [Sun, 31 May 2020 17:00:53 +0000 (22:30 +0530)] 
vfs_glusterfs: Enable caching of selinux xattr by default

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Jun 17 08:23:33 UTC 2020 on sn-devel-184

6 years agos3:lib: Make sure that have_rsrc is initialized
Andreas Schneider [Mon, 15 Jun 2020 08:46:12 +0000 (10:46 +0200)] 
s3:lib: Make sure that have_rsrc is initialized

This is never set to false, only to true in the code.

Found by clang.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Isaac Boukris <iboukris@samba.org>
Autobuild-Date(master): Tue Jun 16 10:30:17 UTC 2020 on sn-devel-184

6 years agos3:smbd: Fix a possibile null pointer dereference
Andreas Schneider [Mon, 15 Jun 2020 08:32:49 +0000 (10:32 +0200)] 
s3:smbd: Fix a possibile null pointer dereference

Found by clang.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos4:torture: Make sure that ctx is initialized to NULL
Andreas Schneider [Wed, 10 Jun 2020 16:08:13 +0000 (18:08 +0200)] 
s4:torture: Make sure that ctx is initialized to NULL

If we go to done and call smbc_free_context() the pointer should be
initialized.

Found by clang.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3:locking: Remove dead code
Andreas Schneider [Wed, 10 Jun 2020 15:56:30 +0000 (17:56 +0200)] 
s3:locking: Remove dead code

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3:rpc_server: Check return code of set_blocking()
Andreas Schneider [Wed, 10 Jun 2020 15:38:36 +0000 (17:38 +0200)] 
s3:rpc_server: Check return code of set_blocking()

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3:samr: Add missing NULL pointer check
Andreas Schneider [Wed, 10 Jun 2020 15:35:55 +0000 (17:35 +0200)] 
s3:samr: Add missing NULL pointer check

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3:notifyd: Check return value of lp_load_initial_only()
Andreas Schneider [Wed, 10 Jun 2020 15:32:11 +0000 (17:32 +0200)] 
s3:notifyd: Check return value of lp_load_initial_only()

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3:lib: Avoid a NULL pointer deref on log level 10
Andreas Schneider [Wed, 10 Jun 2020 15:21:16 +0000 (17:21 +0200)] 
s3:lib: Avoid a NULL pointer deref on log level 10

Found by cppcheck.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3:rpc_server: Pass a pointer to add_filemeta()
Andreas Schneider [Wed, 10 Jun 2020 15:09:39 +0000 (17:09 +0200)] 
s3:rpc_server: Pass a pointer to add_filemeta()

Review with: git show -U10

Found by cppcheck.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agovfs: Move reparse point functions to util_reparse.c
Volker Lendecke [Thu, 11 Jun 2020 13:15:02 +0000 (15:15 +0200)] 
vfs: Move reparse point functions to util_reparse.c

Shamelessly copied from from Jeremy's smb2-unix branch :-)

No change in behaviour, but we will have to cope with reparse points in the
future.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jun 15 19:25:40 UTC 2020 on sn-devel-184

6 years agoldb: Avoid a cast (unsigned long long) in ldbmodify.c
Volker Lendecke [Mon, 15 Jun 2020 10:32:36 +0000 (12:32 +0200)] 
ldb: Avoid a cast (unsigned long long) in ldbmodify.c

We have %zu for size_t

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolib: Remove an unused macro
Volker Lendecke [Thu, 11 Jun 2020 12:49:58 +0000 (14:49 +0200)] 
lib: Remove an unused macro

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibsmb: Add overflow protection to symlink_reparse_buffer_marshall()
Volker Lendecke [Thu, 11 Jun 2020 12:42:49 +0000 (14:42 +0200)] 
libsmb: Add overflow protection to symlink_reparse_buffer_marshall()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibcli: Add tevent_req_received() calls to smb2cli_create_recv()
Volker Lendecke [Tue, 9 Jun 2020 16:54:07 +0000 (18:54 +0200)] 
libcli: Add tevent_req_received() calls to smb2cli_create_recv()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibcli: Move IO_REPARSE_TAG definitions to smb_constants.h
Volker Lendecke [Tue, 9 Jun 2020 15:18:35 +0000 (17:18 +0200)] 
libcli: Move IO_REPARSE_TAG definitions to smb_constants.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibcli: Slightly simplify smb2cli_req_recv() with an early return
Volker Lendecke [Tue, 9 Jun 2020 14:15:46 +0000 (16:15 +0200)] 
libcli: Slightly simplify smb2cli_req_recv() with an early return

One if-condition less

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Apply a bit of README.Coding to unix_convert()
Volker Lendecke [Mon, 15 Jun 2020 10:16:36 +0000 (12:16 +0200)] 
smbd: Apply a bit of README.Coding to unix_convert()

Looking at that more closely right now...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Reduce indentation in check_reduced_name()
Volker Lendecke [Fri, 12 Jun 2020 09:36:56 +0000 (11:36 +0200)] 
smbd: Reduce indentation in check_reduced_name()

No change in behaviour.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolib: Move a #define ip_equal_v4() to nmbd/nmbd.h
Volker Lendecke [Thu, 11 Jun 2020 12:48:48 +0000 (14:48 +0200)] 
lib: Move a #define ip_equal_v4() to nmbd/nmbd.h

It's only used there

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Fix typos
Volker Lendecke [Sat, 13 Jun 2020 13:32:31 +0000 (15:32 +0200)] 
smbd: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotsocket: Fix a typo
Volker Lendecke [Sun, 14 Jun 2020 14:36:23 +0000 (16:36 +0200)] 
tsocket: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agonet: Align integer types
Volker Lendecke [Sun, 14 Jun 2020 08:45:39 +0000 (10:45 +0200)] 
net: Align integer types

"i" is used to loop over an int as well. Introduce an int helper
variable that is autoconverted without warnings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoreplmd: slightly clarify a comment
Douglas Bagnall [Thu, 23 Apr 2020 03:37:53 +0000 (15:37 +1200)] 
replmd: slightly clarify a comment

it has been a long time since we introduced "control", so lets remind
ourselves which control it was.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jun 13 06:50:12 UTC 2020 on sn-devel-184

6 years agodsdb/mod/acl_util: do not deref NULL sd_flags control
Douglas Bagnall [Thu, 23 Apr 2020 03:31:13 +0000 (15:31 +1200)] 
dsdb/mod/acl_util: do not deref NULL sd_flags control

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoldb commandline: don't crash if a received control contains no data
Douglas Bagnall [Wed, 22 Apr 2020 22:57:24 +0000 (10:57 +1200)] 
ldb commandline: don't crash if a received control contains no data

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoldb/controls: avoid stealing our own stuff
Douglas Bagnall [Wed, 22 Apr 2020 22:32:17 +0000 (10:32 +1200)] 
ldb/controls: avoid stealing our own stuff

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoldb/mod/paged_searches: cope with NULL control data
Douglas Bagnall [Wed, 22 Apr 2020 22:31:39 +0000 (10:31 +1200)] 
ldb/mod/paged_searches: cope with NULL control data

We won't get NULL data over ldap, but it can be set via 'local_oid:'.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: do not always import socket_server
Douglas Bagnall [Mon, 25 May 2020 23:33:42 +0000 (11:33 +1200)] 
python: do not always import socket_server

This cost around 10ms for every Python script, and was only used in one
test.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: do not always import urllib
Douglas Bagnall [Mon, 25 May 2020 23:31:16 +0000 (11:31 +1200)] 
python: do not always import urllib

Only provision.py wants a function from urllib, but we were importing
it in samba.compat, which is imported by samba, mening that every
python script importing anything from samba took 40ms longer to start
up.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agodoc: Add markup to README.Coding for samba wiki links
David Mulder [Fri, 12 Jun 2020 21:15:04 +0000 (15:15 -0600)] 
doc: Add markup to README.Coding for samba wiki links

Adding markup to the README.Coding allows us to
link to sections of the document from the samba
wiki and prevents documentation duplication.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun 12 23:32:30 UTC 2020 on sn-devel-184

6 years agodocs: protocolfreedom.org is no longer
Andrew Bartlett [Wed, 3 Jun 2020 04:18:36 +0000 (16:18 +1200)] 
docs: protocolfreedom.org is no longer

It is just a random spam site now

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoRemove outdated install_with_python.sh
Andrew Bartlett [Wed, 3 Jun 2020 04:16:49 +0000 (16:16 +1200)] 
Remove outdated install_with_python.sh

This was a cludge to help get past the need for Python on
the Samba build farm in particular.  We now need Python3
by default so clearly this has not been used in quite some
time so is safe to remove.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agodocs: Point to wiki Contribute page rather than samba-technical
Andrew Bartlett [Wed, 3 Jun 2020 04:10:50 +0000 (16:10 +1200)] 
docs: Point to wiki Contribute page rather than samba-technical

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agobuild: Put the note from the bottom of the old BUILD_SYSTEMS.txt somewhere useful
Andrew Bartlett [Wed, 3 Jun 2020 04:06:34 +0000 (16:06 +1200)] 
build: Put the note from the bottom of the old BUILD_SYSTEMS.txt somewhere useful

This statement on how we handle --with options is best placed near where
the options are set, so developers see it when trying to choose the
correct thing to do.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agodocs: Remove the statement about why we moved to Waf
Andrew Bartlett [Wed, 3 Jun 2020 03:51:48 +0000 (15:51 +1200)] 
docs: Remove the statement about why we moved to Waf

This is not important for new users or developers, and has little useful information

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoUpdate README.md with more up to date information
Andrew Bartlett [Wed, 3 Jun 2020 03:50:28 +0000 (15:50 +1200)] 
Update README.md with more up to date information

In particular, point to the new Contribute page on the wiki

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoUpdate README.contributing to point to new Contributing wiki page
Andrew Bartlett [Wed, 3 Jun 2020 03:43:28 +0000 (15:43 +1200)] 
Update README.contributing to point to new Contributing wiki page

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agodb-glue.c: set forwardable flag on cross-realm tgt tickets
Isaac Boukris [Tue, 14 Jan 2020 12:16:02 +0000 (13:16 +0100)] 
db-glue.c: set forwardable flag on cross-realm tgt tickets

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

Match Windows behavior and allow the forwardable flag to be
set in cross-realm tickets. We used to allow forwardable to
any server, but now that we apply disallow-forwardable policy
in heimdal we need to explicitly allow in the corss-realm case
(and remove the workaround we have for it the MIT plugin).

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jun 12 22:10:34 UTC 2020 on sn-devel-184

6 years agoselftest: test forwardable flag in cross-realm with s4u2proxy
Isaac Boukris [Sat, 9 May 2020 14:26:45 +0000 (16:26 +0200)] 
selftest: test forwardable flag in cross-realm with s4u2proxy

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test forwardable flag in cross-realm tgt tickets
Isaac Boukris [Wed, 6 May 2020 13:54:55 +0000 (15:54 +0200)] 
selftest: test forwardable flag in cross-realm tgt tickets

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: allow EncASRepPart to be encoded as EncTGSRepPart
Isaac Boukris [Wed, 6 May 2020 23:25:36 +0000 (01:25 +0200)] 
selftest: allow EncASRepPart to be encoded as EncTGSRepPart

that's how MIT kdc encodes it, clients accept both.

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoheimdal: apply disallow-forwardable on server in TGS request
Isaac Boukris [Mon, 13 Jan 2020 22:42:54 +0000 (23:42 +0100)] 
heimdal: apply disallow-forwardable on server in TGS request

upstream commit: 839b073facd2aecda6740224d73e560bc79965dc

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: add test for disallowed-forwardable server
Isaac Boukris [Sun, 19 Jan 2020 15:24:24 +0000 (16:24 +0100)] 
selftest: add test for disallowed-forwardable server

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool dns query --help: Someone forgot 'PTR' from the list of record types
Rowland Penny [Fri, 5 Jun 2020 06:56:21 +0000 (07:56 +0100)] 
samba-tool dns query --help: Someone forgot 'PTR' from the list of record types

Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 11 04:37:37 UTC 2020 on sn-devel-184

6 years agokdc: allow checksum of PA-FOR-USER to be HMAC_MD5
Isaac Boukris [Mon, 12 Nov 2018 10:26:25 +0000 (12:26 +0200)] 
kdc: allow checksum of PA-FOR-USER to be HMAC_MD5

even if the tgt session key uses different hmac.

Per [MS-SFU] 2.2.1 PA-FOR-USER the checksum is
always HMAC_MD5, and that's what windows 7 client
and MIT client send.

In heimdal both the client and kdc use the checksum of
the tgt key instead and therefore work with each other
but windows and MIT clients fail against heimdal KDC.

Windows KDC allows either checksum (HMAC_MD5 or from
tgt) so we should do the same to support all clients.

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 11 02:48:58 UTC 2020 on sn-devel-184

6 years agos3-libads: use ldap_init_fd() to initialize a ldap session if possible
Björn Baumbach [Wed, 3 Jun 2020 17:40:59 +0000 (19:40 +0200)] 
s3-libads: use ldap_init_fd() to initialize a ldap session if possible

Use the known ip address of the ldap server to open the connection and
initialize the ldap session with ldap_init_fd().

This avoid unnecessary DNS lookups which might block or prevent the
successful connection.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13124

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbclient: Simplify do_list()
Volker Lendecke [Fri, 5 Jun 2020 13:09:44 +0000 (15:09 +0200)] 
smbclient: Simplify do_list()

With the DLIST-based work queue we don't need to protect the "list
head" from reallocation anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 10 23:43:04 UTC 2020 on sn-devel-184