Expose the IPC_[RWM] symbols to userspace.

Fixes PR misc/14515 by Hendrik Scholz.
This commit is contained in:
soren 2002-08-07 23:39:24 +00:00
parent ac60be1a15
commit dbfd055e10
2 changed files with 9 additions and 9 deletions

View File

@ -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 @@ struct ipc_perm14 {
};
#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 @@ struct ipc_perm14 {
#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 *));

View File

@ -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 @@ struct shmid_ds14 {
* 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