Fix RAW-OPEN against Samba3
authorVolker Lendecke <vl@samba.org>
Sat, 19 Jul 2008 10:47:31 +0000 (12:47 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 19 Jul 2008 10:47:31 +0000 (12:47 +0200)
This test assumed that fnums are recycled immediately after a close. This is
not true on Samba 3.

Andrew B., I assume this is just a bug in the test. Assuming recycled fnums
might be true on Windows and Samba 4, but I don't think we should assume this
everywhere.

Volker
(This used to be commit a4c3a59d47b2b1c794eda556d252c61907be1b3c)

source4/torture/raw/open.c

index 1901338e21c6c408579358c117a3f46b14f9db39..b6979fa0d9868d6320abbe6c34ab00b11902e5a5 100644 (file)
@@ -983,6 +983,7 @@ static bool test_nttrans_create(struct smbcli_state *cli, struct torture_context
                io.ntcreatex.in.create_options = create_option;
                status = smb_raw_open(cli->tree, tctx, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
+               fnum = io.ntcreatex.out.file.fnum;
 
                CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
                CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_EXISTED);