summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-27 23:57:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:49 -0500
commit8df096a75e59e6b08f3358099ad51a7f52bf28b8 (patch)
treee1822ab3dbc508b4d7e710b8841f4a6f8e2e58c4 /source3/smbd
parent2d5bf9ec40dbae68ced924604e180f6669b80670 (diff)
downloadsamba-8df096a75e59e6b08f3358099ad51a7f52bf28b8.tar.gz
samba-8df096a75e59e6b08f3358099ad51a7f52bf28b8.tar.bz2
samba-8df096a75e59e6b08f3358099ad51a7f52bf28b8.zip
r2700: Fix bug where we could incorrectly set sparse attribute. Don't use
st_blksize, it isn't what you think.... Jeremy. --his line, and those below, will be ignored-- M source/smbd/dosmode.c (This used to be commit 0a40c1a50f0e4b1b7efc9a53d22ceac14841bccf)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/dosmode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 33c75fffd5..7199b3ebbf 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -135,8 +135,8 @@ uint32 dos_mode_from_sbuf(connection_struct *conn, SMB_STRUCT_STAT *sbuf)
if (S_ISDIR(sbuf->st_mode))
result = aDIR | (result & aRONLY);
-#if defined (HAVE_STAT_ST_BLOCKS) && defined (HAVE_STAT_ST_BLKSIZE)
- if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)sbuf->st_blksize) {
+#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
+ if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)STAT_ST_BLOCKSIZE) {
result |= FILE_ATTRIBUTE_SPARSE;
}
#endif