I noticed a nit in chroot's --help output.
I.e., what if the expansion of $SHELL contains white space or shell
metacharacters? You can argue they'd get what they deserve :-)
But still... we care about robustness, even if it's only in
--help output's implied advice.

* src/chroot.c (usage): Use correct quoting in descriptive diagnostic.
We would run `"$SHELL" -i`, not `${SHELL} -i`.
 src/chroot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/chroot.c b/src/chroot.c
index 885048f1e..b8b72586d 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -207,7 +207,7 @@ Run COMMAND with root directory set to NEWROOT.\n\
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       fputs (_("\
-If no command is given, run '${SHELL} -i' (default: '/bin/sh -i').\n\
+If no command is given, run '"$SHELL" -i' (default: '/bin/sh -i').\n\
 "), stdout);
       emit_ancillary_info (PROGRAM_NAME);

Reply via email to