summaryrefslogtreecommitdiff
path: root/source4/torture/libsmbclient
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2020-03-10 11:51:09 -0700
committerJeremy Allison <jra@samba.org>2020-03-10 21:25:33 +0000
commit9653a1073898b9e78b579b12adedadb669ae2b94 (patch)
tree7c3aa117a088198be5438d18f0de2bfb767f02ec /source4/torture/libsmbclient
parent0982980dc6d869cf7ee8d735bb14fc20f33a96ae (diff)
downloadsamba-9653a1073898b9e78b579b12adedadb669ae2b94.tar.gz
libsmbclient: Put it back to a known, well-working state
For adapting unix extensions in our client libraries, we need a fresh start with additional APIs. We can't change existing application behaviour. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture/libsmbclient')
-rw-r--r--source4/torture/libsmbclient/libsmbclient.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c
index 13bde24e9c0..c1508680d99 100644
--- a/source4/torture/libsmbclient/libsmbclient.c
+++ b/source4/torture/libsmbclient/libsmbclient.c
@@ -824,9 +824,6 @@ static bool torture_libsmbclient_readdirplus2(struct torture_context *tctx)
struct stat st = {0};
int ret;
const char *smburl = torture_setting_string(tctx, "smburl", NULL);
- bool unix_extensions = torture_setting_bool(
- tctx, "unix_extensions", false);
- mode_t expected_mode = 0;
if (smburl == NULL) {
torture_fail(tctx,
@@ -903,26 +900,21 @@ static bool torture_libsmbclient_readdirplus2(struct torture_context *tctx)
filename));
}
- if (unix_extensions) {
- expected_mode = S_IFREG | 0666;
- } else {
- /*
- * New file gets SMBC_FILE_MODE plus
- * archive bit -> S_IXUSR
- * !READONLY -> S_IWUSR.
- */
- expected_mode = SMBC_FILE_MODE|S_IXUSR|S_IWUSR;
- }
-
+ /* Ensure mode is as expected. */
+ /*
+ * New file gets SMBC_FILE_MODE plus
+ * archive bit -> S_IXUSR
+ * !READONLY -> S_IWUSR.
+ */
torture_assert_int_equal_goto(tctx,
st2.st_mode,
- expected_mode,
+ SMBC_FILE_MODE|S_IXUSR|S_IWUSR,
success,
done,
talloc_asprintf(tctx,
"file %s st_mode should be 0%o, got 0%o'",
filename,
- expected_mode,
+ SMBC_FILE_MODE|S_IXUSR|S_IWUSR,
(unsigned int)st2.st_mode));
/* Ensure smbc_stat() gets the same data. */