summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-10-26 18:44:01 +0000
committerJeremy Allison <jra@samba.org>1998-10-26 18:44:01 +0000
commit8546b7ec9486881261d3a97c893d4cb09b24461e (patch)
tree078034fb65b9515b5224188986b4981473770689 /source3
parent46fcd85b2dbe32c0f78a9382f8c3e2db92416391 (diff)
downloadsamba-8546b7ec9486881261d3a97c893d4cb09b24461e.tar.gz
samba-8546b7ec9486881261d3a97c893d4cb09b24461e.tar.bz2
samba-8546b7ec9486881261d3a97c893d4cb09b24461e.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. (This used to be commit 4332bc06c6604a3e14007eda4f40e6183a1f8526)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c7
1 files changed, 5 insertions, 2 deletions
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;