diff --git a/coreutils-selinux.patch b/coreutils-selinux.patch index 51cdd3b..889360a 100644 --- a/coreutils-selinux.patch +++ b/coreutils-selinux.patch @@ -1,5 +1,5 @@ ---- coreutils-6.7/tests/help-version.selinux 2007-01-09 18:24:56.000000000 +0000 -+++ coreutils-6.7/tests/help-version 2007-01-09 18:24:57.000000000 +0000 +--- coreutils-6.7/tests/help-version.selinux 2007-01-09 18:47:03.000000000 +0000 ++++ coreutils-6.7/tests/help-version 2007-01-09 18:47:04.000000000 +0000 @@ -72,6 +72,8 @@ # Skip `test'; it doesn't accept --help or --version. @@ -19,7 +19,7 @@ rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out echo > $tmp_in --- coreutils-6.7/src/ls.c.selinux 2006-11-27 10:25:51.000000000 +0000 -+++ coreutils-6.7/src/ls.c 2007-01-09 18:36:36.000000000 +0000 ++++ coreutils-6.7/src/ls.c 2007-01-10 14:01:08.000000000 +0000 @@ -110,6 +110,18 @@ #define AUTHORS "Richard Stallman", "David MacKenzie" @@ -253,7 +253,7 @@ if (dereference == DEREF_COMMAND_LINE_ARGUMENTS) break; -@@ -2600,29 +2692,39 @@ +@@ -2600,6 +2692,11 @@ default: /* DEREF_NEVER */ err = lstat (absolute_name, &f->stat); @@ -265,34 +265,9 @@ break; } -- if (err != 0) -+ f->stat_ok = (err == 0); -+ if (!f->stat_ok) - { - /* Failure to stat a command line argument leads to - an exit status of 2. For other files, stat failure - provokes an exit status of 1. */ -- file_failure (command_line_arg, -- _("cannot access %s"), absolute_name); -- if (command_line_arg) -- return 0; -+ if (type == command_line) -+ { -+ file_failure (2, _("cannot access %s"), absolute_name); -+ return 0; -+ } +@@ -2622,7 +2719,11 @@ + f->stat_ok = true; -- f->name = xstrdup (name); -+ f->filetype = type; -+ memset (&f->stat, '\0', sizeof (f->stat)); -+ f->name = xstrdup (name); - files_index++; -- - return 0; - } - -- f->stat_ok = true; -- #if USE_ACL - if (format == long_format) + if (format == long_format @@ -303,7 +278,7 @@ { int n = file_has_acl (absolute_name, &f->stat); f->have_acl = (0 < n); -@@ -3158,6 +3260,16 @@ +@@ -3158,6 +3259,16 @@ DIRED_PUTCHAR ('\n'); } break; @@ -320,7 +295,7 @@ } } -@@ -3412,6 +3524,15 @@ +@@ -3412,6 +3523,15 @@ The latter is wrong when nlink_width is zero. */ p += strlen (p); @@ -336,7 +311,7 @@ DIRED_INDENT (); if (print_owner | print_group | print_author) -@@ -4351,6 +4472,16 @@ +@@ -4351,6 +4471,16 @@ -X sort alphabetically by entry extension\n\ -1 list one file per line\n\ "), stdout); @@ -353,7 +328,7 @@ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\n\ -@@ -4374,3 +4505,70 @@ +@@ -4374,3 +4504,70 @@ } exit (status); } @@ -425,7 +400,7 @@ +} +#endif --- coreutils-6.7/src/cp.c.selinux 2006-12-06 11:04:22.000000000 +0000 -+++ coreutils-6.7/src/cp.c 2007-01-09 18:24:57.000000000 +0000 ++++ coreutils-6.7/src/cp.c 2007-01-09 18:47:04.000000000 +0000 @@ -51,6 +51,11 @@ #define AUTHORS "Torbjorn Granlund", "David MacKenzie", "Jim Meyering" @@ -591,8 +566,8 @@ case REPLY_OPTION: /* Deprecated */ x.interactive = XARGMATCH ("--reply", optarg, ---- coreutils-6.7/src/Makefile.am.selinux 2007-01-09 18:24:56.000000000 +0000 -+++ coreutils-6.7/src/Makefile.am 2007-01-09 18:24:57.000000000 +0000 +--- coreutils-6.7/src/Makefile.am.selinux 2007-01-09 18:47:04.000000000 +0000 ++++ coreutils-6.7/src/Makefile.am 2007-01-09 18:47:04.000000000 +0000 @@ -20,14 +20,14 @@ EXTRA_PROGRAMS = chroot df hostid nice pinky stty su runuser uname uptime users who @@ -647,7 +622,7 @@ ## If necessary, add -lm to resolve use of pow in lib/strtod.c. sort_LDADD = $(LDADD) $(POW_LIB) $(LIB_GETHRXTIME) --- coreutils-6.7/src/copy.h.selinux 2006-12-06 11:04:22.000000000 +0000 -+++ coreutils-6.7/src/copy.h 2007-01-09 18:24:57.000000000 +0000 ++++ coreutils-6.7/src/copy.h 2007-01-09 18:47:05.000000000 +0000 @@ -127,6 +127,10 @@ bool preserve_ownership; bool preserve_mode; @@ -659,8 +634,8 @@ /* Enabled for mv, and for cp by the --preserve=links option. If true, attempt to preserve in the destination files any ---- /dev/null 2007-01-09 12:27:07.480840763 +0000 -+++ coreutils-6.7/src/chcon.c 2007-01-09 18:24:57.000000000 +0000 +--- /dev/null 2007-01-10 09:33:30.042789464 +0000 ++++ coreutils-6.7/src/chcon.c 2007-01-09 18:47:05.000000000 +0000 @@ -0,0 +1,421 @@ +/* chcontext -- change security context of a pathname */ + @@ -1084,7 +1059,7 @@ + exit (errors); +} --- coreutils-6.7/src/mkdir.c.selinux 2006-10-22 17:54:15.000000000 +0100 -+++ coreutils-6.7/src/mkdir.c 2007-01-09 18:24:57.000000000 +0000 ++++ coreutils-6.7/src/mkdir.c 2007-01-09 18:47:05.000000000 +0000 @@ -35,11 +35,18 @@ #define AUTHORS "David MacKenzie" @@ -1150,7 +1125,7 @@ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: --- coreutils-6.7/src/stat.c.selinux 2006-11-27 10:25:51.000000000 +0000 -+++ coreutils-6.7/src/stat.c 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/src/stat.c 2007-01-09 18:47:05.000000000 +0000 @@ -55,6 +55,13 @@ # include #endif @@ -1443,7 +1418,7 @@ exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); } --- coreutils-6.7/src/mkfifo.c.selinux 2006-10-22 17:54:15.000000000 +0100 -+++ coreutils-6.7/src/mkfifo.c 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/src/mkfifo.c 2007-01-09 18:47:05.000000000 +0000 @@ -32,11 +32,18 @@ #define AUTHORS "David MacKenzie" @@ -1510,7 +1485,7 @@ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: --- coreutils-6.7/src/mknod.c.selinux 2006-10-22 17:54:15.000000000 +0100 -+++ coreutils-6.7/src/mknod.c 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/src/mknod.c 2007-01-09 18:47:05.000000000 +0000 @@ -36,8 +36,15 @@ /* The name this program was run with. */ char *program_name; @@ -1571,8 +1546,8 @@ case_GETOPT_HELP_CHAR; case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: ---- coreutils-6.7/src/id.c.selinux 2007-01-09 18:24:57.000000000 +0000 -+++ coreutils-6.7/src/id.c 2007-01-09 18:24:58.000000000 +0000 +--- coreutils-6.7/src/id.c.selinux 2007-01-09 18:47:04.000000000 +0000 ++++ coreutils-6.7/src/id.c 2007-01-09 18:47:05.000000000 +0000 @@ -37,6 +37,20 @@ int getugroups (); @@ -1704,7 +1679,7 @@ +#endif } --- coreutils-6.7/src/mv.c.selinux 2006-10-23 10:09:10.000000000 +0100 -+++ coreutils-6.7/src/mv.c 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/src/mv.c 2007-01-09 18:47:05.000000000 +0000 @@ -33,6 +33,11 @@ #include "quote.h" #include "remove.h" @@ -1739,8 +1714,8 @@ /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless we'll actually use backup_suffix_string. */ backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); ---- /dev/null 2007-01-09 12:27:07.480840763 +0000 -+++ coreutils-6.7/src/runcon.c 2007-01-09 18:24:58.000000000 +0000 +--- /dev/null 2007-01-10 09:33:30.042789464 +0000 ++++ coreutils-6.7/src/runcon.c 2007-01-09 18:47:05.000000000 +0000 @@ -0,0 +1,253 @@ +/* + * runcon [ context | @@ -1996,7 +1971,7 @@ + return 1; /* can't reach this statement.... */ +} --- coreutils-6.7/src/copy.c.selinux 2006-12-07 07:01:16.000000000 +0000 -+++ coreutils-6.7/src/copy.c 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/src/copy.c 2007-01-09 18:47:05.000000000 +0000 @@ -53,6 +53,11 @@ #include "xreadlink.h" #include "yesno.h" @@ -2113,7 +2088,7 @@ If we've just added a dev/ino entry via the remember_copied call above (i.e., unless we've just failed to create a hard link), --- coreutils-6.7/src/install.c.selinux 2006-12-04 09:00:28.000000000 +0000 -+++ coreutils-6.7/src/install.c 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/src/install.c 2007-01-09 18:47:05.000000000 +0000 @@ -49,6 +49,43 @@ # include #endif @@ -2276,8 +2251,8 @@ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ ---- coreutils-6.7/configure.ac.selinux 2007-01-09 18:24:55.000000000 +0000 -+++ coreutils-6.7/configure.ac 2007-01-09 18:24:58.000000000 +0000 +--- coreutils-6.7/configure.ac.selinux 2007-01-09 18:47:02.000000000 +0000 ++++ coreutils-6.7/configure.ac 2007-01-09 18:47:05.000000000 +0000 @@ -46,6 +46,13 @@ LIB_PAM="-ldl -lpam -lpam_misc" AC_SUBST(LIB_PAM)]) @@ -2293,7 +2268,7 @@ OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname\$(EXEEXT)" MAN="$MAN uname.1") --- coreutils-6.7/man/stat.1.selinux 2006-12-07 22:45:45.000000000 +0000 -+++ coreutils-6.7/man/stat.1 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/man/stat.1 2007-01-09 18:47:05.000000000 +0000 @@ -28,6 +28,9 @@ \fB\-t\fR, \fB\-\-terse\fR print the information in terse form @@ -2314,15 +2289,15 @@ %D Device number in hex .TP ---- /dev/null 2007-01-09 12:27:07.480840763 +0000 -+++ coreutils-6.7/man/chcon.x 2007-01-09 18:24:58.000000000 +0000 +--- /dev/null 2007-01-10 09:33:30.042789464 +0000 ++++ coreutils-6.7/man/chcon.x 2007-01-09 18:47:05.000000000 +0000 @@ -0,0 +1,4 @@ +[NAME] +chcon \- change file security context +[DESCRIPTION] +.\" Add any additional description here ---- /dev/null 2007-01-09 12:27:07.480840763 +0000 -+++ coreutils-6.7/man/chcon.1 2007-01-09 18:24:58.000000000 +0000 +--- /dev/null 2007-01-10 09:33:30.042789464 +0000 ++++ coreutils-6.7/man/chcon.1 2007-01-09 18:47:05.000000000 +0000 @@ -0,0 +1,64 @@ +.TH CHCON 1 "July 2003" "chcon (coreutils) 5.0" "User Commands" +.SH NAME @@ -2389,7 +2364,7 @@ +.PP +should give you access to the complete manual. --- coreutils-6.7/man/dir.1.selinux 2006-12-07 22:45:41.000000000 +0000 -+++ coreutils-6.7/man/dir.1 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/man/dir.1 2007-01-09 18:47:05.000000000 +0000 @@ -204,6 +204,20 @@ .TP \fB\-1\fR @@ -2412,7 +2387,7 @@ \fB\-\-help\fR display this help and exit --- coreutils-6.7/man/mkfifo.1.selinux 2006-12-07 22:45:43.000000000 +0000 -+++ coreutils-6.7/man/mkfifo.1 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/man/mkfifo.1 2007-01-09 18:47:05.000000000 +0000 @@ -12,6 +12,9 @@ .PP Mandatory arguments to long options are mandatory for short options too. @@ -2423,8 +2398,8 @@ \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR set file permission bits to MODE, not a=rw \- umask .TP ---- coreutils-6.7/man/Makefile.am.selinux 2007-01-09 18:24:56.000000000 +0000 -+++ coreutils-6.7/man/Makefile.am 2007-01-09 18:24:58.000000000 +0000 +--- coreutils-6.7/man/Makefile.am.selinux 2007-01-09 18:47:04.000000000 +0000 ++++ coreutils-6.7/man/Makefile.am 2007-01-09 18:47:05.000000000 +0000 @@ -30,7 +30,7 @@ shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \ su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \ @@ -2444,7 +2419,7 @@ SUFFIXES = .x .1 --- coreutils-6.7/man/cp.1.selinux 2006-12-07 22:45:41.000000000 +0000 -+++ coreutils-6.7/man/cp.1 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/man/cp.1 2007-01-09 18:47:05.000000000 +0000 @@ -57,7 +57,7 @@ .TP \fB\-\-preserve\fR[=\fIATTR_LIST\fR] @@ -2465,7 +2440,7 @@ output version information and exit .PP --- coreutils-6.7/man/id.1.selinux 2006-12-07 22:45:42.000000000 +0000 -+++ coreutils-6.7/man/id.1 2007-01-09 18:24:58.000000000 +0000 ++++ coreutils-6.7/man/id.1 2007-01-09 18:47:06.000000000 +0000 @@ -13,6 +13,9 @@ \fB\-a\fR ignore, for compatibility with other versions @@ -2476,8 +2451,8 @@ \fB\-g\fR, \fB\-\-group\fR print only the effective group ID .TP ---- /dev/null 2007-01-09 12:27:07.480840763 +0000 -+++ coreutils-6.7/man/runcon.x 2007-01-09 18:24:59.000000000 +0000 +--- /dev/null 2007-01-10 09:33:30.042789464 +0000 ++++ coreutils-6.7/man/runcon.x 2007-01-09 18:47:06.000000000 +0000 @@ -0,0 +1,14 @@ +[NAME] +runcon \- run command with specified security context @@ -2493,8 +2468,8 @@ +.PP +Note that only carefully-chosen contexts are likely to successfully +run. ---- /dev/null 2007-01-09 12:27:07.480840763 +0000 -+++ coreutils-6.7/man/runcon.1 2007-01-09 18:24:59.000000000 +0000 +--- /dev/null 2007-01-10 09:33:30.042789464 +0000 ++++ coreutils-6.7/man/runcon.1 2007-01-09 18:47:06.000000000 +0000 @@ -0,0 +1,45 @@ +.TH RUNCON "1" "February 2005" "runcon (coreutils) 5.0" "selinux" +.SH NAME @@ -2542,7 +2517,7 @@ +Note that only carefully-chosen contexts are likely to successfully +run. --- coreutils-6.7/man/mknod.1.selinux 2006-12-07 22:45:43.000000000 +0000 -+++ coreutils-6.7/man/mknod.1 2007-01-09 18:24:59.000000000 +0000 ++++ coreutils-6.7/man/mknod.1 2007-01-09 18:47:06.000000000 +0000 @@ -12,6 +12,9 @@ .PP Mandatory arguments to long options are mandatory for short options too. @@ -2554,7 +2529,7 @@ set file permission bits to MODE, not a=rw \- umask .TP --- coreutils-6.7/man/ls.1.selinux 2006-12-07 22:45:42.000000000 +0000 -+++ coreutils-6.7/man/ls.1 2007-01-09 18:24:59.000000000 +0000 ++++ coreutils-6.7/man/ls.1 2007-01-09 18:47:06.000000000 +0000 @@ -204,6 +204,20 @@ .TP \fB\-1\fR @@ -2577,7 +2552,7 @@ \fB\-\-help\fR display this help and exit --- coreutils-6.7/man/mkdir.1.selinux 2006-12-07 22:45:43.000000000 +0000 -+++ coreutils-6.7/man/mkdir.1 2007-01-09 18:24:59.000000000 +0000 ++++ coreutils-6.7/man/mkdir.1 2007-01-09 18:47:06.000000000 +0000 @@ -12,6 +12,8 @@ .PP Mandatory arguments to long options are mandatory for short options too. @@ -2588,7 +2563,7 @@ set file mode (as in chmod), not a=rwx \- umask .TP --- coreutils-6.7/man/vdir.1.selinux 2006-12-07 22:45:46.000000000 +0000 -+++ coreutils-6.7/man/vdir.1 2007-01-09 18:24:59.000000000 +0000 ++++ coreutils-6.7/man/vdir.1 2007-01-09 18:47:06.000000000 +0000 @@ -204,6 +204,20 @@ .TP \fB\-1\fR @@ -2611,7 +2586,7 @@ \fB\-\-help\fR display this help and exit --- coreutils-6.7/man/install.1.selinux 2006-12-07 22:45:42.000000000 +0000 -+++ coreutils-6.7/man/install.1 2007-01-09 18:24:59.000000000 +0000 ++++ coreutils-6.7/man/install.1 2007-01-09 18:47:06.000000000 +0000 @@ -66,6 +66,11 @@ .TP \fB\-v\fR, \fB\-\-verbose\fR @@ -2624,8 +2599,8 @@ .TP \fB\-\-help\fR display this help and exit ---- coreutils-6.7/README.selinux 2007-01-09 18:24:56.000000000 +0000 -+++ coreutils-6.7/README 2007-01-09 18:24:59.000000000 +0000 +--- coreutils-6.7/README.selinux 2007-01-09 18:47:04.000000000 +0000 ++++ coreutils-6.7/README 2007-01-09 18:47:06.000000000 +0000 @@ -7,11 +7,11 @@ The programs that can be built with this package are: