diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-09-18 03:00:20 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-09-18 03:00:20 +0000 |
commit | c7da9992cb39fc84a6a915dd2158beaf5e616617 (patch) | |
tree | 73f84eb8340e52b0362b3c7f84710062114194e4 /source3/smbd/nttrans.c | |
parent | fdc07d1417274d10038da83cee2ea718e6a7abec (diff) | |
download | samba-c7da9992cb39fc84a6a915dd2158beaf5e616617.tar.gz samba-c7da9992cb39fc84a6a915dd2158beaf5e616617.tar.bz2 samba-c7da9992cb39fc84a6a915dd2158beaf5e616617.zip |
gto ri of a bunch more #ifdef LARGE_SMB_OFF_T checks by introducing a
SOFF_T() macro for setting an SMB_OFF_T variable
also limited mmap based reads to MAX_MMAP_SIZE. We really can't mmap
2^50 bytes due to virtual address space problems.
(This used to be commit 4e784b18899eddd2399a51fa7d8c219560432922)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r-- | source3/smbd/nttrans.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index ee3385f152..2d991eef20 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -663,20 +663,10 @@ int reply_ntcreate_and_X(connection_struct *conn, put_long_date(p,sbuf.st_mtime); /* change time */ p += 8; SIVAL(p,0,fmode); /* File Attributes. */ - p += 4; -#ifdef LARGE_SMB_OFF_T - SIVAL(p,0, file_len); - SIVAL(p,4, file_len >> 32); -#else /* LARGE_SMB_OFF_T */ - SIVAL(p,0,file_len); -#endif /* LARGE_SMB_OFF_T */ + p += 4; + SOFF_T(p, 0, file_len); p += 8; -#ifdef LARGE_SMB_OFF_T - SIVAL(p,0, file_len); - SIVAL(p,4, file_len >> 32); -#else /* LARGE_SMB_OFF_T */ - SIVAL(p,0,file_len); -#endif /* LARGE_SMB_OFF_T */ + SOFF_T(p,0,file_len); p += 12; SCVAL(p,0,fsp->is_directory ? 1 : 0); @@ -900,19 +890,9 @@ static int call_nt_transact_create(connection_struct *conn, p += 8; SIVAL(p,0,fmode); /* File Attributes. */ p += 4; -#ifdef LARGE_SMB_OFF_T - SIVAL(p,0, file_len); - SIVAL(p,4, (file_len >> 32)); -#else /* LARGE_SMB_OFF_T */ - SIVAL(p,0,file_len); -#endif /* LARGE_SMB_OFF_T */ + SOFF_T(p,0,file_len); p += 8; -#ifdef LARGE_SMB_OFF_T - SIVAL(p,0, file_len); - SIVAL(p,4, (file_len >> 32)); -#else /* LARGE_SMB_OFF_T */ - SIVAL(p,0,file_len); -#endif /* LARGE_SMB_OFF_T */ + SOFF_T(p,0,file_len); } /* Send the required number of replies */ |