summaryrefslogtreecommitdiff
path: root/src/runcon.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-09-30 18:22:48 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-09-30 18:22:48 +0400
commitc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (patch)
tree377f4d4e3f0a6471a5012126078fcd97f4c67242 /src/runcon.c
parent974ab3dd887985e3aa347f3c6521f819296396a0 (diff)
downloadcoreutils-c18578632fd3c9e513e613a86ba2b7c4ebee6c45.tar.gz
Imported Upstream version 8.23upstream/8.23
Diffstat (limited to 'src/runcon.c')
-rw-r--r--src/runcon.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/runcon.c b/src/runcon.c
index 8a0b34e9..14ccc3d5 100644
--- a/src/runcon.c
+++ b/src/runcon.c
@@ -1,5 +1,5 @@
/* runcon -- run command with specified security context
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -85,7 +85,7 @@ Usage: %s CONTEXT COMMAND [args]\n\
or: %s [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n\
"), program_name, program_name);
fputs (_("\
-Run a program in a different security context.\n\
+Run a program in a different SELinux security context.\n\
With neither CONTEXT nor COMMAND, print the current security context.\n\
"), stdout);
@@ -115,9 +115,9 @@ main (int argc, char **argv)
char *user = NULL;
char *type = NULL;
char *context = NULL;
- security_context_t cur_context = NULL;
- security_context_t file_context = NULL;
- security_context_t new_context = NULL;
+ char *cur_context = NULL;
+ char *file_context = NULL;
+ char *new_context = NULL;
bool compute_trans = false;
context_t con;
@@ -197,8 +197,8 @@ main (int argc, char **argv)
}
if (is_selinux_enabled () != 1)
- error (EXIT_FAILURE, 0,
- _("%s may be used only on a SELinux kernel"), program_name);
+ error (EXIT_FAILURE, 0, _("%s may be used only on a SELinux kernel"),
+ program_name);
if (context)
{
@@ -223,8 +223,7 @@ main (int argc, char **argv)
/* compute result of process transition */
if (security_compute_create (cur_context, file_context,
SECCLASS_PROCESS, &new_context) != 0)
- error (EXIT_FAILURE, errno,
- _("failed to compute a new context"));
+ error (EXIT_FAILURE, errno, _("failed to compute a new context"));
/* free contexts */
freecon (file_context);
freecon (cur_context);