diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-07-06 07:45:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:19:17 -0500 |
commit | 44b66a73d3e55cb30eec5d80f51edf5188401ac0 (patch) | |
tree | a3b13fbb61fcfa8154d50bca5d29ab1df3c9cf4d /source4/torture/basic | |
parent | 3de3d6a02dfb790af21f6c848a202064922ea780 (diff) | |
download | samba-44b66a73d3e55cb30eec5d80f51edf5188401ac0.tar.gz samba-44b66a73d3e55cb30eec5d80f51edf5188401ac0.tar.bz2 samba-44b66a73d3e55cb30eec5d80f51edf5188401ac0.zip |
r8176: Exploring the share mode database...
A delete-on-close deleted file is still around while open on another fd. But
only for findfirst, not for qpathinfo :-)
Volker
(This used to be commit dbc7a1a978d782c73f593f4b46f2a81d35169713)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/delete.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c index 7ddd39c1cb..19af9fc76d 100644 --- a/source4/torture/basic/delete.c +++ b/source4/torture/basic/delete.c @@ -463,6 +463,45 @@ BOOL torture_test_delete(void) goto fail; } + { + TALLOC_CTX *mem_ctx = talloc_init("single_search"); + union smb_search_data data; + status = torture_single_search(cli1, mem_ctx, + fname, RAW_SEARCH_FULL_DIRECTORY_INFO, + &data); + if (!NT_STATUS_IS_OK(status)) { + printf("(%s) single_search failed (%s)\n", + __location__, nt_errstr(status)); + correct = False; + } + talloc_free(mem_ctx); + } + + { + time_t c_time, a_time, m_time, w_time; + size_t size; + uint16_t mode; + ino_t ino; + status = smbcli_qpathinfo(cli1->tree, fname, + &c_time, &a_time, &m_time, + &size, &mode); + if (!NT_STATUS_EQUAL(status, NT_STATUS_DELETE_PENDING)) { + printf("(%s) qpathinfo did not give correct error " + "code (%s) -- NT_STATUS_DELETE_PENDING " + "expected\n", __location__, + nt_errstr(status)); + correct = False; + } + status = smbcli_qfileinfo(cli2->tree, fnum2, &mode, &size, + &c_time, &a_time, &m_time, + &w_time, &ino); + if (!NT_STATUS_IS_OK(status)) { + printf("(%s) qfileinfo failed (%s)\n", + __location__, smbcli_errstr(cli1->tree)); + correct = False; + } + } + if (NT_STATUS_IS_ERR(smbcli_close(cli2->tree, fnum2))) { printf("(%s) close - 2 failed (%s)\n", __location__, smbcli_errstr(cli2->tree)); |