[SCM] Samba Shared Repository - branch v4-18-test updated

2023-04-11 Thread Jule Anger
The branch, v4-18-test has been updated
   via  31d4b337cb7 smbd: Fix case normalization in for directories
   via  da3531910d7 tests: Show that the case sensitive large dir 
optimization is broken
   via  9af15e1737f tests: Move libsmb-basic to fileserver_smb1 environment
   via  188d598c1d8 s3: smbd: Fix log spam. Change a normal error message 
from DBG_ERR (level 0) to DBG_INFO (level 5).
   via  d477f6fa70a smbd: Prevent creation of vetoed files
   via  c3582deb5a0 CI: add a test creating a vetoed file
  from  dea4cb70045 dsdb/tests: Double number of expressions in 
large_ldap.py ldap_timeout test

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test


- Log -
commit 31d4b337cb70203eac3032838a78c9c6ef48bf6e
Author: Volker Lendecke 
Date:   Fri Feb 17 10:02:37 2023 +0100

smbd: Fix case normalization in for directories

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15313
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Fri Feb 24 08:46:14 UTC 2023 on atb-devel-224

(cherry picked from commit bf9130d375b6c401bb79fc1a0911975814759e3b)

Autobuild-User(v4-18-test): Jule Anger 
Autobuild-Date(v4-18-test): Tue Apr 11 16:30:25 UTC 2023 on atb-devel-224

commit da3531910d7823bb46fbbb9ea5100d8b093a3cc0
Author: Volker Lendecke 
Date:   Fri Feb 17 15:41:12 2023 +0100

tests: Show that the case sensitive large dir optimization is broken

We don't normalize the directories

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15313
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 342d8f6a0a8bc2229332783a840c882f85a1dd4e)

commit 9af15e1737f2ec4e3096ad8d6aebabe4b3c31a8c
Author: Volker Lendecke 
Date:   Fri Feb 17 15:40:30 2023 +0100

tests: Move libsmb-basic to fileserver_smb1 environment

This has the lower-case share, used in the next commit

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15313
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit a9301d8f2956409a6d36e7776d0237d03bfbdbf6)

commit 188d598c1d8cf3067c26ddb50ef13c511e67d6ae
Author: Jeremy Allison 
Date:   Tue Feb 7 17:51:10 2023 -0800

s3: smbd: Fix log spam. Change a normal error message from DBG_ERR (level 
0) to DBG_INFO (level 5).

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Sat Feb 11 08:48:05 UTC 2023 on atb-devel-224

(cherry picked from commit e8abe52df2d3ae533b3f874a885856f26ba5ec7e)

commit d477f6fa70a7db5a13655cb6aab1df4b251a4832
Author: Ralph Boehme 
Date:   Wed Apr 5 11:03:52 2023 +0200

smbd: Prevent creation of vetoed files

The problem is when checking for vetoed names on the last path component in
openat_pathref_fsp_case_insensitive() we return
NT_STATUS_OBJECT_NAME_NOT_FOUND. The in the caller
filename_convert_dirfsp_nosymlink() this is treated as the "file creation 
case"
causing filename_convert_dirfsp_nosymlink() to return NT_STATUS_OK.

In order to correctly distinguish between the cases

1) file doesn't exist, we may be creating it, return
2) a vetoed a file

we need 2) to return a more specific error to
filename_convert_dirfsp_nosymlink(). I've chosen 
NT_STATUS_OBJECT_NAME_INVALID
which gets mapped to the appropriate errror NT_STATUS_OBJECT_PATH_NOT_FOUND 
or
NT_STATUS_OBJECT_NAME_NOT_FOUND depending on which path component was 
vetoed.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Apr  6 23:03:50 UTC 2023 on atb-devel-224

(cherry picked from commit 8b23a4a7eca9b8f80cc4113bb8cf9bb7bd5b4807)

commit c3582deb5a01b686ecad7254cb087effbaf062d3
Author: Ralph Boehme 
Date:   Wed Apr 5 11:32:09 2023 +0200

CI: add a test creating a vetoed file

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 2e8954d5be3336f1c4c2cf033209f632ad84e712)

---

Summary of changes:
 python/samba/tests/libsmb-basic.py  |  9 +++
 selftest/target/Samba3.pm   |  1 +
 source3/script/tests/test_veto_files.sh | 47 +
 source3/smbd/filename.c | 18 ++---
 source3/smbd/open.c |  2 +-
 source4/selftest/tests.py   |  2 +-
 6 files changed, 74 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

[SCM] Samba Shared Repository - branch v4-17-test updated

2023-04-11 Thread Jule Anger
The branch, v4-17-test has been updated
   via  d8fa74a176e smbd: Fix case normalization in for directories
   via  d7d81510c38 s3: smbd: Fix log spam. Change a normal error message 
from DBG_ERR (level 0) to DBG_INFO (level 5).
   via  72d3c4f6799 smbd: Prevent creation of vetoed files
   via  ad60260323c CI: add a test creating a vetoed file
   via  0fba21c1bfa dsdb/tests: Double number of expressions in 
large_ldap.py ldap_timeout test
   via  e9e902f7393 dsdb/tests: Move SD modification on class-created 
objects to classSetUp
  from  7fe8a7d710d s3: libcli: Refuse to connect to any server with zero 
values for max_trans_size, max_read_size, max_write_size.

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-17-test


- Log -
commit d8fa74a176ef6078075865479157b5560d0f66cf
Author: Volker Lendecke 
Date:   Fri Feb 17 10:02:37 2023 +0100

smbd: Fix case normalization in for directories

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15313
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Fri Feb 24 08:46:14 UTC 2023 on atb-devel-224

(cherry picked from commit bf9130d375b6c401bb79fc1a0911975814759e3b)

Autobuild-User(v4-17-test): Jule Anger 
Autobuild-Date(v4-17-test): Tue Apr 11 16:28:13 UTC 2023 on sn-devel-184

commit d7d81510c3855883ace3ce635a8797266a3c1ffe
Author: Jeremy Allison 
Date:   Tue Feb 7 17:51:10 2023 -0800

s3: smbd: Fix log spam. Change a normal error message from DBG_ERR (level 
0) to DBG_INFO (level 5).

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Sat Feb 11 08:48:05 UTC 2023 on atb-devel-224

(cherry picked from commit e8abe52df2d3ae533b3f874a885856f26ba5ec7e)

commit 72d3c4f6799ff8f300711a306c46439eb5acf674
Author: Ralph Boehme 
Date:   Wed Apr 5 11:03:52 2023 +0200

smbd: Prevent creation of vetoed files

The problem is when checking for vetoed names on the last path component in
openat_pathref_fsp_case_insensitive() we return
NT_STATUS_OBJECT_NAME_NOT_FOUND. The in the caller
filename_convert_dirfsp_nosymlink() this is treated as the "file creation 
case"
causing filename_convert_dirfsp_nosymlink() to return NT_STATUS_OK.

In order to correctly distinguish between the cases

1) file doesn't exist, we may be creating it, return
2) a vetoed a file

we need 2) to return a more specific error to
filename_convert_dirfsp_nosymlink(). I've chosen 
NT_STATUS_OBJECT_NAME_INVALID
which gets mapped to the appropriate errror NT_STATUS_OBJECT_PATH_NOT_FOUND 
or
NT_STATUS_OBJECT_NAME_NOT_FOUND depending on which path component was 
vetoed.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Apr  6 23:03:50 UTC 2023 on atb-devel-224

(cherry picked from commit 8b23a4a7eca9b8f80cc4113bb8cf9bb7bd5b4807)

commit ad60260323c799a053729ed06dbdd8d5c5c6
Author: Ralph Boehme 
Date:   Wed Apr 5 11:32:09 2023 +0200

CI: add a test creating a vetoed file

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 2e8954d5be3336f1c4c2cf033209f632ad84e712)

commit 0fba21c1bfab48382acacd502e03d478a26a64b1
Author: Andrew Bartlett 
Date:   Thu Apr 6 08:59:17 2023 +1200

dsdb/tests: Double number of expressions in large_ldap.py ldap_timeout test

By slowing the filter down more this makes the test reliable on the
autobuild host.

This is not a long-term solution, but is a quick tweak that can be done
today to address current issues with getting commits past the host-based
(compared with cloud-based) autobuild.

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Joseph Sutton 
(cherry picked from commit 479634e4cd6543d489eb4700aebde1a479b94fe5)

commit e9e902f7393ef4f4cb3f1cc69acde402c761c2d4
Author: Andrew Bartlett 
Date:   Thu Apr 6 08:54:02 2023 +1200

dsdb/tests: Move SD modification on class-created objects to classSetUp

These modifications persist, so should be done at the class level,
not in the test.

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Joseph Sutton 
(cherry picked from commit e1c0c2066c2f29bb614e3386b796eec3cb289aea)

---

Summary of changes:
 source3/script/tests/test_veto_files.sh | 47 

[SCM] Samba Shared Repository - branch master updated

2023-04-11 Thread Andreas Schneider
The branch, master has been updated
   via  d788d3d974a s3-client: Provide more information on protocol 
negotiation failures
  from  ad7418d23f8 lib:replace: Fix snprintf of rep_inet_ntop()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit d788d3d974ac4393f0286ab20f4e7b561d6761ec
Author: Andrew Bartlett 
Date:   Tue Mar 14 13:01:07 2023 +1300

s3-client: Provide more information on protocol negotiation failures

In particular, this may help track down REASON: Exception: Exception: 
protocol negotiation failed: NT_STATUS_IO_TIMEOUT

Signed-off-by: Andrew Bartlett 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Apr 11 13:47:01 UTC 2023 on atb-devel-224

---

Summary of changes:
 source3/libsmb/clidfs.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 9982f97d43a..d111fce033a 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -27,6 +27,7 @@
 #include "libsmb/nmblib.h"
 #include "../libcli/smb/smbXcli_base.h"
 #include "auth/credentials/credentials.h"
+#include "lib/param/param.h"
 
 /
  Important point.
@@ -196,8 +197,16 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
 lp_client_min_protocol(),
 lp_client_max_protocol());
 
-   if (!NT_STATUS_IS_OK(status)) {
-   d_printf("protocol negotiation failed: %s\n",
+   if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
+   d_printf("Protocol negotiation (with timeout %d ms) timed out 
against server %s\n",
+c->timeout,
+smbXcli_conn_remote_name(c->conn));
+   cli_shutdown(c);
+   } else if (!NT_STATUS_IS_OK(status)) {
+   d_printf("Protocol negotiation to server %s (for a protocol 
between %s and %s) failed: %s\n",
+smbXcli_conn_remote_name(c->conn),
+lpcfg_get_smb_protocol(lp_client_min_protocol()),
+lpcfg_get_smb_protocol(lp_client_max_protocol()),
 nt_errstr(status));
cli_shutdown(c);
return status;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-04-11 Thread Andreas Schneider
The branch, master has been updated
   via  ad7418d23f8 lib:replace: Fix snprintf of rep_inet_ntop()
   via  f1209a7a15d lib:replace: Fix code spelling
   via  8c32a475e4a lib:pthreadpool: Fix code spelling
   via  25e1987e155 lib:param: Fix code spelling
   via  4b12dc1fb5a lib:messaging: Fix code spelling
   via  5e9bfcf4b2e lib:ldb: Fix code spelling
   via  e288aca9d8e examples: Fix spelling
   via  bca9c059c39 dynconfig: Fix code spelling
   via  3c96f7d80e5 docs-xml: Fix spelling
   via  8f18fadd31d ctdb: Fix code spelling
   via  9580d66b149 Makefile: Fix spelling
  from  0cd66fe6bd4 libsmb: Fix test for smbc_getxattr

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ad7418d23f891227bb8302d0514f82fcd438280c
Author: Andreas Schneider 
Date:   Thu Apr 6 16:17:16 2023 +0200

lib:replace: Fix snprintf of rep_inet_ntop()

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Apr 11 10:08:54 UTC 2023 on atb-devel-224

commit f1209a7a15dc9a08071873d27946953558dfc15c
Author: Andreas Schneider 
Date:   Thu Apr 6 16:16:19 2023 +0200

lib:replace: Fix code spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 8c32a475e4a9ae94a450be30bcd5e5d12b9e20fe
Author: Andreas Schneider 
Date:   Thu Apr 6 16:05:03 2023 +0200

lib:pthreadpool: Fix code spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 25e1987e155e189e6c7e2984914820bcaad4e47c
Author: Andreas Schneider 
Date:   Thu Apr 6 16:04:08 2023 +0200

lib:param: Fix code spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 4b12dc1fb5abb94eafdb99c8a3f2451849f6657b
Author: Andreas Schneider 
Date:   Thu Apr 6 16:02:58 2023 +0200

lib:messaging: Fix code spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 5e9bfcf4b2e31ac45b4212f5894c4b698839ca37
Author: Andreas Schneider 
Date:   Thu Apr 6 16:01:33 2023 +0200

lib:ldb: Fix code spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit e288aca9d8ed378e4763ad567543a2910187128a
Author: Andreas Schneider 
Date:   Thu Apr 6 15:54:30 2023 +0200

examples: Fix spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit bca9c059c398ed61960bdabbb0756c9dd4d68a6d
Author: Andreas Schneider 
Date:   Thu Apr 6 15:52:49 2023 +0200

dynconfig: Fix code spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 3c96f7d80e5f300aa5f53666a14bc9e02080969e
Author: Andreas Schneider 
Date:   Thu Apr 6 15:51:35 2023 +0200

docs-xml: Fix spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 8f18fadd31d2be93234f37eac312cd87759022d0
Author: Andreas Schneider 
Date:   Thu Apr 6 15:45:07 2023 +0200

ctdb: Fix code spelling

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

commit 9580d66b1497cd2b3a33df05ee091f5a7a20b480
Author: Andreas Schneider 
Date:   Thu Apr 6 15:43:10 2023 +0200

Makefile: Fix spelling

Best reviewed with: `git show --word-diff`.

Signed-off-by: Andreas Schneider 
Reviewed-by: Joseph Sutton 

---

Summary of changes:
 Makefile |  2 +-
 ctdb/config/events/README|  2 +-
 ctdb/config/events/legacy/10.interface.script|  2 +-
 ctdb/config/functions|  2 +-
 docs-xml/Samba-Developers-Guide/internals.xml|  2 +-
 docs-xml/build/DTD/samba.entities|  6 +++---
 docs-xml/smbdotconf/protocol/clientusespnego.xml |  4 ++--
 docs-xml/xslt/docbook2pearson.xsl|  2 +-
 docs-xml/xslt/strip-references.xsl   |  2 +-
 dynconfig/wscript|  2 +-
 examples/LDAP/samba-schema.IBMSecureWay  |  2 +-
 lib/ldb/ldb_mdb/ldb_mdb.c|  2 +-
 lib/ldb/man/ldb.3.xml|  2 +-
 lib/ldb/tests/ldb_filter_attrs_in_place_test.c   |  4 ++--
 lib/ldb/tools/ldbutil.c  |  2 +-
 lib/messaging/messages_dgm.c |  2 +-
 lib/param/README |  4 ++--
 lib/param/loadparm.c   

[SCM] Samba Shared Repository - branch v4-18-test updated

2023-04-11 Thread Jule Anger
The branch, v4-18-test has been updated
   via  dea4cb70045 dsdb/tests: Double number of expressions in 
large_ldap.py ldap_timeout test
   via  330958ae804 dsdb/tests: Move SD modification on class-created 
objects to classSetUp
  from  7e6dc45f7e6 selftest: fix flapping samba-tool drs showrepl test

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test


- Log -
commit dea4cb70045503fe882c2d4d24bfc07ce502c673
Author: Andrew Bartlett 
Date:   Thu Apr 6 08:59:17 2023 +1200

dsdb/tests: Double number of expressions in large_ldap.py ldap_timeout test

By slowing the filter down more this makes the test reliable on the
autobuild host.

This is not a long-term solution, but is a quick tweak that can be done
today to address current issues with getting commits past the host-based
(compared with cloud-based) autobuild.

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Joseph Sutton 
(cherry picked from commit 479634e4cd6543d489eb4700aebde1a479b94fe5)

Autobuild-User(v4-18-test): Jule Anger 
Autobuild-Date(v4-18-test): Tue Apr 11 08:36:03 UTC 2023 on atb-devel-224

commit 330958ae80495311ae1718bfe021c05ecec77e05
Author: Andrew Bartlett 
Date:   Thu Apr 6 08:54:02 2023 +1200

dsdb/tests: Move SD modification on class-created objects to classSetUp

These modifications persist, so should be done at the class level,
not in the test.

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Joseph Sutton 
(cherry picked from commit e1c0c2066c2f29bb614e3386b796eec3cb289aea)

---

Summary of changes:
 source4/dsdb/tests/python/large_ldap.py | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/large_ldap.py 
b/source4/dsdb/tests/python/large_ldap.py
index 0da79da6f73..cd8176363b5 100644
--- a/source4/dsdb/tests/python/large_ldap.py
+++ b/source4/dsdb/tests/python/large_ldap.py
@@ -146,6 +146,14 @@ class LargeLDAPTest(samba.tests.TestCase):
 "sAMAccountName": user_name,
 "jpegPhoto": b'a' * (2 * 1024 * 1024)})
 
+ace = "(OD;;RP;{6bc69afa-7bd9-4184-88f5-28762137eb6a};;S-1-%d)" % x
+dn = ldb.Dn(cls.ldb, "cn=" + user_name + "," + str(cls.ou_dn))
+
+# add an ACE that denies access to the above random attr
+# for a not-existing user.  This makes each SD distinct
+# and so will slow SD parsing.
+cls.sd_utils.dacl_add_ace(dn, ace)
+
 @classmethod
 def tearDownClass(cls):
 # Remake the connection for tear-down (old Samba drops the socket)
@@ -290,19 +298,9 @@ class LargeLDAPTest(samba.tests.TestCase):
   session_info=system_session(lp),
   lp=lp)
 
-for x in range(200):
-user_name = self.USER_NAME + format(x, "03")
-ace = "(OD;;RP;{6bc69afa-7bd9-4184-88f5-28762137eb6a};;S-1-%d)" % x
-dn = ldb.Dn(self.ldb, "cn=" + user_name + "," + str(self.ou_dn))
-
-# add an ACE that denies access to the above random attr
-# for a not-existing user.  This makes each SD distinct
-# and so will slow SD parsing.
-self.sd_utils.dacl_add_ace(dn, ace)
-
 # Create a large search expression that will take a long time to
 # evaluate.
-expression = f'(jpegPhoto=*X*)' * 1000
+expression = '(jpegPhoto=*X*)' * 2000
 expression = f'(|{expression})'
 
 # Perform the LDAP search.


-- 
Samba Shared Repository