summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_fruit.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-01-08 17:14:37 +0100
committerJeremy Allison <jra@samba.org>2015-01-08 23:38:06 +0100
commit56e2384dfe29fd8f16b9d0cf7264f9bb8ed38966 (patch)
tree9532028d0e936e392cd0ebc3320db5b3b4e406fb /source3/modules/vfs_fruit.c
parent87c176563baea3458c5322f1e3dfae6cf074b4b4 (diff)
downloadsamba-56e2384dfe29fd8f16b9d0cf7264f9bb8ed38966.tar.gz
vfs_fruit: mmap under FreeBSD needs PROT_READ
We memmove, which does read Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules/vfs_fruit.c')
-rw-r--r--source3/modules/vfs_fruit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index e2d9b35dbee..4eace1eb354 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -652,7 +652,7 @@ static int ad_convert(struct adouble *ad, int fd)
ad_getentrylen(ad, ADEID_RFORK);
/* FIXME: direct use of mmap(), vfs_aio_fork does it too */
- map = mmap(NULL, origlen, PROT_WRITE, MAP_SHARED, fd, 0);
+ map = mmap(NULL, origlen, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
if (map == MAP_FAILED) {
DEBUG(2, ("mmap AppleDouble: %s\n", strerror(errno)));
rc = -1;