2013-02-15 16:50:47 +00:00
|
|
|
diff -urNp coreutils-8.21-orig/man/chcon.x coreutils-8.21/man/chcon.x
|
|
|
|
--- coreutils-8.21-orig/man/chcon.x 2011-08-23 15:44:01.000000000 +0200
|
|
|
|
+++ coreutils-8.21/man/chcon.x 2013-02-15 14:31:58.937482694 +0100
|
2008-10-22 11:07:44 +00:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
[NAME]
|
2008-01-25 17:48:11 +00:00
|
|
|
-chcon \- change file security context
|
|
|
|
+chcon \- change file SELinux security context
|
2008-10-22 11:07:44 +00:00
|
|
|
[DESCRIPTION]
|
2008-01-25 17:48:11 +00:00
|
|
|
.\" Add any additional description here
|
2013-02-15 16:50:47 +00:00
|
|
|
diff -urNp coreutils-8.21-orig/man/runcon.x coreutils-8.21/man/runcon.x
|
|
|
|
--- coreutils-8.21-orig/man/runcon.x 2011-08-23 15:44:01.000000000 +0200
|
|
|
|
+++ coreutils-8.21/man/runcon.x 2013-02-15 14:31:58.938486496 +0100
|
2008-10-22 11:07:44 +00:00
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
[NAME]
|
|
|
|
-runcon \- run command with specified security context
|
|
|
|
+runcon \- run command with specified SELinux security context
|
|
|
|
[DESCRIPTION]
|
|
|
|
Run COMMAND with completely-specified CONTEXT, or with current or
|
|
|
|
transitioned security context modified by one or more of LEVEL,
|
2013-02-15 16:50:47 +00:00
|
|
|
diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c
|
|
|
|
--- coreutils-8.21-orig/src/cp.c 2013-02-07 10:37:05.000000000 +0100
|
|
|
|
+++ coreutils-8.21/src/cp.c 2013-02-15 14:31:58.945468929 +0100
|
|
|
|
@@ -201,6 +202,9 @@ Copy SOURCE to DEST, or multiple SOURCE(
|
2009-11-18 14:48:00 +00:00
|
|
|
all\n\
|
|
|
|
"), stdout);
|
|
|
|
fputs (_("\
|
2014-01-02 10:39:46 +00:00
|
|
|
+ -c deprecated, same as --preserve=context\n\
|
2009-11-18 14:48:00 +00:00
|
|
|
+"), stdout);
|
|
|
|
+ fputs (_("\
|
|
|
|
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
|
|
|
|
--parents use full source file name under DIRECTORY\n\
|
|
|
|
"), stdout);
|
2011-01-04 16:59:58 +00:00
|
|
|
@@ -933,7 +939,7 @@ main (int argc, char **argv)
|
2009-11-18 14:48:00 +00:00
|
|
|
we'll actually use backup_suffix_string. */
|
|
|
|
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
|
|
|
|
2013-12-14 17:41:07 +00:00
|
|
|
- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
|
|
|
|
+ while ((c = getopt_long (argc, argv, "abcdfHilLnprst:uvxPRS:TZ",
|
2009-11-18 14:48:00 +00:00
|
|
|
long_opts, NULL))
|
|
|
|
!= -1)
|
|
|
|
{
|
2013-12-16 08:42:12 +00:00
|
|
|
@@ -981,6 +987,17 @@ main (int argc, char **argv)
|
2009-11-18 14:48:00 +00:00
|
|
|
copy_contents = true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
+ case 'c':
|
2013-12-18 16:13:25 +00:00
|
|
|
+ fprintf (stderr, "%s: warning: option '-c' is deprecated, please use '--preserve=context' instead\n", argv[0]);
|
2009-11-18 14:48:00 +00:00
|
|
|
+ if ( x.set_security_context ) {
|
|
|
|
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
|
|
|
+ exit( 1 );
|
|
|
|
+ }
|
|
|
|
+ else if (selinux_enabled) {
|
|
|
|
+ x.preserve_security_context = true;
|
|
|
|
+ x.require_preserve_context = true;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
case 'd':
|
|
|
|
x.preserve_links = true;
|
|
|
|
x.dereference = DEREF_NEVER;
|
2013-02-15 16:50:47 +00:00
|
|
|
diff -urNp coreutils-8.21-orig/src/id.c coreutils-8.21/src/id.c
|
|
|
|
--- coreutils-8.21-orig/src/id.c 2013-01-31 01:46:24.000000000 +0100
|
|
|
|
+++ coreutils-8.21/src/id.c 2013-02-15 14:31:58.946469154 +0100
|
|
|
|
@@ -106,7 +106,7 @@ int
|
2009-11-18 14:48:00 +00:00
|
|
|
main (int argc, char **argv)
|
2008-01-25 17:48:11 +00:00
|
|
|
{
|
2009-11-18 14:48:00 +00:00
|
|
|
int optc;
|
|
|
|
- int selinux_enabled = (is_selinux_enabled () > 0);
|
|
|
|
+ bool selinux_enabled = (is_selinux_enabled () > 0);
|
2013-12-14 17:41:07 +00:00
|
|
|
bool smack_enabled = is_smack_enabled ();
|
|
|
|
bool opt_zero = false;
|
|
|
|
char *pw_name = NULL;
|
2013-02-15 16:50:47 +00:00
|
|
|
diff -urNp coreutils-8.21-orig/src/install.c coreutils-8.21/src/install.c
|
|
|
|
--- coreutils-8.21-orig/src/install.c 2013-02-07 10:37:05.000000000 +0100
|
|
|
|
+++ coreutils-8.21/src/install.c 2013-02-15 14:31:58.948469440 +0100
|
|
|
|
@@ -639,7 +640,7 @@ In the 4th form, create all components o
|
2011-04-14 10:30:24 +00:00
|
|
|
-v, --verbose print the name of each directory as it is created\n\
|
|
|
|
"), stdout);
|
|
|
|
fputs (_("\
|
|
|
|
- --preserve-context preserve SELinux security context\n\
|
2014-01-02 10:39:46 +00:00
|
|
|
+ -P, --preserve-context preserve SELinux security context (-P deprecated)\n\
|
2014-07-22 12:01:39 +00:00
|
|
|
-Z set SELinux security context of destination\n\
|
|
|
|
file to default type\n\
|
|
|
|
--context[=CTX] like -Z, or if CTX is specified then set the\n\
|
2013-02-15 16:50:47 +00:00
|
|
|
@@ -782,7 +783,7 @@ main (int argc, char **argv)
|
2009-11-18 14:48:00 +00:00
|
|
|
we'll actually use backup_suffix_string. */
|
|
|
|
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
|
|
|
|
2013-12-14 17:41:07 +00:00
|
|
|
- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
|
|
|
|
+ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z", long_options,
|
2009-11-18 14:48:00 +00:00
|
|
|
NULL)) != -1)
|
|
|
|
{
|
|
|
|
switch (optc)
|
2013-12-16 08:42:12 +00:00
|
|
|
@@ -853,6 +854,8 @@ main (int argc, char **argv)
|
2011-04-14 10:30:24 +00:00
|
|
|
no_target_directory = true;
|
|
|
|
break;
|
|
|
|
|
2009-11-18 14:48:00 +00:00
|
|
|
+ case 'P':
|
2013-12-18 16:13:25 +00:00
|
|
|
+ fprintf (stderr, "%s: warning: option '-P' is deprecated, please use '--preserve-context' instead\n", argv[0]);
|
2009-11-18 14:48:00 +00:00
|
|
|
case PRESERVE_CONTEXT_OPTION:
|
2013-12-14 17:41:07 +00:00
|
|
|
if (! selinux_enabled)
|
2009-11-18 14:48:00 +00:00
|
|
|
{
|
2013-02-15 16:50:47 +00:00
|
|
|
@@ -860,6 +862,10 @@ main (int argc, char **argv)
|
2009-11-18 14:48:00 +00:00
|
|
|
"this kernel is not SELinux-enabled"));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
+ if ( x.set_security_context ) {
|
|
|
|
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
|
|
|
+ exit( 1 );
|
|
|
|
+ }
|
|
|
|
x.preserve_security_context = true;
|
|
|
|
use_default_selinux_context = false;
|
|
|
|
break;
|