diff options
author | Pere Orga <gotrunks@gmail.com> | 2011-04-11 03:29:49 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-11 03:29:49 +0200 |
commit | 5bc8c005a8e15c43285bc595a8d404de67a482ac (patch) | |
tree | 98f2d35d1db26f4d8cba5f095ff63bf8e2e8d980 /selinux | |
parent | 73ef15cf3894716c1393ed21dee6e6bb2cdbc90f (diff) | |
download | busybox-w32-5bc8c005a8e15c43285bc595a8d404de67a482ac.tar.gz busybox-w32-5bc8c005a8e15c43285bc595a8d404de67a482ac.tar.bz2 busybox-w32-5bc8c005a8e15c43285bc595a8d404de67a482ac.zip |
move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'selinux')
-rw-r--r-- | selinux/chcon.c | 33 | ||||
-rw-r--r-- | selinux/getenforce.c | 3 | ||||
-rw-r--r-- | selinux/getsebool.c | 5 | ||||
-rw-r--r-- | selinux/load_policy.c | 4 | ||||
-rw-r--r-- | selinux/matchpathcon.c | 10 | ||||
-rw-r--r-- | selinux/runcon.c | 22 | ||||
-rw-r--r-- | selinux/selinuxenabled.c | 4 | ||||
-rw-r--r-- | selinux/sestatus.c | 6 | ||||
-rw-r--r-- | selinux/setenforce.c | 4 | ||||
-rw-r--r-- | selinux/setfiles.c | 40 | ||||
-rw-r--r-- | selinux/setsebool.c | 5 |
11 files changed, 136 insertions, 0 deletions
diff --git a/selinux/chcon.c b/selinux/chcon.c index e00cdda1b..8644502b5 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c | |||
@@ -7,6 +7,39 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | |||
11 | //usage:#define chcon_trivial_usage | ||
12 | //usage: "[OPTIONS] CONTEXT FILE..." | ||
13 | //usage: "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." | ||
14 | //usage: IF_FEATURE_CHCON_LONG_OPTIONS( | ||
15 | //usage: "\n chcon [OPTIONS] --reference=RFILE FILE..." | ||
16 | //usage: ) | ||
17 | //usage:#define chcon_full_usage "\n\n" | ||
18 | //usage: "Change the security context of each FILE to CONTEXT\n" | ||
19 | //usage: IF_FEATURE_CHCON_LONG_OPTIONS( | ||
20 | //usage: "\n -v,--verbose Verbose" | ||
21 | //usage: "\n -c,--changes Report changes made" | ||
22 | //usage: "\n -h,--no-dereference Affect symlinks instead of their targets" | ||
23 | //usage: "\n -f,--silent,--quiet Suppress most error messages" | ||
24 | //usage: "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" | ||
25 | //usage: "\n -u,--user=USER Set user/role/type/range in the target" | ||
26 | //usage: "\n -r,--role=ROLE security context" | ||
27 | //usage: "\n -t,--type=TYPE" | ||
28 | //usage: "\n -l,--range=RANGE" | ||
29 | //usage: "\n -R,--recursive Recurse" | ||
30 | //usage: ) | ||
31 | //usage: IF_NOT_FEATURE_CHCON_LONG_OPTIONS( | ||
32 | //usage: "\n -v Verbose" | ||
33 | //usage: "\n -c Report changes made" | ||
34 | //usage: "\n -h Affect symlinks instead of their targets" | ||
35 | //usage: "\n -f Suppress most error messages" | ||
36 | //usage: "\n -u USER Set user/role/type/range in the target security context" | ||
37 | //usage: "\n -r ROLE" | ||
38 | //usage: "\n -t TYPE" | ||
39 | //usage: "\n -l RNG" | ||
40 | //usage: "\n -R Recurse" | ||
41 | //usage: ) | ||
42 | |||
10 | #include <getopt.h> | 43 | #include <getopt.h> |
11 | #include <selinux/context.h> | 44 | #include <selinux/context.h> |
12 | 45 | ||
diff --git a/selinux/getenforce.c b/selinux/getenforce.c index d9d9d0f65..56611d693 100644 --- a/selinux/getenforce.c +++ b/selinux/getenforce.c | |||
@@ -7,6 +7,9 @@ | |||
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define getenforce_trivial_usage NOUSAGE_STR | ||
11 | //usage:#define getenforce_full_usage "" | ||
12 | |||
10 | #include "libbb.h" | 13 | #include "libbb.h" |
11 | 14 | ||
12 | int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
diff --git a/selinux/getsebool.c b/selinux/getsebool.c index 924356cae..e8f0fefb0 100644 --- a/selinux/getsebool.c +++ b/selinux/getsebool.c | |||
@@ -7,6 +7,11 @@ | |||
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define getsebool_trivial_usage | ||
11 | //usage: "-a or getsebool boolean..." | ||
12 | //usage:#define getsebool_full_usage "\n\n" | ||
13 | //usage: " -a Show all selinux booleans" | ||
14 | |||
10 | #include "libbb.h" | 15 | #include "libbb.h" |
11 | 16 | ||
12 | int getsebool_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int getsebool_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
diff --git a/selinux/load_policy.c b/selinux/load_policy.c index 8fc92dbf3..ce139dbf2 100644 --- a/selinux/load_policy.c +++ b/selinux/load_policy.c | |||
@@ -4,6 +4,10 @@ | |||
4 | * | 4 | * |
5 | * Licensed under GPLv2, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2, see file LICENSE in this source tree. |
6 | */ | 6 | */ |
7 | |||
8 | //usage:#define load_policy_trivial_usage NOUSAGE_STR | ||
9 | //usage:#define load_policy_full_usage "" | ||
10 | |||
7 | #include "libbb.h" | 11 | #include "libbb.h" |
8 | 12 | ||
9 | int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 13 | int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
diff --git a/selinux/matchpathcon.c b/selinux/matchpathcon.c index ec49077c8..9e5728eb3 100644 --- a/selinux/matchpathcon.c +++ b/selinux/matchpathcon.c | |||
@@ -5,6 +5,16 @@ | |||
5 | * | 5 | * |
6 | * Licensed under GPLv2, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2, see file LICENSE in this source tree. |
7 | */ | 7 | */ |
8 | |||
9 | //usage:#define matchpathcon_trivial_usage | ||
10 | //usage: "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]" | ||
11 | //usage:#define matchpathcon_full_usage "\n\n" | ||
12 | //usage: " -n Don't display path" | ||
13 | //usage: "\n -N Don't use translations" | ||
14 | //usage: "\n -f Use alternate file_context file" | ||
15 | //usage: "\n -p Use prefix to speed translations" | ||
16 | //usage: "\n -V Verify file context on disk matches defaults" | ||
17 | |||
8 | #include "libbb.h" | 18 | #include "libbb.h" |
9 | 19 | ||
10 | static int print_matchpathcon(char *path, int noprint) | 20 | static int print_matchpathcon(char *path, int noprint) |
diff --git a/selinux/runcon.c b/selinux/runcon.c index 54349b25c..f0b21269f 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c | |||
@@ -28,6 +28,28 @@ | |||
28 | * | 28 | * |
29 | * Licensed under GPLv2, see file LICENSE in this source tree. | 29 | * Licensed under GPLv2, see file LICENSE in this source tree. |
30 | */ | 30 | */ |
31 | |||
32 | //usage:#define runcon_trivial_usage | ||
33 | //usage: "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG ARGS\n" | ||
34 | //usage: "runcon CONTEXT PROG ARGS" | ||
35 | //usage:#define runcon_full_usage "\n\n" | ||
36 | //usage: "Run PROG in a different security context\n" | ||
37 | //usage: "\n CONTEXT Complete security context\n" | ||
38 | //usage: IF_FEATURE_RUNCON_LONG_OPTIONS( | ||
39 | //usage: "\n -c,--compute Compute process transition context before modifying" | ||
40 | //usage: "\n -t,--type=TYPE Type (for same role as parent)" | ||
41 | //usage: "\n -u,--user=USER User identity" | ||
42 | //usage: "\n -r,--role=ROLE Role" | ||
43 | //usage: "\n -l,--range=RNG Levelrange" | ||
44 | //usage: ) | ||
45 | //usage: IF_NOT_FEATURE_RUNCON_LONG_OPTIONS( | ||
46 | //usage: "\n -c Compute process transition context before modifying" | ||
47 | //usage: "\n -t TYPE Type (for same role as parent)" | ||
48 | //usage: "\n -u USER User identity" | ||
49 | //usage: "\n -r ROLE Role" | ||
50 | //usage: "\n -l RNG Levelrange" | ||
51 | //usage: ) | ||
52 | |||
31 | #include <getopt.h> | 53 | #include <getopt.h> |
32 | #include <selinux/context.h> | 54 | #include <selinux/context.h> |
33 | #include <selinux/flask.h> | 55 | #include <selinux/flask.h> |
diff --git a/selinux/selinuxenabled.c b/selinux/selinuxenabled.c index aa4e63f74..ce830dc22 100644 --- a/selinux/selinuxenabled.c +++ b/selinux/selinuxenabled.c | |||
@@ -6,6 +6,10 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define selinuxenabled_trivial_usage NOUSAGE_STR | ||
11 | //usage:#define selinuxenabled_full_usage "" | ||
12 | |||
9 | #include "libbb.h" | 13 | #include "libbb.h" |
10 | 14 | ||
11 | int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
diff --git a/selinux/sestatus.c b/selinux/sestatus.c index aa12e806c..0bd1a0dda 100644 --- a/selinux/sestatus.c +++ b/selinux/sestatus.c | |||
@@ -8,6 +8,12 @@ | |||
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | //usage:#define sestatus_trivial_usage | ||
12 | //usage: "[-vb]" | ||
13 | //usage:#define sestatus_full_usage "\n\n" | ||
14 | //usage: " -v Verbose" | ||
15 | //usage: "\n -b Display current state of booleans" | ||
16 | |||
11 | #include "libbb.h" | 17 | #include "libbb.h" |
12 | 18 | ||
13 | extern char *selinux_mnt; | 19 | extern char *selinux_mnt; |
diff --git a/selinux/setenforce.c b/selinux/setenforce.c index be5432147..c5bc0a5a6 100644 --- a/selinux/setenforce.c +++ b/selinux/setenforce.c | |||
@@ -7,6 +7,10 @@ | |||
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define setenforce_trivial_usage | ||
11 | //usage: "[Enforcing | Permissive | 1 | 0]" | ||
12 | //usage:#define setenforce_full_usage "" | ||
13 | |||
10 | #include "libbb.h" | 14 | #include "libbb.h" |
11 | 15 | ||
12 | /* These strings are arranged so that odd ones | 16 | /* These strings are arranged so that odd ones |
diff --git a/selinux/setfiles.c b/selinux/setfiles.c index 989510e3d..ca3fd9361 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c | |||
@@ -4,6 +4,46 @@ | |||
4 | Port to BusyBox (c) 2007 by Yuichi Nakamura <ynakam@hitachisoft.jp> | 4 | Port to BusyBox (c) 2007 by Yuichi Nakamura <ynakam@hitachisoft.jp> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | //usage:#define setfiles_trivial_usage | ||
8 | //usage: "[-dnpqsvW] [-e DIR]... [-o FILE] [-r alt_root_path]" | ||
9 | //usage: IF_FEATURE_SETFILES_CHECK_OPTION( | ||
10 | //usage: " [-c policyfile] spec_file" | ||
11 | //usage: ) | ||
12 | //usage: " pathname" | ||
13 | //usage:#define setfiles_full_usage "\n\n" | ||
14 | //usage: "Reset file contexts under pathname according to spec_file\n" | ||
15 | //usage: IF_FEATURE_SETFILES_CHECK_OPTION( | ||
16 | //usage: "\n -c FILE Check the validity of the contexts against the specified binary policy" | ||
17 | //usage: ) | ||
18 | //usage: "\n -d Show which specification matched each file" | ||
19 | //usage: "\n -l Log changes in file labels to syslog" | ||
20 | //usage: "\n -n Don't change any file labels" | ||
21 | //usage: "\n -q Suppress warnings" | ||
22 | //usage: "\n -r DIR Use an alternate root path" | ||
23 | //usage: "\n -e DIR Exclude DIR" | ||
24 | //usage: "\n -F Force reset of context to match file_context for customizable files" | ||
25 | //usage: "\n -o FILE Save list of files with incorrect context" | ||
26 | //usage: "\n -s Take a list of files from stdin (instead of command line)" | ||
27 | //usage: "\n -v Show changes in file labels, if type or role are changing" | ||
28 | //usage: "\n -vv Show changes in file labels, if type, role, or user are changing" | ||
29 | //usage: "\n -W Display warnings about entries that had no matching files" | ||
30 | //usage: | ||
31 | //usage:#define restorecon_trivial_usage | ||
32 | //usage: "[-iFnRv] [-e EXCLUDEDIR]... [-o FILE] [-f FILE]" | ||
33 | //usage:#define restorecon_full_usage "\n\n" | ||
34 | //usage: "Reset security contexts of files in pathname\n" | ||
35 | //usage: "\n -i Ignore files that don't exist" | ||
36 | //usage: "\n -f FILE File with list of files to process" | ||
37 | //usage: "\n -e DIR Directory to exclude" | ||
38 | //usage: "\n -R,-r Recurse" | ||
39 | //usage: "\n -n Don't change any file labels" | ||
40 | //usage: "\n -o FILE Save list of files with incorrect context" | ||
41 | //usage: "\n -v Verbose" | ||
42 | //usage: "\n -vv Show changed labels" | ||
43 | //usage: "\n -F Force reset of context to match file_context" | ||
44 | //usage: "\n for customizable files, or the user section," | ||
45 | //usage: "\n if it has changed" | ||
46 | |||
7 | #include "libbb.h" | 47 | #include "libbb.h" |
8 | #if ENABLE_FEATURE_SETFILES_CHECK_OPTION | 48 | #if ENABLE_FEATURE_SETFILES_CHECK_OPTION |
9 | #include <sepol/sepol.h> | 49 | #include <sepol/sepol.h> |
diff --git a/selinux/setsebool.c b/selinux/setsebool.c index a8cc00407..ec682e5c5 100644 --- a/selinux/setsebool.c +++ b/selinux/setsebool.c | |||
@@ -8,6 +8,11 @@ | |||
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | //usage:#define setsebool_trivial_usage | ||
12 | //usage: "boolean value" | ||
13 | //usage:#define setsebool_full_usage "\n\n" | ||
14 | //usage: "Change boolean setting" | ||
15 | |||
11 | #include "libbb.h" | 16 | #include "libbb.h" |
12 | 17 | ||
13 | int setsebool_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 18 | int setsebool_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |