blob: ad051ff2d52a5f8de514d086ae45eb2d483412d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$NetBSD: patch-ae,v 1.2 2001/04/01 14:04:37 martin Exp $
--- models/upscommon.c.orig Tue Feb 27 07:01:46 2001
+++ models/upscommon.c Sun Apr 1 15:59:54 2001
@@ -555,11 +555,16 @@
#ifdef HAVE_SHMAT
test_writeinfo();
-/* some systems (NetBSD) don't define SHM_R and SHM_W - they default to it */
+/*
+ * The use of SHM_R and SHM_W is not portable. Neither Posix nor
+ * SUSv2 specify it. Solaris and Linux have them (as well as newer
+ * versions of NetBSD) but either do not document them (Solaris) or
+ * explicitly depreceate their use (NetBSD).
+ */
#ifdef SHM_R
#define IPC_MODE IPC_CREAT|SHM_R|SHM_W|S_IRGRP|S_IWGRP
#else
-#define IPC_MODE IPC_CREAT
+#define IPC_MODE IPC_CREAT|0600|S_IRGRP|S_IWGRP
#endif
if (shmok == 1) {
|