From a123a12f593679bfc400ae72155dccee3d21209c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 29 Jan 2010 09:50:51 +0100 Subject: [PATCH] Allow to set only permission bits with perm option --- refclock_shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refclock_shm.c b/refclock_shm.c index ed0c3d0..083a06c 100644 --- a/refclock_shm.c +++ b/refclock_shm.c @@ -62,7 +62,7 @@ static int shm_initialise(RCL_Instance instance) { param = atoi(RCL_GetDriverParameter(instance)); s = RCL_GetDriverOption(instance, "perm"); - perm = s ? strtol(s, NULL, 8) : 0600; + perm = s ? strtol(s, NULL, 8) & 0777 : 0600; id = shmget(SHMKEY + param, sizeof (struct shmTime), IPC_CREAT | perm); if (id == -1) {