diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-24 06:17:43 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-24 06:17:43 +0000 |
commit | 1da77728d75884b7dd1a02ca3ab89d5313d8e9fd (patch) | |
tree | 0dd83def87b5957733860a831b29fdbb4a4dcc0f | |
parent | 3e64e98570b2748973a66876a8b010c5d63e23be (diff) | |
download | busybox-w32-1da77728d75884b7dd1a02ca3ab89d5313d8e9fd.tar.gz busybox-w32-1da77728d75884b7dd1a02ca3ab89d5313d8e9fd.tar.bz2 busybox-w32-1da77728d75884b7dd1a02ca3ab89d5313d8e9fd.zip |
setfiles: small tweaks to usage text and code
-rw-r--r-- | include/usage.h | 2 | ||||
-rw-r--r-- | selinux/setfiles.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/usage.h b/include/usage.h index 6608938f6..a17f5b189 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -2978,7 +2978,7 @@ USE_FEATURE_RUN_PARTS_FANCY("\n -l Prints names of all matching files even when | |||
2978 | "\n -d Show which specification matched each file" \ | 2978 | "\n -d Show which specification matched each file" \ |
2979 | "\n -l Log changes in file labels to syslog" \ | 2979 | "\n -l Log changes in file labels to syslog" \ |
2980 | "\n -n Don't change any file labels" \ | 2980 | "\n -n Don't change any file labels" \ |
2981 | "\n -q Suppress no-error output" \ | 2981 | "\n -q Suppress warnings" \ |
2982 | "\n -r dir Use an altenate root path" \ | 2982 | "\n -r dir Use an altenate root path" \ |
2983 | "\n -e dir Exclude directory" \ | 2983 | "\n -e dir Exclude directory" \ |
2984 | "\n -F Force reset of context to match file_context for customizable files" \ | 2984 | "\n -F Force reset of context to match file_context for customizable files" \ |
diff --git a/selinux/setfiles.c b/selinux/setfiles.c index cadec8367..d9fb50725 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c | |||
@@ -128,10 +128,10 @@ static void inc_err(void) | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | 130 | ||
131 | static int add_exclude(const char *directory) | 131 | static bool add_exclude(const char *const directory) |
132 | { | 132 | { |
133 | struct stat sb; | 133 | struct stat sb; |
134 | size_t len = 0; | 134 | size_t len; |
135 | 135 | ||
136 | if (directory == NULL || directory[0] != '/') { | 136 | if (directory == NULL || directory[0] != '/') { |
137 | bb_error_msg("full path required for exclude: %s", directory); | 137 | bb_error_msg("full path required for exclude: %s", directory); |
@@ -161,7 +161,7 @@ static int add_exclude(const char *directory) | |||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | static int exclude(const char *file) | 164 | static bool exclude(const char *file) |
165 | { | 165 | { |
166 | int i = 0; | 166 | int i = 0; |
167 | for (i = 0; i < excludeCtr; i++) { | 167 | for (i = 0; i < excludeCtr; i++) { |
@@ -268,7 +268,7 @@ static int match(const char *name, struct stat *sb, char **con) | |||
268 | 268 | ||
269 | /* Compare two contexts to see if their differences are "significant", | 269 | /* Compare two contexts to see if their differences are "significant", |
270 | * or whether the only difference is in the user. */ | 270 | * or whether the only difference is in the user. */ |
271 | static int only_changed_user(const char *a, const char *b) | 271 | static bool only_changed_user(const char *a, const char *b) |
272 | { | 272 | { |
273 | if (FLAG_F_force) | 273 | if (FLAG_F_force) |
274 | return 0; | 274 | return 0; |
@@ -289,7 +289,7 @@ static int restore(const char *file) | |||
289 | int i, j, ret; | 289 | int i, j, ret; |
290 | char *context = NULL; | 290 | char *context = NULL; |
291 | char *newcon = NULL; | 291 | char *newcon = NULL; |
292 | int user_only_changed = 0; | 292 | bool user_only_changed = 0; |
293 | size_t len = strlen(my_file); | 293 | size_t len = strlen(my_file); |
294 | int retval = 0; | 294 | int retval = 0; |
295 | 295 | ||
@@ -561,7 +561,7 @@ int setfiles_main(int argc, char **argv) | |||
561 | 561 | ||
562 | set_matchpathcon_flags(matchpathcon_flags); | 562 | set_matchpathcon_flags(matchpathcon_flags); |
563 | 563 | ||
564 | opt_complementary = "e::vv:v--p:p--v"; | 564 | opt_complementary = "e::vv:v--p:p--v:v--q:q--v"; |
565 | /* Option order must match OPT_x definitions! */ | 565 | /* Option order must match OPT_x definitions! */ |
566 | if (applet_name[0] == 'r') { /* restorecon */ | 566 | if (applet_name[0] == 'r') { /* restorecon */ |
567 | flags = getopt32(argc, argv, "de:f:ilnpqrsvo:FWR", | 567 | flags = getopt32(argc, argv, "de:f:ilnpqrsvo:FWR", |