summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-03 18:40:31 +0000
committerJeremy Allison <jra@samba.org>1998-09-03 18:40:31 +0000
commit7bb86c1b132bce31a006ea9768a54db7a45fe1a5 (patch)
tree1802e8e2741345e91187fc4b149016af75990971 /source3/smbd/nttrans.c
parent4acd373e5bbd615141ceb5fb3c4a588a5b4581d7 (diff)
downloadsamba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.tar.gz
samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.tar.bz2
samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.zip
Ok - this is the 64 bit widening check in. It changes the configure
to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 9e507aa4d2..3fdee043dc 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -415,7 +415,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
int oplock_request = 0;
int unixmode, pnum = -1;
int fmode=0,mtime=0,rmode=0;
- off_t file_len = 0;
+ SMB_OFF_T file_len = 0;
SMB_STRUCT_STAT sbuf;
int smb_action = 0;
BOOL bad_path = False;
@@ -602,7 +602,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
return(ERROR(ERRDOS,ERRnoaccess));
}
} else {
- if (fstat(fsp->fd_ptr->fd,&sbuf) != 0) {
+ if (sys_fstat(fsp->fd_ptr->fd,&sbuf) != 0) {
close_file(fsp,False);
restore_case_semantics(file_attributes);
return(ERROR(ERRDOS,ERRnoaccess));
@@ -660,12 +660,12 @@ int reply_ntcreate_and_X(connection_struct *conn,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 12;
-#if OFF_T_IS_64_BITS
+#ifdef LARGE_SMB_OFF_T
SIVAL(p,0, file_len & 0xFFFFFFFF);
SIVAL(p,4, file_len >> 32);
-#else /* OFF_T_IS_64_BITS */
+#else /* LARGE_SMB_OFF_T */
SIVAL(p,0,file_len);
-#endif /* OFF_T_IS_64_BITS */
+#endif /* LARGE_SMB_OFF_T */
p += 12;
SCVAL(p,0,fsp->is_directory ? 1 : 0);
@@ -809,7 +809,7 @@ static int call_nt_transact_create(connection_struct *conn,
return(UNIXERROR(ERRDOS,ERRnoaccess));
}
- if (fstat(fsp->fd_ptr->fd,&sbuf) != 0) {
+ if (sys_fstat(fsp->fd_ptr->fd,&sbuf) != 0) {
close_file(fsp,False);
restore_case_semantics(file_attributes);