1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

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 commit is contained in:
Jeremy Allison
2004-09-27 23:57:59 +00:00
committed by Gerald (Jerry) Carter
parent 5d57058d91
commit 0a40c1a50f

View File

@ -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