Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/selinux/runcon.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/runcon.c
r1765 r2725 26 26 * Port to busybox: KaiGai Kohei <kaigai@kaigai.gr.jp> 27 27 * - based on coreutils-5.97 (in Fedora Core 6) 28 * 29 * Licensed under GPLv2, see file LICENSE in this source tree. 28 30 */ 29 31 #include <getopt.h> … … 40 42 41 43 if (getcon(&cur_context)) 42 bb_error_msg_and_die("can not get current context");44 bb_error_msg_and_die("can't get current context"); 43 45 44 46 if (compute_trans) { … … 46 48 47 49 if (getfilecon(command, &file_context) < 0) 48 bb_error_msg_and_die("can not retrieve attributes of '%s'",50 bb_error_msg_and_die("can't retrieve attributes of '%s'", 49 51 command); 50 52 if (security_compute_create(cur_context, file_context, … … 58 60 bb_error_msg_and_die("'%s' is not a valid context", cur_context); 59 61 if (user && context_user_set(con, user)) 60 bb_error_msg_and_die(" failed toset new user '%s'", user);62 bb_error_msg_and_die("can't set new user '%s'", user); 61 63 if (type && context_type_set(con, type)) 62 bb_error_msg_and_die(" failed toset new type '%s'", type);64 bb_error_msg_and_die("can't set new type '%s'", type); 63 65 if (range && context_range_set(con, range)) 64 bb_error_msg_and_die(" failed toset new range '%s'", range);66 bb_error_msg_and_die("can't set new range '%s'", range); 65 67 if (role && context_role_set(con, role)) 66 bb_error_msg_and_die(" failed toset new role '%s'", role);68 bb_error_msg_and_die("can't set new role '%s'", role); 67 69 68 70 return con; … … 88 90 #define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE) 89 91 90 int runcon_main(int argc, char **argv) ;91 int runcon_main(int argc , char **argv)92 int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 93 int runcon_main(int argc UNUSED_PARAM, char **argv) 92 94 { 93 95 char *role = NULL; … … 128 130 129 131 if (setexeccon(context_str(con))) 130 bb_error_msg_and_die("can not set up security context '%s'",132 bb_error_msg_and_die("can't set up security context '%s'", 131 133 context_str(con)); 132 134 133 135 execvp(argv[0], argv); 134 135 bb_perror_msg_and_die("cannot execute '%s'", argv[0]); 136 bb_perror_msg_and_die("can't execute '%s'", argv[0]); 136 137 }
Note:
See TracChangeset
for help on using the changeset viewer.