diff options
author | Jeremy Allison <jra@samba.org> | 2003-08-19 01:26:43 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-08-19 01:26:43 +0000 |
commit | c0236e8ae32af5480b14ac57677dc983e786d3d5 (patch) | |
tree | d19640b5afa5747231a4b58e96f5fa96236572ea /source3 | |
parent | e83a8a40c89491764d0658122800e05f3f75a7cd (diff) | |
download | samba-c0236e8ae32af5480b14ac57677dc983e786d3d5.tar.gz samba-c0236e8ae32af5480b14ac57677dc983e786d3d5.tar.bz2 samba-c0236e8ae32af5480b14ac57677dc983e786d3d5.zip |
Fix flush of 0xFFFF - found by Samba4 tester.
Jeremy.
(This used to be commit 8a5c97fa07eacd4cecb5afd9c197352dfa613b9f)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/reply.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 32b9c39aed..9577375475 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2367,10 +2367,12 @@ int reply_lseek(connection_struct *conn, char *inbuf,char *outbuf, int size, int int reply_flush(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize) { int outsize = set_message(outbuf,0,0,True); + uint16 fnum = SVAL(inbuf,smb_vwv0); files_struct *fsp = file_fsp(inbuf,smb_vwv0); START_PROFILE(SMBflush); - CHECK_FSP(fsp,conn); + if (fnum != 0xFFFF) + CHECK_FSP(fsp,conn); if (!fsp) { file_sync_all(conn); @@ -2737,7 +2739,7 @@ int reply_printclose(connection_struct *conn, if (!CAN_PRINT(conn)) { END_PROFILE(SMBsplclose); - return ERROR_DOS(ERRDOS,ERRnoaccess); + return ERROR_NT(NT_STATUS_UNSUCCESSFUL); } DEBUG(3,("printclose fd=%d fnum=%d\n", |