[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] su: usage: make clear that -c is not using literal /bin/sh
From:       Roland Hieber <rhi () pengutronix ! de>
Date:       2020-01-09 16:18:20
Message-ID: 20200109161819.4770-1-rhi () pengutronix ! de
[Download RAW message or body]

When USER has a different shell set in /etc/passwd, the -c parameter
will be passed to that shell. For example, if the configured shell is
/bin/false, -c will not do the intended thing, unless e.g. -s /bin/sh
is also used. Improve the help text to hopefully prevent such confusion.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 loginutils/su.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/loginutils/su.c b/loginutils/su.c
index 7c1fc69c5b6a..5b446dec4911 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -40,7 +40,7 @@
 //usage:       "Run shell under USER (by default, root)\n"
 //usage:     "\n	-,-l	Clear environment, go to home dir, run shell as login shell"
 //usage:     "\n	-p,-m	Do not set new $HOME, $SHELL, $USER, $LOGNAME"
-//usage:     "\n	-c CMD	Command to pass to 'sh -c'"
+//usage:     "\n	-c CMD	Command to pass to '$SHELL -c'"
 //usage:     "\n	-s SH	Shell to use instead of user's default"
 
 #include "libbb.h"
-- 
2.25.0.rc1

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic