[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Thu Sep 12 17:37:01 UTC 2019
The branch, master has been updated
via b730f350c22 s4:torture: fix file cleanup in smb2.create.delete
via aa5b2333283 s4:torture: fix closure of test directory handle
via 156eb9120e6 s4:torture: correctly cast printf() argument
from 35cd91ee4d8 smbd: remove unused current_user.{need,done}_chdir stacking
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b730f350c2209236641d0423d4d0c00d43a24929
Author: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Date: Thu Sep 12 11:16:50 2019 +0200
s4:torture: fix file cleanup in smb2.create.delete
Cleanup of test files created by smb2.create.delete is broken because
READONLY is set on the test file. Clear READONLY first before doing
the cleanup.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Sep 12 17:36:50 UTC 2019 on sn-devel-184
commit aa5b2333283871cc573b3013669c64c3edd3684c
Author: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Date: Thu Sep 12 11:18:51 2019 +0200
s4:torture: fix closure of test directory handle
Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 156eb9120e66fe58328decb035a4d926396f6a59
Author: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Date: Thu Sep 12 10:22:58 2019 +0200
s4:torture: correctly cast printf() argument
In most cases sattrib is passed as a long int literal. Avoid
compile errors by casting the value passed to printf().
Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source4/torture/smb2/create.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c
index 3fd99de0a3a..09bdd5aa6cd 100644
--- a/source4/torture/smb2/create.c
+++ b/source4/torture/smb2/create.c
@@ -123,7 +123,7 @@
if (!NT_STATUS_IS_OK(status)) { \
torture_comment(tctx, \
"(%s) Failed to set attrib 0x%x on %s\n", \
- __location__, sattrib, fname); \
+ __location__, (unsigned int)(sattrib), fname); \
}} while (0)
/*
@@ -1135,10 +1135,18 @@ static bool test_smb2_open_for_delete(struct torture_context *tctx,
io.smb2.in.create_disposition = NTCREATEX_DISP_OPEN;
status = smb2_create(tree, tctx, &(io.smb2));
CHECK_STATUS(status, NT_STATUS_OK);
+ smb2_util_close(tree, io.smb2.out.file.handle);
- smb2_util_unlink(tree, fname);
-
+ /* Clear readonly flag to allow file deletion */
+ io.smb2.in.desired_access = SEC_FILE_READ_ATTRIBUTE |
+ SEC_FILE_WRITE_ATTRIBUTE;
+ status = smb2_create(tree, tctx, &(io.smb2));
+ CHECK_STATUS(status, NT_STATUS_OK);
+ h1 = io.smb2.out.file.handle;
+ SET_ATTRIB(FILE_ATTRIBUTE_ARCHIVE);
smb2_util_close(tree, h1);
+
+ smb2_util_close(tree, h);
smb2_util_unlink(tree, fname);
smb2_deltree(tree, DNAME);
--
Samba Shared Repository
More information about the samba-cvs
mailing list