* [PATCH v2] man/man2const/TIOCLINUX.2const: Document CAP_SYS_ADMIN requirement for TIOCL_SETSEL modes
@ 2025-05-02 10:24 Günther Noack
2025-05-02 10:43 ` Alejandro Colomar
0 siblings, 1 reply; 2+ messages in thread
From: Günther Noack @ 2025-05-02 10:24 UTC (permalink / raw)
To: Alejandro Colomar
Cc: Günther Noack, Greg Kroah-Hartman, Jared Finder, Jann Horn,
Hanno Böck, Jiri Slaby, Kees Cook, linux-man
CAP_SYS_ADMIN was previously required for the entire TIOCL_SETSEL
subcode, but is now only needed for a subset of the selection modes,
since linux.git 2f83e38a095f (2025-01-13; "tty: Permit some
TIOCL_SETSEL modes without CAP_SYS_ADMIN").
The CAP_SYS_ADMIN requirement for TIOCL_SELMOUSEREPORT was further
corrected in linux.git ee6a44da3c87 (2025-04-11; "tty: Require
CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT").
Admittedly, there are kernels where CAP_SYS_ADMIN was briefly not
required for TIOCL_SELMOUSEREPORT, even after Linux v6.7, but this was
a mistake which is now fixed in all up-to-date stable kernels.
Therefore, we still document CAP_SYS_ADMIN as required "since Linux
6.7" in this case.
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=2f83e38a095f8bf7c6029883d894668b03b9bd93>
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=ee6a44da3c87cf64d67dd02be8c0127a5bf56175>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
man/man2const/TIOCLINUX.2const | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/man/man2const/TIOCLINUX.2const b/man/man2const/TIOCLINUX.2const
index 61f1c596d..b98a0202b 100644
--- a/man/man2const/TIOCLINUX.2const
+++ b/man/man2const/TIOCLINUX.2const
@@ -72,18 +72,30 @@ may be one of the following operations:
Select character-by-character.
The indicated screen characters are highlighted
and saved in a kernel buffer.
+.IP
+Since Linux 6.7, using this selection mode requires the
+.B CAP_SYS_ADMIN
+capability.
.TP
.B TIOCL_SELWORD
Select word-by-word,
expanding the selection outwards to align with word boundaries.
The indicated screen characters are highlighted
and saved in a kernel buffer.
+.IP
+Since Linux 6.7, using this selection mode requires the
+.B CAP_SYS_ADMIN
+capability.
.TP
.B TIOCL_SELLINE
Select line-by-line,
expanding the selection outwards to select full lines.
The indicated screen characters are highlighted
and saved in a kernel buffer.
+.IP
+Since Linux 6.7, using this selection mode requires the
+.B CAP_SYS_ADMIN
+capability.
.TP
.B TIOCL_SELPOINTER
Show the pointer at position
@@ -118,11 +130,11 @@ If mouse reporting is not enabled for the terminal,
this operation yields an
.B EINVAL
error.
-.RE
.IP
-Since Linux 6.7, using this subcode requires the
+Since Linux 6.7, using this selection mode requires the
.B CAP_SYS_ADMIN
capability.
+.RE
.TP
.BR subcode = TIOCL_PASTESEL
Paste selection.
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] man/man2const/TIOCLINUX.2const: Document CAP_SYS_ADMIN requirement for TIOCL_SETSEL modes
2025-05-02 10:24 [PATCH v2] man/man2const/TIOCLINUX.2const: Document CAP_SYS_ADMIN requirement for TIOCL_SETSEL modes Günther Noack
@ 2025-05-02 10:43 ` Alejandro Colomar
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2025-05-02 10:43 UTC (permalink / raw)
To: Günther Noack
Cc: Greg Kroah-Hartman, Jared Finder, Jann Horn, Hanno Böck,
Jiri Slaby, Kees Cook, linux-man
[-- Attachment #1: Type: text/plain, Size: 3080 bytes --]
Hi Günther,
On Fri, May 02, 2025 at 12:24:03PM +0200, Günther Noack wrote:
> CAP_SYS_ADMIN was previously required for the entire TIOCL_SETSEL
> subcode, but is now only needed for a subset of the selection modes,
> since linux.git 2f83e38a095f (2025-01-13; "tty: Permit some
> TIOCL_SETSEL modes without CAP_SYS_ADMIN").
>
> The CAP_SYS_ADMIN requirement for TIOCL_SELMOUSEREPORT was further
> corrected in linux.git ee6a44da3c87 (2025-04-11; "tty: Require
> CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT").
>
> Admittedly, there are kernels where CAP_SYS_ADMIN was briefly not
> required for TIOCL_SELMOUSEREPORT, even after Linux v6.7, but this was
> a mistake which is now fixed in all up-to-date stable kernels.
> Therefore, we still document CAP_SYS_ADMIN as required "since Linux
> 6.7" in this case.
>
> Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=2f83e38a095f8bf7c6029883d894668b03b9bd93>
> Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=ee6a44da3c87cf64d67dd02be8c0127a5bf56175>
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Thanks! I've applied the patch.
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=5889aa978ddc93d31d3c48c29899761ebde3f53d>
Have a lovely day!
Alex
> ---
> man/man2const/TIOCLINUX.2const | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/man/man2const/TIOCLINUX.2const b/man/man2const/TIOCLINUX.2const
> index 61f1c596d..b98a0202b 100644
> --- a/man/man2const/TIOCLINUX.2const
> +++ b/man/man2const/TIOCLINUX.2const
> @@ -72,18 +72,30 @@ may be one of the following operations:
> Select character-by-character.
> The indicated screen characters are highlighted
> and saved in a kernel buffer.
> +.IP
> +Since Linux 6.7, using this selection mode requires the
> +.B CAP_SYS_ADMIN
> +capability.
> .TP
> .B TIOCL_SELWORD
> Select word-by-word,
> expanding the selection outwards to align with word boundaries.
> The indicated screen characters are highlighted
> and saved in a kernel buffer.
> +.IP
> +Since Linux 6.7, using this selection mode requires the
> +.B CAP_SYS_ADMIN
> +capability.
> .TP
> .B TIOCL_SELLINE
> Select line-by-line,
> expanding the selection outwards to select full lines.
> The indicated screen characters are highlighted
> and saved in a kernel buffer.
> +.IP
> +Since Linux 6.7, using this selection mode requires the
> +.B CAP_SYS_ADMIN
> +capability.
> .TP
> .B TIOCL_SELPOINTER
> Show the pointer at position
> @@ -118,11 +130,11 @@ If mouse reporting is not enabled for the terminal,
> this operation yields an
> .B EINVAL
> error.
> -.RE
> .IP
> -Since Linux 6.7, using this subcode requires the
> +Since Linux 6.7, using this selection mode requires the
> .B CAP_SYS_ADMIN
> capability.
> +.RE
> .TP
> .BR subcode = TIOCL_PASTESEL
> Paste selection.
> --
> 2.49.0
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-02 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-02 10:24 [PATCH v2] man/man2const/TIOCLINUX.2const: Document CAP_SYS_ADMIN requirement for TIOCL_SETSEL modes Günther Noack
2025-05-02 10:43 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox