diff options
author | Jeremy Allison <jra@samba.org> | 1998-10-26 18:44:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-10-26 18:44:01 +0000 |
commit | 4332bc06c6604a3e14007eda4f40e6183a1f8526 (patch) | |
tree | 75d02c5166844fc8bd8533a818c26a6cf5841ece | |
parent | b2210614e810c8e84c9a14a8e32e05f95d92479b (diff) | |
download | samba-4332bc06c6604a3e14007eda4f40e6183a1f8526.tar.gz samba-4332bc06c6604a3e14007eda4f40e6183a1f8526.tar.xz samba-4332bc06c6604a3e14007eda4f40e6183a1f8526.zip |
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.
-rw-r--r-- | source/smbd/trans2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index f0bd458798f..fdd3652cf74 100644 --- a/source/smbd/trans2.c +++ b/source/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; |