* [PATCH] ipcs.1: ipcs no longer needs read permission on IPC resources
@ 2020-05-16 8:10 Michael Kerrisk (man-pages)
2020-05-18 11:41 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-16 8:10 UTC (permalink / raw)
To: Karel Zak; +Cc: mtk.manpages, util-linux, Sami Kerola
From: Michael Kerrisk <mtk.manpages@gmail.com>
Date: Sat, 16 May 2020 09:45:11 +0200
Subject: [PATCH] ipcs.1: ipcs no longer needs read permission on IPC resources
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 | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/sys-utils/ipcs.1 b/sys-utils/ipcs.1
index 93c35e323..4b3baaaa5 100644
--- a/sys-utils/ipcs.1
+++ b/sys-utils/ipcs.1
@@ -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),
--
2.26.2
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipcs.1: ipcs no longer needs read permission on IPC resources
2020-05-16 8:10 [PATCH] ipcs.1: ipcs no longer needs read permission on IPC resources Michael Kerrisk (man-pages)
@ 2020-05-18 11:41 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2020-05-18 11:41 UTC (permalink / raw)
To: Michael Kerrisk (man-pages); +Cc: util-linux, Sami Kerola
On Sat, May 16, 2020 at 10:10:27AM +0200, Michael Kerrisk (man-pages) wrote:
> sys-utils/ipcs.1 | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-18 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 8:10 [PATCH] ipcs.1: ipcs no longer needs read permission on IPC resources Michael Kerrisk (man-pages)
2020-05-18 11:41 ` Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.