summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-06-09 15:24:26 +0200
committerBjörn Jacke <bj@sernet.de>2010-06-09 15:27:38 +0200
commit6a6bb768c6542d738a8b2b6da282159a65ed611d (patch)
tree8f1cd5e256d5e5d1680baaf5f152f3f656fb0b20 /source3/modules
parent687c42ee6526ff5deb9f3a8d7c13667b520b7440 (diff)
downloadsamba-6a6bb768c6542d738a8b2b6da282159a65ed611d.tar.gz
samba-6a6bb768c6542d738a8b2b6da282159a65ed611d.tar.bz2
samba-6a6bb768c6542d738a8b2b6da282159a65ed611d.zip
s3: fix calculation of st_blocks in streams_xattr
Thanks to Joachim Schmitz for finding that miscalculation.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_streams_xattr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index aa7ef080e6..218e5ec078 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -238,7 +238,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
sbuf->st_ex_ino = stream_inode(sbuf, io->xattr_name);
sbuf->st_ex_mode &= ~S_IFMT;
sbuf->st_ex_mode |= S_IFREG;
- sbuf->st_ex_blocks = sbuf->st_ex_size % STAT_ST_BLOCKSIZE + 1;
+ sbuf->st_ex_blocks = sbuf->st_ex_size / STAT_ST_BLOCKSIZE + 1;
return 0;
}
@@ -291,7 +291,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle,
smb_fname->st.st_ex_mode &= ~S_IFMT;
smb_fname->st.st_ex_mode |= S_IFREG;
smb_fname->st.st_ex_blocks =
- smb_fname->st.st_ex_size % STAT_ST_BLOCKSIZE + 1;
+ smb_fname->st.st_ex_size / STAT_ST_BLOCKSIZE + 1;
result = 0;
fail:
@@ -342,7 +342,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle,
smb_fname->st.st_ex_mode &= ~S_IFMT;
smb_fname->st.st_ex_mode |= S_IFREG;
smb_fname->st.st_ex_blocks =
- smb_fname->st.st_ex_size % STAT_ST_BLOCKSIZE + 1;
+ smb_fname->st.st_ex_size / STAT_ST_BLOCKSIZE + 1;
result = 0;