1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

expanded the RAW-READ test to make it clearer that all locks conflict

in SMBlockread, not just other peoples locks (error in spec)
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 19abdace95
commit a56f6896bf

View File

@ -243,10 +243,16 @@ static BOOL test_lockread(struct cli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK); CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.lockread.out.nread, 0); CHECK_VALUE(io.lockread.out.nread, 0);
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED);
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
printf("Trying zero file read\n"); printf("Trying zero file read\n");
io.lockread.in.count = 0; io.lockread.in.count = 0;
status = smb_raw_read(cli->tree, &io); status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED); CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
printf("Trying bad fnum\n"); printf("Trying bad fnum\n");
io.lockread.in.fnum = fnum+1; io.lockread.in.fnum = fnum+1;