summaryrefslogtreecommitdiff
path: root/selinux/setfiles.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-07-24 06:17:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-07-24 06:17:43 +0000
commit1da77728d75884b7dd1a02ca3ab89d5313d8e9fd (patch)
tree0dd83def87b5957733860a831b29fdbb4a4dcc0f /selinux/setfiles.c
parent3e64e98570b2748973a66876a8b010c5d63e23be (diff)
downloadbusybox-w32-1da77728d75884b7dd1a02ca3ab89d5313d8e9fd.tar.gz
busybox-w32-1da77728d75884b7dd1a02ca3ab89d5313d8e9fd.tar.bz2
busybox-w32-1da77728d75884b7dd1a02ca3ab89d5313d8e9fd.zip
setfiles: small tweaks to usage text and code
Diffstat (limited to '')
-rw-r--r--selinux/setfiles.c12
1 files changed, 6 insertions, 6 deletions
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
131static int add_exclude(const char *directory) 131static 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
164static int exclude(const char *file) 164static 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. */
271static int only_changed_user(const char *a, const char *b) 271static 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",