From 8df096a75e59e6b08f3358099ad51a7f52bf28b8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 27 Sep 2004 23:57:59 +0000 Subject: 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) --- source3/smbd/dosmode.c | 4 ++-- 1 file 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 -- cgit