Bug#866060: environ(7): please document the valid values of pathnames for SHELL, PAGER and EDITOR/VISUAL
tags 866060 fixed-upstream thanks This patch has been applied upstream. Cheers, Michael On Wed, 13 Jan 2021 at 11:15, Bastien Roucariès wrote: > > Package: manpages > Version: 5.10-1 > Followup-For: Bug #866060 > > Dear Maintainer, > > Please found the included patch > > Please apply -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/
Bug#866060: environ(7): please document the valid values of pathnames for SHELL, PAGER and EDITOR/VISUAL
Package: manpages Version: 5.10-1 Followup-For: Bug #866060 Dear Maintainer, Please found the included patch Please apply>From d244dedb553409aed1032d55384abfe68c085ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20Roucari=C3=A8s?= Date: Wed, 13 Jan 2021 10:02:38 + Subject: [PATCH] Document the valid values of pathnames for SHELL, PAGER and EDITOR/VISUAL The environ(7) man page says: SHELL The pathname of the user's login shell. PAGER The user's preferred utility to display text files. EDITOR/VISUAL The user's preferred utility to edit text files. but doesn't say whether the pathnames must be absolute or they can be resolved using $PATH, or whether they can have options. Note that at least for SHELL, this is not specified by POSIX. This issue was raised in the Austin Group mailing-list, and the answer is that "what constitutes a valid value for a platform should be documented" [1]. Since OpenSSH assumes that $SHELL is an absolute pathname (when set), it is supposed that the documentation should be: SHELL The absolute pathname of the user's login shell. For PAGER, POSIX says: "Any string acceptable as a command_string operand to the sh -c command shall be valid." For EDITOR, it does not need to be an absolute pathname since POSIX gives the example: EDITOR=vi fc and since it is specified as "the name of a utility", It assumes that arguments (options) must not be provided. Page 3013 about "more", it is said: "If the last pathname component in EDITOR is either vi or ex, [...]", thus again, it is assumed to be a pathname. For VISUAL, POSIX says: "Determine a pathname of a utility to invoke when the visual command [...]", thus it is also a pathname. It is not clear whether the pathname must be absolute, but for consistency with EDITOR, it will be resolved using $PATH. [1] https://www.mail-archive.com/austin-group-l@opengroup.org/msg01399.html --- man7/environ.7 | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/man7/environ.7 b/man7/environ.7 index 79e15a4..836a49f 100644 --- a/man7/environ.7 +++ b/man7/environ.7 @@ -113,16 +113,22 @@ The current working directory. Set by some shells. .TP .B SHELL -The pathname of the user's login shell. +The absolute pathname of the user's login shell. .TP .B TERM The terminal type for which output is to be prepared. .TP .B PAGER The user's preferred utility to display text files. +Any string acceptable as a command_string operand to the +.I sh -c +command shall be valid. .TP .BR EDITOR / VISUAL The user's preferred utility to edit text files. +Any string acceptable as a command_string operand to the +.I sh -c +command shall be valid. .\" .TP .\" .B BROWSER .\" The user's preferred utility to browse URLs. Sequence of colon-separated -- 2.29.2 signature.asc Description: This is a digitally signed message part.
Bug#866060: environ(7): please document the valid values of pathnames for SHELL, PAGER and EDITOR/VISUAL
Package: manpages Version: 4.11-1 Severity: wishlist The environ(7) man page says: SHELL The pathname of the user's login shell. PAGER The user's preferred utility to display text files. EDITOR/VISUAL The user's preferred utility to edit text files. but doesn't say whether the pathnames must be absolute or they can be resolved using $PATH, or whether they can have options. Note that at least for SHELL, this is not specified by POSIX. I've raised the issue in the Austin Group mailing-list, and the answer I got until now is that "what constitutes a valid value for a platform should be documented". Since OpenSSH assumes that $SHELL is an absolute pathname (when set), I suppose that the documentation should be: SHELL The absolute pathname of the user's login shell. For PAGER, POSIX says: "Any string acceptable as a command_string operand to the sh -c command shall be valid." For EDITOR, it does not need to be an absolute pathname since POSIX gives the example: EDITOR=vi fc and since it is specified as "the name of a utility", I assume that arguments (options) must not be provided. Page 3013 about "more", it is said: "If the last pathname component in EDITOR is either vi or ex, [...]", thus again, it is assumed to be a pathname. For VISUAL, POSIX says: "Determine a pathname of a utility to invoke when the visual command [...]", thus it is also a pathname. It is not clear whether the pathname must be absolute, but for consistency with EDITOR, I assume that it will be resolved using $PATH. -- System Information: Debian Release: buster/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores) Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) manpages depends on no packages. manpages recommends no packages. Versions of packages manpages suggests: ii man-db [man-browser] 2.7.6.1-2 -- no debconf information