From 8546b7ec9486881261d3a97c893d4cb09b24461e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 26 Oct 1998 18:44:01 +0000 Subject: Fixed a couple of issues with the SMB_QUERY_FILE_ALL_INFO query. Ensured offset was being reported correctly for 64 bit file access, ensured delete on close bit was being reported correctly. Jeremy. (This used to be commit 4332bc06c6604a3e14007eda4f40e6183a1f8526) --- source3/smbd/trans2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index f0bd458798..fdd3652cf7 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1240,6 +1240,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, int l; SMB_OFF_T pos = 0; BOOL bad_path = False; + BOOL delete_pending = False; if (tran_call == TRANSACT2_QFILEINFO) { files_struct *fsp = file_fsp(params,0); @@ -1276,6 +1277,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, } if((pos = sys_lseek(fsp->fd_ptr->fd,0,SEEK_CUR)) == -1) return(UNIXERROR(ERRDOS,ERRnoaccess)); + + delete_pending = fsp->fd_ptr->delete_on_close; } } else { /* qpathinfo */ @@ -1429,7 +1432,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, SOFF_T(pdata,0,size); SOFF_T(pdata,8,size); SIVAL(pdata,16,sbuf.st_nlink); - CVAL(pdata,20) = 0; + CVAL(pdata,20) = delete_pending; CVAL(pdata,21) = (mode&aDIR)?1:0; pdata += 24; SINO_T(pdata,0,(SMB_INO_T)sbuf.st_ino); @@ -1440,7 +1443,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, else SIVAL(pdata,0,0xd01BF); pdata += 4; - SIVAL(pdata,0,pos); /* current offset */ + SOFF_T(pdata,0,pos); /* current offset */ pdata += 8; SIVAL(pdata,0,mode); /* is this the right sort of mode info? */ pdata += 4; -- cgit