|
Ondřej Vašík |
4c4be9 |
diff -urNp coreutils-8.21-orig/man/chcon.x coreutils-8.21/man/chcon.x
|
|
Ondřej Vašík |
4c4be9 |
--- coreutils-8.21-orig/man/chcon.x 2011-08-23 15:44:01.000000000 +0200
|
|
Ondřej Vašík |
4c4be9 |
+++ coreutils-8.21/man/chcon.x 2013-02-15 14:31:58.937482694 +0100
|
|
Ondrej Vasik |
893c38 |
@@ -1,4 +1,4 @@
|
|
Ondrej Vasik |
893c38 |
[NAME]
|
|
Ondrej Vasik |
0363d6 |
-chcon \- change file security context
|
|
Ondrej Vasik |
0363d6 |
+chcon \- change file SELinux security context
|
|
Ondrej Vasik |
893c38 |
[DESCRIPTION]
|
|
Ondrej Vasik |
0363d6 |
.\" Add any additional description here
|
|
Ondřej Vašík |
4c4be9 |
diff -urNp coreutils-8.21-orig/man/runcon.x coreutils-8.21/man/runcon.x
|
|
Ondřej Vašík |
4c4be9 |
--- coreutils-8.21-orig/man/runcon.x 2011-08-23 15:44:01.000000000 +0200
|
|
Ondřej Vašík |
4c4be9 |
+++ coreutils-8.21/man/runcon.x 2013-02-15 14:31:58.938486496 +0100
|
|
Ondrej Vasik |
893c38 |
@@ -1,5 +1,5 @@
|
|
Ondrej Vasik |
893c38 |
[NAME]
|
|
Ondrej Vasik |
893c38 |
-runcon \- run command with specified security context
|
|
Ondrej Vasik |
893c38 |
+runcon \- run command with specified SELinux security context
|
|
Ondrej Vasik |
893c38 |
[DESCRIPTION]
|
|
Ondrej Vasik |
893c38 |
Run COMMAND with completely-specified CONTEXT, or with current or
|
|
Ondrej Vasik |
893c38 |
transitioned security context modified by one or more of LEVEL,
|
|
Ondřej Vašík |
4c4be9 |
diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c
|
|
Ondřej Vašík |
4c4be9 |
--- coreutils-8.21-orig/src/cp.c 2013-02-07 10:37:05.000000000 +0100
|
|
Ondřej Vašík |
4c4be9 |
+++ coreutils-8.21/src/cp.c 2013-02-15 14:31:58.945468929 +0100
|
|
Kamil Dudka |
d3849c |
@@ -202,6 +202,9 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
|
Ondrej Vasik |
66a4fe |
all\n\
|
|
Ondrej Vasik |
66a4fe |
"), stdout);
|
|
Ondrej Vasik |
66a4fe |
fputs (_("\
|
|
Ondřej Vašík |
83c139 |
+ -c deprecated, same as --preserve=context\n\
|
|
Ondrej Vasik |
66a4fe |
+"), stdout);
|
|
Ondrej Vasik |
66a4fe |
+ fputs (_("\
|
|
Ondrej Vasik |
66a4fe |
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
|
|
Ondrej Vasik |
66a4fe |
--parents use full source file name under DIRECTORY\n\
|
|
Ondrej Vasik |
66a4fe |
"), stdout);
|
|
Kamil Dudka |
d3849c |
@@ -943,7 +946,7 @@ main (int argc, char **argv)
|
|
Ondrej Vasik |
66a4fe |
we'll actually use backup_suffix_string. */
|
|
Ondrej Vasik |
66a4fe |
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
|
Ondrej Vasik |
66a4fe |
|
|
Ondřej Vašík |
bb33bc |
- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
|
|
Ondřej Vašík |
bb33bc |
+ while ((c = getopt_long (argc, argv, "abcdfHilLnprst:uvxPRS:TZ",
|
|
Ondrej Vasik |
66a4fe |
long_opts, NULL))
|
|
Ondrej Vasik |
66a4fe |
!= -1)
|
|
Ondrej Vasik |
66a4fe |
{
|
|
Kamil Dudka |
d3849c |
@@ -991,6 +994,17 @@ main (int argc, char **argv)
|
|
Ondrej Vasik |
66a4fe |
copy_contents = true;
|
|
Ondrej Vasik |
66a4fe |
break;
|
|
Ondrej Vasik |
66a4fe |
|
|
Ondrej Vasik |
66a4fe |
+ case 'c':
|
|
Ondřej Vašík |
bbc813 |
+ fprintf (stderr, "%s: warning: option '-c' is deprecated, please use '--preserve=context' instead\n", argv[0]);
|
|
Ondrej Vasik |
66a4fe |
+ if ( x.set_security_context ) {
|
|
Ondrej Vasik |
66a4fe |
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
|
Ondrej Vasik |
66a4fe |
+ exit( 1 );
|
|
Ondrej Vasik |
66a4fe |
+ }
|
|
Ondrej Vasik |
66a4fe |
+ else if (selinux_enabled) {
|
|
Ondrej Vasik |
66a4fe |
+ x.preserve_security_context = true;
|
|
Ondrej Vasik |
66a4fe |
+ x.require_preserve_context = true;
|
|
Ondrej Vasik |
66a4fe |
+ }
|
|
Ondrej Vasik |
66a4fe |
+ break;
|
|
Ondrej Vasik |
66a4fe |
case 'd':
|
|
Ondrej Vasik |
66a4fe |
x.preserve_links = true;
|
|
Ondrej Vasik |
66a4fe |
x.dereference = DEREF_NEVER;
|
|
Ondřej Vašík |
4c4be9 |
diff -urNp coreutils-8.21-orig/src/id.c coreutils-8.21/src/id.c
|
|
Ondřej Vašík |
4c4be9 |
--- coreutils-8.21-orig/src/id.c 2013-01-31 01:46:24.000000000 +0100
|
|
Ondřej Vašík |
4c4be9 |
+++ coreutils-8.21/src/id.c 2013-02-15 14:31:58.946469154 +0100
|
|
Kamil Dudka |
d3849c |
@@ -113,7 +113,7 @@ int
|
|
Ondrej Vasik |
66a4fe |
main (int argc, char **argv)
|
|
Ondrej Vasik |
0363d6 |
{
|
|
Ondrej Vasik |
66a4fe |
int optc;
|
|
Ondrej Vasik |
66a4fe |
- int selinux_enabled = (is_selinux_enabled () > 0);
|
|
Ondrej Vasik |
66a4fe |
+ bool selinux_enabled = (is_selinux_enabled () > 0);
|
|
Ondřej Vašík |
bb33bc |
bool smack_enabled = is_smack_enabled ();
|
|
Ondřej Vašík |
bb33bc |
bool opt_zero = false;
|
|
Ondřej Vašík |
bb33bc |
char *pw_name = NULL;
|
|
Ondřej Vašík |
4c4be9 |
diff -urNp coreutils-8.21-orig/src/install.c coreutils-8.21/src/install.c
|
|
Ondřej Vašík |
4c4be9 |
--- coreutils-8.21-orig/src/install.c 2013-02-07 10:37:05.000000000 +0100
|
|
Ondřej Vašík |
4c4be9 |
+++ coreutils-8.21/src/install.c 2013-02-15 14:31:58.948469440 +0100
|
|
Kamil Dudka |
d3849c |
@@ -649,7 +649,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\
|
|
Ondřej Vašík |
50a3ba |
-v, --verbose print the name of each directory as it is created\n\
|
|
Ondřej Vašík |
50a3ba |
"), stdout);
|
|
Ondřej Vašík |
50a3ba |
fputs (_("\
|
|
Ondřej Vašík |
50a3ba |
- --preserve-context preserve SELinux security context\n\
|
|
Ondřej Vašík |
83c139 |
+ -P, --preserve-context preserve SELinux security context (-P deprecated)\n\
|
|
Ondřej Vašík |
9c33d8 |
-Z set SELinux security context of destination\n\
|
|
Ondřej Vašík |
9c33d8 |
file to default type\n\
|
|
Ondřej Vašík |
9c33d8 |
--context[=CTX] like -Z, or if CTX is specified then set the\n\
|
|
Kamil Dudka |
d3849c |
@@ -817,7 +817,7 @@ main (int argc, char **argv)
|
|
Ondrej Vasik |
66a4fe |
we'll actually use backup_suffix_string. */
|
|
Ondrej Vasik |
66a4fe |
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
|
Ondrej Vasik |
66a4fe |
|
|
Ondřej Vašík |
bb33bc |
- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
|
|
Ondřej Vašík |
bb33bc |
+ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z", long_options,
|
|
Ondrej Vasik |
66a4fe |
NULL)) != -1)
|
|
Ondrej Vasik |
66a4fe |
{
|
|
Ondrej Vasik |
66a4fe |
switch (optc)
|
|
Kamil Dudka |
d3849c |
@@ -878,6 +878,8 @@ main (int argc, char **argv)
|
|
Ondřej Vašík |
50a3ba |
no_target_directory = true;
|
|
Ondřej Vašík |
50a3ba |
break;
|
|
Ondřej Vašík |
50a3ba |
|
|
Ondrej Vasik |
66a4fe |
+ case 'P':
|
|
Ondřej Vašík |
bbc813 |
+ fprintf (stderr, "%s: warning: option '-P' is deprecated, please use '--preserve-context' instead\n", argv[0]);
|
|
Ondrej Vasik |
66a4fe |
case PRESERVE_CONTEXT_OPTION:
|
|
Ondřej Vašík |
bb33bc |
if (! selinux_enabled)
|
|
Ondrej Vasik |
66a4fe |
{
|
|
Kamil Dudka |
d3849c |
@@ -885,6 +887,10 @@ main (int argc, char **argv)
|
|
Ondrej Vasik |
66a4fe |
"this kernel is not SELinux-enabled"));
|
|
Ondrej Vasik |
66a4fe |
break;
|
|
Ondrej Vasik |
66a4fe |
}
|
|
Ondrej Vasik |
66a4fe |
+ if ( x.set_security_context ) {
|
|
Ondrej Vasik |
66a4fe |
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
|
Ondrej Vasik |
66a4fe |
+ exit( 1 );
|
|
Ondrej Vasik |
66a4fe |
+ }
|
|
Ondrej Vasik |
66a4fe |
x.preserve_security_context = true;
|
|
Ondrej Vasik |
66a4fe |
use_default_selinux_context = false;
|
|
Ondrej Vasik |
66a4fe |
break;
|