mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
tests: Add reproducer for bug 15487
Show that smbd crashes if asked to return full information on close of a stream handle with delete on close disposition set. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15487 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
340f0420bd
commit
23deb79a28
@ -242,6 +242,27 @@ class LibsmbTestCase(samba.tests.libsmb.LibsmbTests):
|
||||
# Without the bugfix for 15481 we get 'file' not 'File'
|
||||
self.assertEqual(directory[0]['name'], 'File')
|
||||
|
||||
def test_stream_close_with_full_information(self):
|
||||
c = libsmb.Conn(self.server_ip, "streams_xattr", self.lp, self.creds)
|
||||
|
||||
try:
|
||||
c.deltree("teststreams")
|
||||
except:
|
||||
pass
|
||||
|
||||
c.mkdir("teststreams")
|
||||
fh = c.create("teststreams\\stream_full_close_info.txt:Stream",
|
||||
DesiredAccess=security.SEC_STD_DELETE,
|
||||
CreateDisposition=libsmb.FILE_CREATE)
|
||||
c.delete_on_close(fh, 1)
|
||||
|
||||
try:
|
||||
c.close(fh, libsmb.SMB2_CLOSE_FLAGS_FULL_INFORMATION)
|
||||
except:
|
||||
self.fail()
|
||||
|
||||
c.deltree("teststreams")
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
unittest.main()
|
||||
|
1
selftest/knownfail.d/close_full_info
Normal file
1
selftest/knownfail.d/close_full_info
Normal file
@ -0,0 +1 @@
|
||||
^samba.tests.libsmb-basic.samba.tests.libsmb-basic.LibsmbTestCase.test_stream_close_with_full_information
|
Loading…
Reference in New Issue
Block a user