aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorPere Orga <gotrunks@gmail.com>2011-04-01 22:56:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-04-03 01:33:55 +0200
commit6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch)
treeb7d40d6e0c6042f0d102101ff7b5784d2f0536ba /loginutils
parentfa9126e68904b16aee2a0fc47688ffe17403152a (diff)
downloadbusybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz
busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.bz2
busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.zip
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/addgroup.c9
-rw-r--r--loginutils/adduser.c15
-rw-r--r--loginutils/chpasswd.c14
-rw-r--r--loginutils/cryptpw.c39
-rw-r--r--loginutils/deluser.c12
-rw-r--r--loginutils/login.c10
-rw-r--r--loginutils/passwd.c12
-rw-r--r--loginutils/sulogin.c7
-rw-r--r--loginutils/vlock.c7
9 files changed, 125 insertions, 0 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index 5a0714501..2d6736f1a 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -9,6 +9,15 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 * 10 *
11 */ 11 */
12
13//usage:#define addgroup_trivial_usage
14//usage: "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
15//usage:#define addgroup_full_usage "\n\n"
16//usage: "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n"
17//usage: "\nOptions:"
18//usage: "\n -g GID Group id"
19//usage: "\n -S Create a system group"
20
12#include "libbb.h" 21#include "libbb.h"
13 22
14#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID 23#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 0c675caf9..1944d9d56 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -7,6 +7,21 @@
7 * 7 *
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10
11//usage:#define adduser_trivial_usage
12//usage: "[OPTIONS] USER"
13//usage:#define adduser_full_usage "\n\n"
14//usage: "Add a user\n"
15//usage: "\nOptions:"
16//usage: "\n -h DIR Home directory"
17//usage: "\n -g GECOS GECOS field"
18//usage: "\n -s SHELL Login shell"
19//usage: "\n -G GRP Add user to existing group"
20//usage: "\n -S Create a system user"
21//usage: "\n -D Don't assign a password"
22//usage: "\n -H Don't create home directory"
23//usage: "\n -u UID User id"
24
10#include "libbb.h" 25#include "libbb.h"
11 26
12#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID 27#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 48cf9b130..c2d86664d 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -7,6 +7,20 @@
7 */ 7 */
8#include "libbb.h" 8#include "libbb.h"
9 9
10//usage:#define chpasswd_trivial_usage
11//usage: IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
12//usage:#define chpasswd_full_usage "\n\n"
13//usage: "Read user:password from stdin and update /etc/passwd\n"
14//usage: "\nOptions:"
15//usage: IF_LONG_OPTS(
16//usage: "\n -e,--encrypted Supplied passwords are in encrypted form"
17//usage: "\n -m,--md5 Use MD5 encryption instead of DES"
18//usage: )
19//usage: IF_NOT_LONG_OPTS(
20//usage: "\n -e Supplied passwords are in encrypted form"
21//usage: "\n -m Use MD5 encryption instead of DES"
22//usage: )
23
10#if ENABLE_LONG_OPTS 24#if ENABLE_LONG_OPTS
11static const char chpasswd_longopts[] ALIGN1 = 25static const char chpasswd_longopts[] ALIGN1 =
12 "encrypted\0" No_argument "e" 26 "encrypted\0" No_argument "e"
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c
index 6c801f9fa..72388c492 100644
--- a/loginutils/cryptpw.c
+++ b/loginutils/cryptpw.c
@@ -10,6 +10,45 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12 12
13//usage:#define cryptpw_trivial_usage
14//usage: "[OPTIONS] [PASSWORD] [SALT]"
15/* We do support -s, we just don't mention it */
16//usage:#define cryptpw_full_usage "\n\n"
17//usage: "Crypt the PASSWORD using crypt(3)\n"
18//usage: "\nOptions:"
19//usage: IF_LONG_OPTS(
20//usage: "\n -P,--password-fd=N Read password from fd N"
21/* //usage: "\n -s,--stdin Use stdin; like -P0" */
22//usage: "\n -m,--method=TYPE Encryption method TYPE"
23//usage: "\n -S,--salt=SALT"
24//usage: )
25//usage: IF_NOT_LONG_OPTS(
26//usage: "\n -P N Read password from fd N"
27/* //usage: "\n -s Use stdin; like -P0" */
28//usage: "\n -m TYPE Encryption method TYPE"
29//usage: "\n -S SALT"
30//usage: )
31
32/* mkpasswd is an alias to cryptpw */
33//usage:#define mkpasswd_trivial_usage
34//usage: "[OPTIONS] [PASSWORD] [SALT]"
35/* We do support -s, we just don't mention it */
36//usage:#define mkpasswd_full_usage "\n\n"
37//usage: "Crypt the PASSWORD using crypt(3)\n"
38//usage: "\nOptions:"
39//usage: IF_LONG_OPTS(
40//usage: "\n -P,--password-fd=N Read password from fd N"
41/* //usage: "\n -s,--stdin Use stdin; like -P0" */
42//usage: "\n -m,--method=TYPE Encryption method TYPE"
43//usage: "\n -S,--salt=SALT"
44//usage: )
45//usage: IF_NOT_LONG_OPTS(
46//usage: "\n -P N Read password from fd N"
47/* //usage: "\n -s Use stdin; like -P0" */
48//usage: "\n -m TYPE Encryption method TYPE"
49//usage: "\n -S SALT"
50//usage: )
51
13#include "libbb.h" 52#include "libbb.h"
14 53
15/* Debian has 'mkpasswd' utility, manpage says: 54/* Debian has 'mkpasswd' utility, manpage says:
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index 47a10fe14..e39ac5506 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -9,6 +9,18 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 * 10 *
11 */ 11 */
12
13//usage:#define deluser_trivial_usage
14//usage: "USER"
15//usage:#define deluser_full_usage "\n\n"
16//usage: "Delete USER from the system"
17
18//usage:#define delgroup_trivial_usage
19//usage: IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
20//usage:#define delgroup_full_usage "\n\n"
21//usage: "Delete group GROUP from the system"
22//usage: IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
23
12#include "libbb.h" 24#include "libbb.h"
13 25
14int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 26int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/loginutils/login.c b/loginutils/login.c
index ce0d1741f..f2563dc09 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -2,6 +2,16 @@
2/* 2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5
6//usage:#define login_trivial_usage
7//usage: "[-p] [-h HOST] [[-f] USER]"
8//usage:#define login_full_usage "\n\n"
9//usage: "Begin a new session on the system\n"
10//usage: "\nOptions:"
11//usage: "\n -f Don't authenticate (user already authenticated)"
12//usage: "\n -h Name of the remote host"
13//usage: "\n -p Preserve environment"
14
5#include "libbb.h" 15#include "libbb.h"
6#include <syslog.h> 16#include <syslog.h>
7#include <sys/resource.h> 17#include <sys/resource.h>
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index f3928cecc..8b6a63eec 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -2,6 +2,18 @@
2/* 2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5
6//usage:#define passwd_trivial_usage
7//usage: "[OPTIONS] [USER]"
8//usage:#define passwd_full_usage "\n\n"
9//usage: "Change USER's password. If no USER is specified,\n"
10//usage: "changes the password for the current user.\n"
11//usage: "\nOptions:"
12//usage: "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */
13//usage: "\n -d Delete password for the account"
14//usage: "\n -l Lock (disable) account"
15//usage: "\n -u Unlock (re-enable) account"
16
5#include "libbb.h" 17#include "libbb.h"
6#include <syslog.h> 18#include <syslog.h>
7 19
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 0e5b59433..28edf067c 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -5,6 +5,13 @@
5 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 5 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
6 */ 6 */
7 7
8//usage:#define sulogin_trivial_usage
9//usage: "[-t N] [TTY]"
10//usage:#define sulogin_full_usage "\n\n"
11//usage: "Single user login\n"
12//usage: "\nOptions:"
13//usage: "\n -t N Timeout"
14
8#include "libbb.h" 15#include "libbb.h"
9#include <syslog.h> 16#include <syslog.h>
10 17
diff --git a/loginutils/vlock.c b/loginutils/vlock.c
index 3299afa50..efad63ff3 100644
--- a/loginutils/vlock.c
+++ b/loginutils/vlock.c
@@ -15,6 +15,13 @@
15/* Fixed by Erik Andersen to do passwords the tinylogin way... 15/* Fixed by Erik Andersen to do passwords the tinylogin way...
16 * It now works with md5, sha1, etc passwords. */ 16 * It now works with md5, sha1, etc passwords. */
17 17
18//usage:#define vlock_trivial_usage
19//usage: "[-a]"
20//usage:#define vlock_full_usage "\n\n"
21//usage: "Lock a virtual terminal. A password is required to unlock.\n"
22//usage: "\nOptions:"
23//usage: "\n -a Lock all VTs"
24
18#include "libbb.h" 25#include "libbb.h"
19 26
20#ifdef __linux__ 27#ifdef __linux__