ipcs.1: ipcs no longer needs read permission on IPC resources
PATCH 1/1 ipcs.1: ipcs no longer needs read permission on IPC resources
From: Michael Kerrisk <[email protected]>
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 <[email protected]>
--- sys-utils/ipcs.1 | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
sys-utils/ipcs.1 +20 -2
@@ -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),
Signature · 6 lines
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/
Quoted 2 lines · Michael Kerrisk (man-pages)
sys-utils/ipcs.1 | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com