]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcs.1: ipcs no longer needs read permission on IPC resources
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 16 May 2020 07:45:11 +0000 (09:45 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 18 May 2020 08:35:31 +0000 (10:35 +0200)
With changes starting around util-linux commit 058e81540fbb0d2b78
that switched from using IPC_STAT to parsing /proc/sysvipc/*,
ipcs now shows all IPC objects rather than just the objects for
which the user has read permission. Update the page to reflect this
fact, and also add a NOTES section describing the historical and
fallback behavior where /proc is not available.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
sys-utils/ipcs.1

index 93c35e323809b6638aee5a753f2f2e16cfd16573..4b3baaaa540f7dadc84ab359b38ed3a2850ca4d8 100644 (file)
@@ -8,8 +8,7 @@ ipcs \- show information on IPC facilities
 [options]
 .SH DESCRIPTION
 .B ipcs
-shows information on the inter-process communication facilities
-for which the calling process has read access.
+shows information on inter-process communication facilities.
 By default it shows information about all three resources:
 shared memory segments, message queues, and semaphore arrays.
 .SH OPTIONS
@@ -76,6 +75,25 @@ Print sizes in bytes.
 .TP
 .B \-\-human
 Print sizes in human-readable format.
+.SH NOTES
+The current implementation of
+.B ipcs
+obtains information about available IPC resources by parsing the files in
+.IR /proc/sysvipc .
+Before util-linux version v2.23, an alternate mechanism was used: the
+.BR IPC_STAT
+command of
+.BR msgctl (2),
+.BR semctl (2),
+and
+.BR shmctl (2).
+This mechanism is also used in later util-linux versions in the case where
+.I /proc
+is unavailable.
+A limitation of the
+.B IPC_STAT
+mechanism is that it can only be used to retrieve information about
+IPC resources for which the user has read permission.
 .SH SEE ALSO
 .BR ipcmk (1),
 .BR ipcrm (1),