From: Miroslav Lichvar Date: Fri, 29 Jan 2010 08:50:51 +0000 (+0100) Subject: Allow to set only permission bits with perm option X-Git-Tag: 1.24~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a123a12f593679bfc400ae72155dccee3d21209c;p=thirdparty%2Fchrony.git Allow to set only permission bits with perm option --- diff --git a/refclock_shm.c b/refclock_shm.c index ed0c3d08..083a06ce 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) {