---
+* [Bug 2627] shm refclock allows only two units with owner-only access
+ rework: reverted sense of mode bit (so default reflects previous
+ behaviour) and updated ducumentation.
+---
(4.2.8p1-RC1) 2015/01/24 Released by Harlan Stenn <stenn@ntp.org>
* Start the RC for 4.2.8p1.
<td align="center">0</td>
<td align="center">1</td>
<td align="center">1</td>
- <td>The SHM segment is accessible by the world. (Ignored/rejected for
- units 0 and 1!)</td>
+ <td>The SHM segment is private (mode 0600). This is the fixed
+ default for clock units 0 and 1; clock units >1 are mode
+ 0666 unless this bit is set for the specific unit.</td>
</tr><tr>
<td align="center">1-31</td>
<td align="center">-</td>
/*
* Mode flags
*/
-#define MODE_PUBLIC 0x0001
+#define SHM_MODE_PRIVATE 0x0001
/*
* Function prototypes
pp->io.datalen = 0;
pp->io.fd = -1;
- up->forall = (peer->ttl & MODE_PUBLIC) != 0;
- if (up->forall && unit < 2) {
- msyslog(LOG_WARNING, "SHM: public mode ignored for unit %d",
- unit);
- up->forall = FALSE;
- }
+ up->forall = (unit >= 2) && !(peer->ttl & SHM_MODE_PRIVATE);
up->shm = getShmTime(unit, up->forall);