summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2010-10-20 22:14:09 +0200
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2010-11-24 19:12:10 -0500
commitde9905db03afd64fc81a1f4148e186c60391cc31 (patch)
tree286c85c4bb0fd2e52f1e3be8dc33afe75ca5d57b /sys
parent0b99919c55d09aa91d1c3c2291072d19e14fa8ae (diff)
shm: Change permissions on old shm areas too
Change the permissions on old shm areas
Diffstat (limited to 'sys')
-rw-r--r--sys/shm/shmpipe.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c
index 436b8d251..f42719711 100644
--- a/sys/shm/shmpipe.c
+++ b/sys/shm/shmpipe.c
@@ -396,8 +396,14 @@ sp_close (ShmPipe * self)
int
sp_writer_setperms_shm (ShmPipe * self, mode_t perms)
{
+ int ret = 0;
+ ShmArea *area;
+
self->perms = perms;
- return fchmod (self->shm_area->shm_fd, perms);
+ for (area = self->shm_area; area; area = area->next)
+ ret |= fchmod (area->shm_fd, perms);
+
+ return ret;
}
static int