[SCM] Samba Shared Repository - branch master updated

2021-05-19 Thread Andrew Bartlett
The branch, master has been updated
   via  09fed102c58 s3:utils: Migrate tevent_glib_tracker to new cmdline 
option parser
   via  de159c40c5b s3:torture: Migrate pdbtest to new cmdline option parser
   via  a19b9a2d4b9 docs-xml: Update vfstest manpage for new cmdline 
opition parser
   via  279c95cebfe s3:torture: Migrate vfstest to new cmdline option parser
   via  f81fe73f531 s3:rpc_server: Migrate test_mdsparser_es to new cmdline 
option parser
   via  0f6c86b2013 s3:lib: Migrate smbconftort to new cmdline option parser
   via  b87c36cb783 s3:param: Migrate test_lp_load to new cmdline option 
parser
   via  9caa71efa96 lib:cmdline: Add SAMBA_CMDLINE_CONFIG_NONE
   via  0433896ee8a lib:cmdline: Add a debug only option
   via  7fa1ae04df6 testprogs: Add additional rpcclient tests for new 
cmdline options
   via  ba7c2cee9d0 testprogs: Rename test_rpc_getusername_legacy()
   via  75088fdba74 docs-xml: Update rpcclient manpage for new cmdline 
opition parser
   via  4fb4da396c6 s3:rpcclient: Migrate rpcclient to new cmdline option 
parser
   via  4f9c07c0212 s3:rpcclient: Pass cli_credentials to process_cmd()
   via  894b8b3cab6 s3:rpcclient: Pass cli_credentials to do_cmd()
   via  ff7d4a65cab testprogs: Add more smbclient kerberos tests for new 
cmdline options
   via  74b2a52eebc docs-xml: Update smbclient manpage for new cmdline 
opition parser
   via  7b70a72b15c s3:client: Use samba_popt_get_context()
   via  64b8a3abeeb s3:client: Remove duplicate name-resolv (R) options
   via  e4474ac0a54 s3:client: Migrate smbclient to new cmdline option 
parser
  from  c216e056b22 selftest: Rename offline logon env to ad_member_offlogon

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


- Log -
commit 09fed102c584caa5587df7bebde317f0dc51fbb7
Author: Andreas Schneider 
Date:   Tue Jan 12 12:58:24 2021 +0100

s3:utils: Migrate tevent_glib_tracker to new cmdline option parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Thu May 20 03:49:30 UTC 2021 on sn-devel-184

commit de159c40c5be8862270ca07b40c522cd9bacf6f4
Author: Andreas Schneider 
Date:   Tue Jan 12 12:53:08 2021 +0100

s3:torture: Migrate pdbtest to new cmdline option parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit a19b9a2d4b975fc13b882bfa2d714791d922dfea
Author: Andreas Schneider 
Date:   Mon Jan 18 10:24:09 2021 +0100

docs-xml: Update vfstest manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 279c95cebfed3aa8adbad6edad57e5bdbad6abf2
Author: Andreas Schneider 
Date:   Tue Jan 12 12:08:18 2021 +0100

s3:torture: Migrate vfstest to new cmdline option parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit f81fe73f531798a2530efe6b01700135585510d6
Author: Andreas Schneider 
Date:   Wed Jan 13 13:53:55 2021 +0100

s3:rpc_server: Migrate test_mdsparser_es to new cmdline option parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 0f6c86b201367675e1181cb31bcf5ed249683f9a
Author: Andreas Schneider 
Date:   Tue Jan 12 11:59:58 2021 +0100

s3:lib: Migrate smbconftort to new cmdline option parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit b87c36cb7832910edbe2cff11cd7570b23f8013b
Author: Andreas Schneider 
Date:   Fri Jan 8 08:27:19 2021 +0100

s3:param: Migrate test_lp_load to new cmdline option parser

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 9caa71efa96b502b65ae59fb54397eb43b55e333
Author: Andreas Schneider 
Date:   Wed Jan 13 09:56:41 2021 +0100

lib:cmdline: Add SAMBA_CMDLINE_CONFIG_NONE

This will prevent loading a config file. This will be needed for
testparm.

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 0433896ee8a0184d7e17b94f2309b457c65fc72d
Author: Andreas Schneider 
Date:   Tue Jan 5 14:23:27 2021 +0100

lib:cmdline: Add a debug only option

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 7fa1ae04df6fb0a3dc48471c2a468b569e0231f7
Author: Andreas Schneider 
Date:   Wed Dec 2 17:15:05 2020 +0100

testprogs: Add additional rpcclient tests for new cmdline options

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit ba7c2cee9d04d2e8a1ff46eaf0332594ac5b89a8
Author: Andreas Schneider 
Date:   Wed Dec 2 17:07:14 2020 +0100

testprogs: Rename test_rpc_getusername_legacy()

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit 75088fdba74e010a3f9673834eb1fc21add7caad
Author: Andreas Schneider 
Date:   Mon Jan 18 10:04:47 2021 +0100


[SCM] Samba Shared Repository - branch master updated

2021-05-19 Thread Jeremy Allison
The branch, master has been updated
   via  c216e056b22 selftest: Rename offline logon env to ad_member_offlogon
  from  b7f62e13933 s3: smbd: Ensure POSIX default ACL is mapped into 
returned Windows ACL for directory handles.

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


- Log -
commit c216e056b229a9e018c23b7c4500a31711bb30aa
Author: Andreas Schneider 
Date:   Wed May 19 08:18:22 2021 +0200

selftest: Rename offline logon env to ad_member_offlogon

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed May 19 20:01:00 UTC 2021 on sn-devel-184

---

Summary of changes:
 script/autobuild.py   | 4 ++--
 selftest/target/Samba3.pm | 4 ++--
 source4/selftest/tests.py | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/script/autobuild.py b/script/autobuild.py
index aa968d842bd..a1ba61cdce1 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -441,7 +441,7 @@ tasks = {
 "ad_member_idmap_rid",
 "ad_member_idmap_ad",
 "ad_member_rfc2307",
-"ad_member_offline_logon",
+"ad_member_offlogon",
 ])),
 ("lcov", LCOV_CMD),
 ("check-clean-tree", CLEAN_SOURCE_TREE_CMD),
@@ -645,7 +645,7 @@ tasks = {
 "ad_member_idmap_rid",
 "ad_member_idmap_ad",
 "ad_member_rfc2307",
-"ad_member_offline_logon",
+"ad_member_offlogon",
 ])),
 ("lcov", LCOV_CMD),
 ("check-clean-tree", CLEAN_SOURCE_TREE_CMD),
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 69e7ff7d826..a6b3637efbe 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -238,7 +238,7 @@ sub check_env($$)
ad_member_idmap_rid => ["ad_dc"],
ad_member_idmap_ad  => ["fl2008r2dc"],
ad_member_fips  => ["ad_dc_fips"],
-   ad_member_offline_logon => ["ad_dc"],
+   ad_member_offlogon  => ["ad_dc"],
 
clusteredmember => ["nt4_dc"],
 );
@@ -1329,7 +1329,7 @@ sub setup_ad_member_fips
  1);
 }
 
-sub setup_ad_member_offline_logon
+sub setup_ad_member_offlogon
 {
my ($self,
$prefix,
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 7130f7923c3..9f407d9f6dd 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -1355,7 +1355,7 @@ for env in ["ad_dc_ntvfs", "s4member", "rodc", 
"promoted_dc", "ad_dc", "ad_membe
 
 # Offline logon (ad_member)
 plantestsuite("samba.blackbox.offline_logon",
-  "ad_member_offline_logon",
+  "ad_member_offlogon",
   [os.path.join(bbdir, "test_offline_logon.sh"),
'$DOMAIN',
'alice', 'Secret007',


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2021-05-19 Thread Noel Power
The branch, master has been updated
   via  b7f62e13933 s3: smbd: Ensure POSIX default ACL is mapped into 
returned Windows ACL for directory handles.
   via  544289b54bb s3: torture: Add test for bug 14708 - POSIX default ACL 
not mapped into returned Windows ACL for directory handles.
  from  7791acb074b python: Make credentials cache test run against Windows

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


- Log -
commit b7f62e13933da14c381f70cd46ad13849b108e68
Author: Jeremy Allison 
Date:   Mon May 17 15:34:55 2021 -0700

s3: smbd: Ensure POSIX default ACL is mapped into returned Windows ACL for 
directory handles.

Remove knownfail.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Noel Power 

Autobuild-User(master): Noel Power 
Autobuild-Date(master): Wed May 19 09:22:56 UTC 2021 on sn-devel-184

commit 544289b54bbf85098f4cc354f655290600c7f5ba
Author: Jeremy Allison 
Date:   Tue May 18 12:11:46 2021 -0700

s3: torture: Add test for bug 14708 - POSIX default ACL not mapped into 
returned Windows ACL for directory handles.

Knownfail for now.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Noel Power 

---

Summary of changes:
 source3/selftest/tests.py|   1 +
 source3/smbd/posix_acls.c|  12 +-
 source3/torture/proto.h  |   1 +
 source3/torture/test_posix.c | 260 +++
 source3/torture/torture.c|   4 +
 source3/wscript_build|   2 +
 6 files changed, 279 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 11d0a41bda9..20a0e63bed7 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -264,6 +264,7 @@ posix_tests = ["POSIX", "POSIX-APPEND", 
"POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA",
"POSIX-STAT",
"POSIX-SYMLINK-PARENT",
"POSIX-SYMLINK-CHMOD",
+   "POSIX-DIR-DEFAULT-ACL",
   ]
 
 for t in posix_tests:
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index c3e00fa2475..489a4695ba1 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3426,6 +3426,7 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, 
uint32_t security_info,
 {
SMB_STRUCT_STAT sbuf;
SMB_ACL_T posix_acl = NULL;
+   SMB_ACL_T def_acl = NULL;
struct pai_val *pal;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
@@ -3444,10 +3445,19 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, 
uint32_t security_info,
/* Get the ACL from the fd. */
posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, frame);
 
+   /* If it's a directory get the default POSIX ACL. */
+   if(fsp->fsp_flags.is_directory) {
+   def_acl = SMB_VFS_SYS_ACL_GET_FILE(fsp->conn,
+  fsp->fsp_name,
+  SMB_ACL_TYPE_DEFAULT,
+  frame);
+   def_acl = free_empty_sys_acl(fsp->conn, def_acl);
+   }
+
pal = fload_inherited_info(fsp);
 
status = posix_get_nt_acl_common(fsp->conn, fsp->fsp_name->base_name,
-, pal, posix_acl, NULL,
+, pal, posix_acl, def_acl,
 security_info, mem_ctx, ppdesc);
TALLOC_FREE(frame);
return status;
diff --git a/source3/torture/proto.h b/source3/torture/proto.h
index 57b1b5fea13..bc2d8c7b3f2 100644
--- a/source3/torture/proto.h
+++ b/source3/torture/proto.h
@@ -91,6 +91,7 @@ bool run_posix_readlink_test(int dummy);
 bool run_posix_stat_test(int dummy);
 bool run_posix_symlink_parent_test(int dummy);
 bool run_posix_symlink_chmod_test(int dummy);
+bool run_posix_dir_default_acl_test(int dummy);
 bool run_case_insensitive_create(int dummy);
 
 bool run_nbench2(int dummy);
diff --git a/source3/torture/test_posix.c b/source3/torture/test_posix.c
index 33a28866f9f..8c1306c5066 100644
--- a/source3/torture/test_posix.c
+++ b/source3/torture/test_posix.c
@@ -23,6 +23,7 @@
 #include "libsmb/clirap.h"
 #include "libsmb/proto.h"
 #include "../libcli/smb/smbXcli_base.h"
+#include "util_sd.h"
 
 extern struct cli_credentials *torture_creds;
 extern fstring host, workgroup, share, password, username, myname;
@@ -1049,3 +1050,262 @@ out:
TALLOC_FREE(frame);
return correct;
 }
+
+/*
+  Ensure we get an ACL containing OI|IO ACE entries
+  after we add a default POSIX ACL to a directory.
+  This will only ever be an SMB1 test as it depends
+  on POSIX ACL semantics.
+ */
+bool