Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/selinux/chcon.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/selinux/chcon.c
r1765 r2725 5 5 * 6 6 * Copyright (C) 2006 - 2007 KaiGai Kohei <kaigai@kaigai.gr.jp> 7 * 8 * Licensed under GPLv2, see file LICENSE in this source tree. 7 9 */ 8 10 #include <getopt.h> … … 29 31 static char *specified_context = NULL; 30 32 31 static int change_filedir_context(const char *fname, struct stat *stbuf, void *userData, int depth) 33 static int FAST_FUNC change_filedir_context( 34 const char *fname, 35 struct stat *stbuf UNUSED_PARAM, 36 void *userData UNUSED_PARAM, 37 int depth UNUSED_PARAM) 32 38 { 33 39 context_t context = NULL; … … 44 50 if (status < 0 && errno != ENODATA) { 45 51 if ((option_mask32 & OPT_QUIET) == 0) 46 bb_error_msg("can not obtain security context: %s", fname);52 bb_error_msg("can't obtain security context: %s", fname); 47 53 goto skip; 48 54 } 49 55 50 56 if (file_context == NULL && specified_context == NULL) { 51 bb_error_msg("can not apply partial context to unlabeled file %s", fname);57 bb_error_msg("can't apply partial context to unlabeled file %s", fname); 52 58 goto skip; 53 59 } … … 57 63 user, role, type, range); 58 64 if (!context) { 59 bb_error_msg("can not compute security context from %s", file_context);65 bb_error_msg("can't compute security context from %s", file_context); 60 66 goto skip; 61 67 } … … 70 76 context_string = context_str(context); 71 77 if (!context_string) { 72 bb_error_msg("can not obtain security context in text expression");78 bb_error_msg("can't obtain security context in text expression"); 73 79 goto skip; 74 80 } … … 85 91 printf(!fail 86 92 ? "context of %s changed to %s\n" 87 : " failed tochange context of %s to %s\n",93 : "can't change context of %s to %s\n", 88 94 fname, context_string); 89 95 } … … 91 97 rc = TRUE; 92 98 } else if ((option_mask32 & OPT_QUIET) == 0) { 93 bb_error_msg(" failed tochange context of %s to %s",99 bb_error_msg("can't change context of %s to %s", 94 100 fname, context_string); 95 101 } … … 121 127 #endif 122 128 123 int chcon_main(int argc, char **argv) ;124 int chcon_main(int argc , char **argv)129 int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 130 int chcon_main(int argc UNUSED_PARAM, char **argv) 125 131 { 126 132 char *reference_file;
Note:
See TracChangeset
for help on using the changeset viewer.