[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Mar 3 19:16:04 UTC 2020
The branch, master has been updated
via f89c7ad8516 smbd: ignore set NTACL requests which contain S-1-5-88 NFS ACEs
via c2387f13c68 selftest: Adapt libsmbclient.readdirplus2 to unix extensions
via a7bdb2936fc selftest: Inform smbtorture about running with unix extensions
via dfa01af749a selftest: run libsmbclient unix ext tests against "posix_share"
via a1856f07b39 libsmb: Use posix open in SMBC_open_ctx
via c2e012fe11c libsmb: Use posix result in SMBC_readdirplus2_ctx
via 890c94d5852 libsmb: Implement SMB_FIND_FILE_UNIX_INFO2 dir listing
via 128545ba4f2 libsmb: Introduce fetch_file_unix_basic_info2()
via 9cc546956dc libsmb: Factor out fetch_file_unix_basic_info()
via 7c1abd7e856 selftest: Run smbtorture3 SHORTNAME-TEST without unix extensions
via b08643f07f1 selftest: Fix usage check of test_smbtorture_s3.sh
via edfc19f1ebf libsmb: Fix a typo
via bf07b16e30c winbindd: Align integer types
via 8c06f1933cc test: Fix a copy&paste error
from 7cff3ed12cd ctdb-tests: Use a local "ctdb shutdown" command to avoid a race
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f89c7ad851681c0e0ab39a1bedb3eeb672516fbb
Author: Ralph Boehme <slow at samba.org>
Date: Thu Feb 27 17:01:10 2020 +0100
smbd: ignore set NTACL requests which contain S-1-5-88 NFS ACEs
We apply the same "ignore" logic already in the POSIX ACL code and in the
vfs_acl_xattr|tdb VFS modules to smb_set_nt_acl_nfs4() in the nfs4_acl helper
subsystem which is common to a bunch of VFS modules: GPFS, ZFS, NFS4_xattr and
aixacl2.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14307
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Mar 3 19:15:10 UTC 2020 on sn-devel-184
commit c2387f13c68c88e152f62f85f658118db9272bc8
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 1 18:41:15 2020 +0100
selftest: Adapt libsmbclient.readdirplus2 to unix extensions
A few lines above the mode check we created a file with mode
0666. With unix exensions we expect this back 1:1, without them the
server changes them on the fly.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a7bdb2936fc2a5c4b63ff7171f105d0b4e4b06e1
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 1 18:39:58 2020 +0100
selftest: Inform smbtorture about running with unix extensions
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit dfa01af749aa54e7630a3a9343cc7992664e900a
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 1 16:47:27 2020 +0100
selftest: run libsmbclient unix ext tests against "posix_share"
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a1856f07b39d4e8bc8f66cb49c7666b0d5ed99b8
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 28 11:18:00 2020 +0100
libsmb: Use posix open in SMBC_open_ctx
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c2e012fe11c0f18650fa796a6f67aae838e1c791
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 28 11:15:58 2020 +0100
libsmb: Use posix result in SMBC_readdirplus2_ctx
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 890c94d5852c445cc866dd61fbfbcc8596726302
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 28 11:10:47 2020 +0100
libsmb: Implement SMB_FIND_FILE_UNIX_INFO2 dir listing
This keeps the original SMB_STRUCT_STAT coming from posix as part of
struct file_info. It is a slight waste of space, as the timestamps are
kept twice, but having a full SMB_STRUCT_STAT with the nlink!=0
validity check makes thinking about which mode/size/etc is the correct
one a no-brainer. We can save space later by referencing only one set
of time stamps for example.
This for the time fixes readdirplus2, but for the wrong reason: We don't yet
create files the "proper" way using posix create.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 128545ba4f25e493736bf8f816f7d7490bd68fcb
Author: Volker Lendecke <vl at samba.org>
Date: Mon Feb 24 03:41:13 2020 -0800
libsmb: Introduce fetch_file_unix_basic_info2()
Will be used in clilist.c for SMB_FIND_FILE_UNIX_INFO2
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9cc546956dcfdf7c898154aa79d0947eb4c9c578
Author: Volker Lendecke <vl at samba.org>
Date: Mon Feb 24 03:41:13 2020 -0800
libsmb: Factor out fetch_file_unix_basic_info()
Will be used in clilist.c for SMB_FIND_FILE_UNIX_INFO2
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 7c1abd7e8565834ecad1742bfd7010ed257e10c0
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 2 21:34:37 2020 +0100
selftest: Run smbtorture3 SHORTNAME-TEST without unix extensions
Soon cli_list() will change to SMB_FIND_FILE_UNIX_INFO2 which does not
provide a shortname. For now we lose that as an encrypted test, as for
now it's a SMB1 test which requires unix extensions for
encryption. Hopefully we don't forget to reenable this once the test
is converted to SMB2
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
nonunix
commit b08643f07f18f055e1022131a63343e52bb755cb
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 2 20:55:56 2020 +0100
selftest: Fix usage check of test_smbtorture_s3.sh
This needs at least 5 args
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit edfc19f1ebfeea1fa2cdc1cdc5b5b51db8ab633f
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 1 18:11:52 2020 +0100
libsmb: Fix a typo
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit bf07b16e30cb6be25b1e8df5c1f7cc004d078443
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 21 08:03:57 2020 +0100
winbindd: Align integer types
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 8c06f1933ccbd1a9ccdda4a7e0fd25da219b5432
Author: Volker Lendecke <vl at samba.org>
Date: Wed Feb 19 15:17:15 2020 +0100
test: Fix a copy&paste error
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
selftest/knownfail.d/libsmbclient | 4 +-
source3/include/client.h | 6 ++
source3/include/libsmb_internal.h | 1 +
source3/libsmb/clifile.c | 93 +++++++++++++---------
source3/libsmb/clilist.c | 69 +++++++++++++++-
source3/libsmb/libsmb_context.c | 2 +-
source3/libsmb/libsmb_dir.c | 38 ++++++---
source3/libsmb/libsmb_file.c | 17 +++-
source3/libsmb/proto.h | 2 +
source3/modules/nfs4_acls.c | 4 +
source3/script/tests/test_close_denied_share.sh | 7 +-
source3/script/tests/test_smbtorture_s3.sh | 2 +-
.../script/tests/test_smbtorture_s3_no_unix_ext.sh | 14 ++++
source3/selftest/tests.py | 22 ++++-
source3/winbindd/wb_sids2xids.c | 2 +-
source4/selftest/tests.py | 25 ++++--
source4/torture/libsmbclient/libsmbclient.c | 24 ++++--
17 files changed, 253 insertions(+), 79 deletions(-)
create mode 100755 source3/script/tests/test_smbtorture_s3_no_unix_ext.sh
Changeset truncated at 500 lines:
diff --git a/selftest/knownfail.d/libsmbclient b/selftest/knownfail.d/libsmbclient
index 8d8ef3cbaa2..43c3fb6774d 100644
--- a/selftest/knownfail.d/libsmbclient
+++ b/selftest/knownfail.d/libsmbclient
@@ -1,2 +1,2 @@
-samba4.unix_ext.libsmbclient.readdirplus2.NT1.readdirplus2.*
-samba4.unix_ext.libsmbclient.readdirplus_seek.NT1.readdirplus_seek.*
+# We don't have SMB3 unix extensions yet
+samba4.unix_ext.libsmbclient.readdirplus2.SMB3.readdirplus2.*
diff --git a/source3/include/client.h b/source3/include/client.h
index 23ba86d2a2c..34b6a9fc383 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -114,6 +114,12 @@ struct file_info {
struct timespec mtime_ts;
struct timespec atime_ts;
struct timespec ctime_ts;
+
+ /*
+ * Native sbuf from posix extensions. Valid if st_ex_nlink!=0.
+ */
+ SMB_STRUCT_STAT posix_sbuf;
+
char *name;
char *short_name;
};
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index 27eaeb5fd89..78c2cb555e0 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -98,6 +98,7 @@ struct smbc_dir_list {
struct smbc_dirplus_list {
struct smbc_dirplus_list *next;
struct libsmb_file_info *smb_finfo;
+ SMB_STRUCT_STAT *posix_sbuf;
uint64_t ino;
};
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 0ba406a4f2a..164be11386c 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -736,6 +736,59 @@ NTSTATUS cli_posix_setacl(struct cli_state *cli,
return status;
}
+static void fetch_file_unix_basic_info(
+ const uint8_t data[100], SMB_STRUCT_STAT *sbuf)
+{
+ ZERO_STRUCTP(sbuf);
+
+ /* total size, in bytes */
+ sbuf->st_ex_size = IVAL2_TO_SMB_BIG_UINT(data, 0);
+
+ /* number of blocks allocated */
+ sbuf->st_ex_blocks = IVAL2_TO_SMB_BIG_UINT(data,8);
+#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
+ sbuf->st_ex_blocks /= STAT_ST_BLOCKSIZE;
+#else
+ /* assume 512 byte blocks */
+ sbuf->st_ex_blocks /= 512;
+#endif
+ /* time of last change */
+ sbuf->st_ex_ctime = interpret_long_date((const char *)(data + 16));
+
+ /* time of last access */
+ sbuf->st_ex_atime = interpret_long_date((const char *)(data + 24));
+
+ /* time of last modification */
+ sbuf->st_ex_mtime = interpret_long_date((const char *)(data + 32));
+
+ sbuf->st_ex_uid = (uid_t) IVAL(data, 40); /* user ID of owner */
+ sbuf->st_ex_gid = (gid_t) IVAL(data, 48); /* group ID of owner */
+ sbuf->st_ex_mode = unix_filetype_from_wire(IVAL(data, 56));
+
+#if defined(HAVE_MAKEDEV)
+ {
+ uint32_t dev_major = IVAL(data,60);
+ uint32_t dev_minor = IVAL(data,68);
+ sbuf->st_ex_rdev = makedev(dev_major, dev_minor);
+ }
+#endif
+ /* inode */
+ sbuf->st_ex_ino = (SMB_INO_T)IVAL2_TO_SMB_BIG_UINT(data, 76);
+
+ /* protection */
+ sbuf->st_ex_mode |= wire_perms_to_unix(IVAL(data, 84));
+
+ /* number of hard links */
+ sbuf->st_ex_nlink = BIG_UINT(data, 92);
+}
+
+void fetch_file_unix_basic_info2(
+ const uint8_t data[116], SMB_STRUCT_STAT *sbuf)
+{
+ fetch_file_unix_basic_info(data, sbuf);
+ sbuf->st_ex_btime = interpret_long_date((const char *)(data + 100));
+}
+
/****************************************************************************
Stat a file (UNIX extensions).
****************************************************************************/
@@ -793,45 +846,7 @@ static void cli_posix_stat_done(struct tevent_req *subreq)
return;
}
- /* total size, in bytes */
- sbuf->st_ex_size = IVAL2_TO_SMB_BIG_UINT(data, 0);
-
- /* number of blocks allocated */
- sbuf->st_ex_blocks = IVAL2_TO_SMB_BIG_UINT(data,8);
-#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
- sbuf->st_ex_blocks /= STAT_ST_BLOCKSIZE;
-#else
- /* assume 512 byte blocks */
- sbuf->st_ex_blocks /= 512;
-#endif
- /* time of last change */
- sbuf->st_ex_ctime = interpret_long_date((char *)(data + 16));
-
- /* time of last access */
- sbuf->st_ex_atime = interpret_long_date((char *)(data + 24));
-
- /* time of last modification */
- sbuf->st_ex_mtime = interpret_long_date((char *)(data + 32));
-
- sbuf->st_ex_uid = (uid_t) IVAL(data, 40); /* user ID of owner */
- sbuf->st_ex_gid = (gid_t) IVAL(data, 48); /* group ID of owner */
- sbuf->st_ex_mode = unix_filetype_from_wire(IVAL(data, 56));
-
-#if defined(HAVE_MAKEDEV)
- {
- uint32_t dev_major = IVAL(data,60);
- uint32_t dev_minor = IVAL(data,68);
- sbuf->st_ex_rdev = makedev(dev_major, dev_minor);
- }
-#endif
- /* inode */
- sbuf->st_ex_ino = (SMB_INO_T)IVAL2_TO_SMB_BIG_UINT(data, 76);
-
- /* protection */
- sbuf->st_ex_mode |= wire_perms_to_unix(IVAL(data, 84));
-
- /* number of hard links */
- sbuf->st_ex_nlink = BIG_UINT(data, 92);
+ fetch_file_unix_basic_info(data, sbuf);
tevent_req_done(req);
}
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index f868e72a239..ca6d8b53129 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -305,6 +305,63 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
}
return calc_next_entry_offset(base, pdata_end);
}
+ case SMB_FIND_FILE_UNIX_INFO2:
+ {
+ SMB_STRUCT_STAT *sbuf = &finfo->posix_sbuf;
+ size_t namelen;
+
+ if (pdata_end - base < 128) {
+ return pdata_end - base;
+ }
+
+ p += 4; /* next entry offset */
+
+ if (p_resume_key) {
+ *p_resume_key = IVAL(p,0);
+ }
+ p += 4; /* fileindex */
+
+ fetch_file_unix_basic_info2((const uint8_t *)p, sbuf);
+ p += 116;
+
+ finfo->mode = S_ISDIR(sbuf->st_ex_mode) ?
+ FILE_ATTRIBUTE_DIRECTORY :
+ FILE_ATTRIBUTE_NORMAL;
+ if (sbuf->st_ex_mode & S_IXUSR) {
+ finfo->mode |= FILE_ATTRIBUTE_ARCHIVE;
+ }
+
+ finfo->size = sbuf->st_ex_size;
+ finfo->allocated_size =
+ sbuf->st_ex_blksize * sbuf->st_ex_blocks;
+ finfo->uid = sbuf->st_ex_uid;
+ finfo->gid = sbuf->st_ex_gid;
+ finfo->ino = sbuf->st_ex_ino;
+ finfo->btime_ts = sbuf->st_ex_btime;
+ finfo->mtime_ts = sbuf->st_ex_mtime;
+ finfo->atime_ts = sbuf->st_ex_atime;
+ finfo->ctime_ts = sbuf->st_ex_ctime;
+
+ namelen = IVAL(p, 0);
+ p += 4;
+
+ if (namelen > (pdata_end - p)) {
+ return pdata_end - base;
+ }
+
+ ret = clistr_pull_talloc(
+ ctx,
+ base_ptr,
+ recv_flags2,
+ &finfo->name,
+ p,
+ namelen,
+ 0);
+ if (ret == (size_t)-1) {
+ return pdata_end - base;
+ }
+ return calc_next_entry_offset(base, pdata_end);
+ }
}
DEBUG(1,("Unknown long filename format %d\n",level));
@@ -1043,6 +1100,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16_t attribute,
NTSTATUS status = NT_STATUS_NO_MEMORY;
struct file_info *finfo;
size_t i, num_finfo = 0;
+ uint32_t caps;
uint16_t info_level;
if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
@@ -1063,8 +1121,15 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16_t attribute,
goto fail;
}
- info_level = (smb1cli_conn_capabilities(cli->conn) & CAP_NT_SMBS)
- ? SMB_FIND_FILE_BOTH_DIRECTORY_INFO : SMB_FIND_INFO_STANDARD;
+ caps = smb1cli_conn_capabilities(cli->conn);
+
+ if (caps & CAP_UNIX) {
+ info_level = SMB_FIND_FILE_UNIX_INFO2;
+ } else if (caps & CAP_NT_SMBS) {
+ info_level = SMB_FIND_FILE_BOTH_DIRECTORY_INFO;
+ } else {
+ info_level = SMB_FIND_INFO_STANDARD;
+ }
req = cli_list_send(frame, ev, cli, mask, attribute, info_level);
if (req == NULL) {
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 48e417ba523..eaa0cdeca93 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -703,7 +703,7 @@ smbc_init_context(SMBCCTX *context)
}
-/* Return the verion of samba, and thus libsmbclient */
+/* Return the version of samba, and thus libsmbclient */
const char *
smbc_version(void)
{
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index eaae38664cf..801d556f53b 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -49,6 +49,7 @@ static void remove_dirplus(SMBCFILE *dir)
struct smbc_dirplus_list *f = d;
d = d->next;
+ SAFE_FREE(f->posix_sbuf);
SAFE_FREE(f->smb_finfo->short_name);
SAFE_FREE(f->smb_finfo->name);
SAFE_FREE(f->smb_finfo);
@@ -212,6 +213,20 @@ static int add_dirplus(SMBCFILE *dir, struct file_info *finfo)
}
new_entry->smb_finfo = info;
+ if (finfo->posix_sbuf.st_ex_nlink != 0) {
+ new_entry->posix_sbuf = SMB_MALLOC_P(SMB_STRUCT_STAT);
+ if (new_entry->posix_sbuf == NULL) {
+ SAFE_FREE(info->short_name);
+ SAFE_FREE(info->name);
+ SAFE_FREE(info);
+ SAFE_FREE(new_entry);
+ dir->dir_error = ENOMEM;
+ return -1;
+ }
+ *new_entry->posix_sbuf = finfo->posix_sbuf;
+ new_entry->posix_sbuf->st_ex_dev = dir->srv->dev;
+ }
+
/* Now add to the list. */
if (dir->dirplus_list == NULL) {
/* Empty list - point everything at new_entry. */
@@ -1360,15 +1375,20 @@ const struct libsmb_file_info *SMBC_readdirplus2_ctx(SMBCCTX *context,
return NULL;
}
- setup_stat(st,
- path,
- smb_finfo->size,
- smb_finfo->attrs,
- ino,
- dir->srv->dev,
- smb_finfo->atime_ts,
- smb_finfo->ctime_ts,
- smb_finfo->mtime_ts);
+ if (dp_list->posix_sbuf != NULL) {
+ setup_stat_from_stat_ex(dp_list->posix_sbuf, path, st);
+ } else {
+ setup_stat(
+ st,
+ path,
+ smb_finfo->size,
+ smb_finfo->attrs,
+ ino,
+ dir->srv->dev,
+ smb_finfo->atime_ts,
+ smb_finfo->ctime_ts,
+ smb_finfo->mtime_ts);
+ }
TALLOC_FREE(full_pathname);
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index a1ae4584d15..512827e134d 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -125,8 +125,21 @@ SMBC_open_ctx(SMBCCTX *context,
}
/*d_printf(">>>open: resolved %s as %s\n", path, targetpath);*/
- status = cli_open(targetcli, targetpath, flags,
- context->internal->share_mode, &fd);
+ if (srv->try_posixinfo) {
+ status = cli_posix_open(
+ targetcli,
+ targetpath,
+ flags,
+ mode,
+ &fd);
+ } else {
+ status = cli_open(
+ targetcli,
+ targetpath,
+ flags,
+ context->internal->share_mode,
+ &fd);
+ }
if (!NT_STATUS_IS_OK(status)) {
/* Handle the error ... */
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index e44dad13200..07c22a696fe 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -283,6 +283,8 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
const char *newname);
uint32_t unix_perms_to_wire(mode_t perms);
mode_t wire_perms_to_unix(uint32_t perms);
+void fetch_file_unix_basic_info2(
+ const uint8_t data[116], SMB_STRUCT_STAT *sbuf);
struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 4d50223c795..7f32e681694 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -996,6 +996,10 @@ NTSTATUS smb_set_nt_acl_nfs4(vfs_handle_struct *handle, files_struct *fsp,
* refined... */
}
+ if (security_descriptor_with_ms_nfs(psd)) {
+ return NT_STATUS_OK;
+ }
+
if (pparams == NULL) {
/* Special behaviours */
if (smbacl4_get_vfs_params(fsp->conn, ¶ms)) {
diff --git a/source3/script/tests/test_close_denied_share.sh b/source3/script/tests/test_close_denied_share.sh
index 6b7d78663fe..bcd3883a064 100755
--- a/source3/script/tests/test_close_denied_share.sh
+++ b/source3/script/tests/test_close_denied_share.sh
@@ -2,12 +2,7 @@
#
# Test smbcontrol close-denied-share command.
#
-# Verify that changing and querying the security descriptor works. Also
-# ensure that the output format for ACL entries does not change.
-#
-# The test uses well-known SIDs to not require looking up names and SIDs
-#
-# Copyright (C) 2015, 2019 Christof Schmitt
+# Copyright (C) 2020 Volker Lendecke
if [ $# -lt 6 ]; then
echo Usage: test_close_denied_share.sh \
diff --git a/source3/script/tests/test_smbtorture_s3.sh b/source3/script/tests/test_smbtorture_s3.sh
index 07d940faa11..7a3f6f800b5 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -2,7 +2,7 @@
# this runs the file serving tests that are expected to pass with samba3
-if [ $# -lt 4 ]; then
+if [ $# -lt 5 ]; then
cat <<EOF
Usage: test_smbtorture_s3.sh TEST UNC USERNAME PASSWORD SMBTORTURE <smbtorture args>
EOF
diff --git a/source3/script/tests/test_smbtorture_s3_no_unix_ext.sh b/source3/script/tests/test_smbtorture_s3_no_unix_ext.sh
new file mode 100755
index 00000000000..19af4ff3f3e
--- /dev/null
+++ b/source3/script/tests/test_smbtorture_s3_no_unix_ext.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# this runs test_smbtorture_s3 with disabled unix extensions
+
+if [ -z "$SERVERCONFFILE" ] ; then
+ echo \$SERVERCONFFILE not defined
+ exit 1
+fi
+inject=${SERVERCONFFILE%/*}/global_inject.conf
+
+echo "unix extensions = no" > ${inject}
+$(dirname $0)/test_smbtorture_s3.sh $*
+ret=$?
+> ${inject}
+exit $ret
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index ba110c1d161..6e9d3ddb144 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -90,7 +90,7 @@ tests = ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7"
"OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "WILDDELETE", "PROPERTIES", "W2K",
"TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2", "OWNER-RIGHTS",
"CHAIN3", "PIDHIGH", "CLI_SPLICE",
- "UID-REGRESSION-TEST", "SHORTNAME-TEST",
+ "UID-REGRESSION-TEST",
"CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
"SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT", "SMB2-FTRUNCATE",
"SMB2-ANONYMOUS", "SMB2-DIR-FSYNC",
@@ -113,6 +113,26 @@ for t in tests:
plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "fileserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH", "-mNT1"])
plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "ad_dc_ntvfs", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
+nonunix_tests = [
+ "SHORTNAME-TEST"
+ ]
+
+for t in nonunix_tests:
+ plantestsuite(
+ "samba3.smbtorture_s3.plain.%s" % t,
+ "fileserver",
+ [os.path.join(samba3srcdir,
+ "script/tests/test_smbtorture_s3_no_unix_ext.sh"),
+ t,
+ '//$SERVER_IP/tmp',
+ '$USERNAME',
+ '$PASSWORD',
+ smbtorture3,
+ "",
+ "-l $LOCAL_PATH"])
+ # Can't run SMB1 encrypted tests without unix extensions. This
+ # will have to be added once we do SMB3 unix extensions.
+
t = "TLDAP"
plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "ad_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER/tmp', '$DC_USERNAME', '$DC_PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
diff --git a/source3/winbindd/wb_sids2xids.c b/source3/winbindd/wb_sids2xids.c
index 7ab8dd133fd..e6698f94789 100644
--- a/source3/winbindd/wb_sids2xids.c
+++ b/source3/winbindd/wb_sids2xids.c
@@ -170,7 +170,7 @@ static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq)
struct lsa_TransNameArray *names = NULL;
struct dcerpc_binding_handle *child_binding_handle = NULL;
NTSTATUS status;
- int i;
+ uint32_t i;
status = wb_lookupsids_recv(subreq, state, &domains, &names);
TALLOC_FREE(subreq);
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 5796f828bdd..c55f33c1a2e 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -367,34 +367,45 @@ for t in base + raw + smb2 + netapi:
def planlibsmbclienttest(name, testargs, proto):
env = "nt4_dc"
+
+ url = "--option=torture:smburl=smb://$USERNAME:$PASSWORD@$SERVER"
+
cmdarray = selftesthelpers.smbtorture4testsuite_cmdarray(
name,
env,
testargs + [ "--option=torture:clientprotocol=%s" % proto],
'samba4')
+
+ urloption = url
+ if name != "libsmbclient.list_shares":
+ urloption += "/posix_share"
+
--
Samba Shared Repository
More information about the samba-cvs
mailing list