diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-20 07:37:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-20 07:37:25 +0000 |
commit | 724994c8c9029684bb33c01eaaa76a2461b1c3e5 (patch) | |
tree | 38f26566f846fda413ff31c1fe5954b85a76bf9c /lib/libc/sys/semget.2 | |
parent | e0107850bdb2bbd50819542842d7097e863ae468 (diff) |
SEM_R and SEM_A userland accessable as required; michaels@inet.no
Diffstat (limited to 'lib/libc/sys/semget.2')
-rw-r--r-- | lib/libc/sys/semget.2 | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/libc/sys/semget.2 b/lib/libc/sys/semget.2 index 5a337b6f27b..00863ab13c5 100644 --- a/lib/libc/sys/semget.2 +++ b/lib/libc/sys/semget.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: semget.2,v 1.4 1997/11/24 02:07:32 deraadt Exp $ +.\" $OpenBSD: semget.2,v 1.5 1998/07/20 07:37:24 deraadt Exp $ .\" $NetBSD: semget.2,v 1.2 1997/03/27 08:20:41 mikel Exp $ .\" .\" Copyright (c) 1995 Frank van der Linden @@ -54,9 +54,27 @@ semaphores is created if either .Fa key is equal to IPC_PRIVATE, or .Fa key -does not have a semaphore set associated with it, and the IPC_CREAT bit is +does not have a semaphore set associated with it and the IPC_CREAT bit is set in -.Fa msgflg. +.Fa semflg. + +The access modes of the created semaphores is specified in +.Fa semflg +by +.Em or Ns 'ing +the following values +.Pp +.Bd -literal -offset indent -compact +SEM_A alter permission for owner +SEM_R read permission for owner + +SEM_A >> 3 alter permission for group +SEM_R >> 3 read permission for group + +SEM_A >> 6 alter permission for other +SEM_R >> 6 read permission for other +.Ed +.Pp If a new set of semaphores is created, the data structure associated with it (the @@ -78,7 +96,7 @@ are set to the effective gid of the calling process. .It .Va sem_perm.mode is set to the lower 9 bits of -.Fa msgflg . +.Fa semflg . .It .Va sem_nsems is set to the value of @@ -103,7 +121,7 @@ The caller has no permission to access a semaphore set already associated with .Fa key. .It Bq Er EEXIST Both IPC_CREAT and IPC_EXCL are set in -.Fa msgflg , +.Fa semflg , and a semaphore set is already associated with .Fa key . .It Bq Er EINVAL @@ -121,7 +139,7 @@ for the number of semaphores or the number of semaphore sets has been reached. .It Bq Er ENOENT IPC_CREAT was not set in -.Fa msgflg +.Fa semflg and no semaphore set associated with .Fa key was found. |