aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-12-31 02:52:35 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-12-31 02:52:35 +0100
commita9e25ffa678a357c581b9b7f65a7b2ce1ae2a63e (patch)
treebdc8541f2861e793ee15d218814487af6c91b73c
parent0cd4f3039b5a6518eb322f26ed8430529befc3ae (diff)
downloadbusybox-w32-a9e25ffa678a357c581b9b7f65a7b2ce1ae2a63e.tar.gz
busybox-w32-a9e25ffa678a357c581b9b7f65a7b2ce1ae2a63e.tar.bz2
busybox-w32-a9e25ffa678a357c581b9b7f65a7b2ce1ae2a63e.zip
su: document -l in --help text. Closes bug 2761
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/usage.src.h9
-rw-r--r--loginutils/su.c10
2 files changed, 10 insertions, 9 deletions
diff --git a/include/usage.src.h b/include/usage.src.h
index 69a9fa159..ea0e6a452 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -3524,15 +3524,6 @@ INSERT
3524 "\n -g Print in stty-readable form" \ 3524 "\n -g Print in stty-readable form" \
3525 "\n [SETTING] See manpage" \ 3525 "\n [SETTING] See manpage" \
3526 3526
3527#define su_trivial_usage \
3528 "[OPTIONS] [-] [USERNAME]"
3529#define su_full_usage "\n\n" \
3530 "Change user id or become root\n" \
3531 "\nOptions:" \
3532 "\n -p,-m Preserve environment" \
3533 "\n -c CMD Command to pass to 'sh -c'" \
3534 "\n -s SH Shell to use instead of default shell" \
3535
3536#define sulogin_trivial_usage \ 3527#define sulogin_trivial_usage \
3537 "[-t N] [TTY]" 3528 "[-t N] [TTY]"
3538#define sulogin_full_usage "\n\n" \ 3529#define sulogin_full_usage "\n\n" \
diff --git a/loginutils/su.c b/loginutils/su.c
index c31e7e771..db303af6d 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -8,6 +8,16 @@
8#include "libbb.h" 8#include "libbb.h"
9#include <syslog.h> 9#include <syslog.h>
10 10
11//usage:#define su_trivial_usage
12//usage: "[OPTIONS] [-] [USER]"
13//usage:#define su_full_usage "\n\n"
14//usage: "Run shell under USER (by default, root)\n"
15//usage: "\nOptions:"
16//usage: "\n -,-l Clear environment, run shell as login shell"
17//usage: "\n -p,-m Do not set new $HOME, $SHELL, $USER, $LOGNAME"
18//usage: "\n -c CMD Command to pass to 'sh -c'"
19//usage: "\n -s SH Shell to use instead of user's default"
20
11#if ENABLE_FEATURE_SU_CHECKS_SHELLS 21#if ENABLE_FEATURE_SU_CHECKS_SHELLS
12/* Return 1 if SHELL is a restricted shell (one not returned by 22/* Return 1 if SHELL is a restricted shell (one not returned by
13 * getusershell), else 0, meaning it is a standard shell. */ 23 * getusershell), else 0, meaning it is a standard shell. */