Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Expose the IPC_[RWM] symbols to userspace.



details:   https://anonhg.NetBSD.org/src/rev/850168d30723
branches:  trunk
changeset: 534994:850168d30723
user:      soren <soren%NetBSD.org@localhost>
date:      Wed Aug 07 23:39:24 2002 +0000

description:
Expose the IPC_[RWM] symbols to userspace.
Fixes PR misc/14515 by Hendrik Scholz.

diffstat:

 sys/sys/ipc.h |  12 ++++++------
 sys/sys/shm.h |   6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (53 lines):

diff -r 06fbfd9921ce -r 850168d30723 sys/sys/ipc.h
--- a/sys/sys/ipc.h     Wed Aug 07 23:26:34 2002 +0000
+++ b/sys/sys/ipc.h     Wed Aug 07 23:39:24 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipc.h,v 1.23 2000/06/02 15:53:05 simonb Exp $  */
+/*     $NetBSD: ipc.h,v 1.24 2002/08/07 23:39:24 soren Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -100,6 +100,11 @@
 };
 #endif /* _KERNEL */
 
+/* Common access type bits, used with ipcperm(). */
+#define        IPC_R           000400  /* read permission */
+#define        IPC_W           000200  /* write/alter permission */
+#define        IPC_M           010000  /* permission to change control info */
+
 /* X/Open required constants (same values as system 5) */
 #define        IPC_CREAT       001000  /* create entry if key does not exist */
 #define        IPC_EXCL        002000  /* fail if key exists */
@@ -124,11 +129,6 @@
 #define        IPCID_TO_IX(id)         ((id) & 0xffff)
 #define        IPCID_TO_SEQ(id)        (((id) >> 16) & 0xffff)
 
-/* Common access type bits, used with ipcperm(). */
-#define        IPC_R           000400  /* read permission */
-#define        IPC_W           000200  /* write/alter permission */
-#define        IPC_M           010000  /* permission to change control info */
-
 int    ipcperm __P((struct ucred *, struct ipc_perm *, int));
 
 void   ipc_perm14_to_native __P((struct ipc_perm14 *, struct ipc_perm *));
diff -r 06fbfd9921ce -r 850168d30723 sys/sys/shm.h
--- a/sys/sys/shm.h     Wed Aug 07 23:26:34 2002 +0000
+++ b/sys/sys/shm.h     Wed Aug 07 23:39:24 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: shm.h,v 1.30 2002/04/03 11:50:51 fvdl Exp $    */
+/*     $NetBSD: shm.h,v 1.31 2002/08/07 23:39:24 soren Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -137,8 +137,8 @@
  * Permission definitions used in shmflag arguments to shmat(2) and shmget(2).
  * Provided for source compatibility only; do not use in new code!
  */
-#define        SHM_R           0000400 /* S_IRUSR, R for owner */
-#define        SHM_W           0000200 /* S_IWUSR, W for owner */
+#define        SHM_R           IPC_R   /* S_IRUSR, R for owner */
+#define        SHM_W           IPC_W   /* S_IWUSR, W for owner */
 
 /*
  * System 5 style catch-all structure for shared memory constants that



Home | Main Index | Thread Index | Old Index