svn commit: samba r2701 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Mon Sep 27 23:58:09 GMT 2004


Author: jra
Date: 2004-09-27 23:58:07 +0000 (Mon, 27 Sep 2004)
New Revision: 2701

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/smbd&rev=2701&nolog=1

Log:
Fix bug where we could incorrectly set sparse attribute. Don't use
st_blksize, it isn't what you think....
Jeremy.

Modified:
   trunk/source/smbd/dosmode.c


Changeset:
Modified: trunk/source/smbd/dosmode.c
===================================================================
--- trunk/source/smbd/dosmode.c	2004-09-27 23:57:59 UTC (rev 2700)
+++ trunk/source/smbd/dosmode.c	2004-09-27 23:58:07 UTC (rev 2701)
@@ -135,8 +135,8 @@
 	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



More information about the samba-cvs mailing list