summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/util.c
AgeCommit message (Collapse)AuthorFilesLines
2024-08-29s4:libcli/smb2: let smb2_deltree delete directory streamsStefan Metzmacher1-1/+45
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15656 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2022-08-23s4/libcli/smb2: avoid using smb2_composite_setpathinfo() in smb2_util_setatr()Ralph Boehme1-7/+30
smb2_composite_setpathinfo() uses SEC_FLAG_MAXIMUM_ALLOWED which can have unwanted side effects like breaking oplocks if the effective access includes [READ|WRITE]_DATA. For changing the DOS attributes we only need SEC_FILE_WRITE_ATTRIBUTE. With this change test_smb2_oplock_batch25() doesn't trigger an oplock break anymore. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-04-28Implement alt name query for smb2David Mulder1-0/+53
Implements smb2_qpathinfo_alt_name() and RAW_FILEINFO_SMB2_ALT_NAME_INFORMATION. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 097df343ce21c8340aee7f42f233fe74b92b47e2)
2019-12-20Convert samba4.base.*attr tests to smb2David Mulder1-0/+46
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-25s4/libcli/smb2: clang: Fix 'value stored to 'status' is never read'Noel Power1-3/+3
Fixes: source4/libcli/smb2/util.c:134:3: warning: Value stored to 'status' is never read <--[clang] status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source4/libcli/smb2/util.c:187:5: warning: Value stored to 'status' is never read <--[clang] status = smb2_util_setatr(tree, name, FILE_ATTRIBUTE_NORMAL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source4/libcli/smb2/util.c:209:3: warning: Value stored to 'status' is never read <--[clang] status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 warnings generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-12-06s4-libcli: Add smb2_util_handle_empty().Andreas Schneider1-0/+9
Will be used in the next commit. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2010-02-02Change uint_t to unsigned int in source4Matt Kraai1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-12-07s4 torure: Add SMB2 utility functionsZack Kirsch1-0/+1
- Add a torture_setup_dir() equivalent in SMB2, called smb2_util_setup_dir(). - Add verify_sd() and verify_attrib() helper functions for SMB2.
2009-10-01s4/torture: Ported SMB oplock torture tests to SMB2Steven Danneman1-0/+9
I've ported all applicable SMB oplock torture tests to SMB2, giving us a good base for SMB2 oplock testing. There are several differences between oplocks in SMB and SMB2, mostly because of differences in W2K3 and W2K8. The existing SMB oplock tests all pass against W2K3, but several fail against W2K8. These same tests were failing in SMB2, util I reworked them. BATCH19, BATCH20: In W2K3/SMB a setfileinfo - rename command wouldn't cause a sharing violation or break an existing oplock. It appears that in W2K8/SMB2 a sharing violation is raised. BATCH22: In W2K3/SMB when a second opener was waiting the full timeout of an oplock break, it would receive NT_STATUS_SHARING_VIOLATION after about 35 seconds. This bug has been fixed in W2K8/SMB2 and instead the second opener succeeds. LEVELII500: Added 1 new test checking that the server returns a proper error code when a client improperly replies to a levelII to none break notification. STREAM1: W2K8 now grants oplocks on alternate data streams.
2009-08-05handle large directories in smb2_deltree()Andrew Tridgell1-36/+42
2008-09-24be friendlier in smb2_deltree to some of the SMB2 implementations thatAndrew Tridgell1-1/+1
don't handle SEC_FLAG_MAXIMUM_ALLOWED
2008-09-23fixed readonly handling in deltreeAndrew Tridgell1-0/+6
2008-05-27cope better with read only files in smb2_deltreeAndrew Tridgell1-0/+10
(This used to be commit 88a2c7b2f44f160836e477e460812df557204f51)
2008-05-20added smb2_util_setatrAndrew Tridgell1-0/+22
(This used to be commit d4f41db964ce82c8889017d0f932d60100b3cd32)
2008-05-20added some SMB2 utility functionsAndrew Tridgell1-0/+178
(This used to be commit 6a3b1cd6698faa460c6258bb41b4936e363f4387)