#if 1
#include <stdbool.h>
typedef bool boolean;
-@@ -290,6 +294,9 @@
+@@ -322,6 +322,9 @@
struct dir_id fileid; /* samefile */
mode_t type; /* type */
- FILE *stream; /* fprint fprint0 */
+ FILE *stream; /* ls fls fprint0 */
+#ifdef WITH_SELINUX
+ security_context_t scontext; /* scontext */
+#endif /*WITH_SELINUX*/
- struct format_val printf_vec; /* printf fprintf */
+ struct format_val printf_vec; /* printf fprintf fprint */
} args;
@@ -477,6 +484,10 @@
.PP
A `%' character followed by any other character is discarded (but the
other character is printed).
---- findutils-4.2.11/find/find.c.orig 2005-01-03 01:10:13.000000000 +0100
-+++ findutils-4.2.11/find/find.c 2005-01-09 18:11:42.808971856 +0100
-@@ -238,11 +238,17 @@
+--- findutils-4.2.26/find/find.c.orig 2005-11-11 08:41:37.000000000 +0100
++++ findutils-4.2.26/find/find.c 2005-11-27 03:32:00.836912296 +0100
+@@ -272,11 +272,17 @@
{
case SYMLINK_ALWAYS_DEREF: /* -L */
options.xstat = optionl_stat;
/* Can't turn no_leaf_check off because the user might have specified
* -noleaf anyway
*/
-@@ -250,6 +256,9 @@
+@@ -284,6 +290,9 @@
case SYMLINK_DEREF_ARGSONLY: /* -H */
options.xstat = optionh_stat;
options.no_leaf_check = true;
}
-@@ -272,6 +281,9 @@
+@@ -395,6 +404,9 @@
struct predicate *cur_pred;
char *predicate_name; /* Name of predicate being parsed. */
int end_of_leading_options = 0; /* First arg after any -H/-L etc. */
+#ifdef WITH_SELINUX
+ int is_selinux_enabled_flag;
+#endif /* WITH_SELINUX */
- program_name = argv[0];
- #ifdef HAVE_SETLOCALE
-@@ -301,6 +313,9 @@
+
+ program_name = argv[0];
+@@ -442,6 +454,9 @@
options.ignore_readdir_race = false;
state.exit_status = 0;
#if defined(DEBUG_STAT)
options.xstat = debug_stat;
-@@ -382,6 +397,14 @@
+@@ -538,6 +553,14 @@
if (strchr ("-!(),", argv[i][0]) == NULL)
usage (_("paths must precede expression"));
predicate_name = argv[i];
+ }
+ }
+#endif
- parse_function = find_parser (predicate_name);
- if (parse_function == NULL)
- /* Command line option not recognized */
---- findutils-4.2.11/find/parser.c.orig 2005-01-03 01:10:27.000000000 +0100
-+++ findutils-4.2.11/find/parser.c 2005-01-09 18:12:19.498394216 +0100
-@@ -28,6 +28,10 @@
- #include "../gnulib/lib/xalloc.h"
-
+ parse_entry = find_parser (predicate_name);
+ if (parse_entry == NULL)
+ {
+--- findutils-4.2.25/find/parser.c.orig 2005-07-31 23:01:54.000000000 +0200
++++ findutils-4.2.25/find/parser.c 2005-10-25 23:58:27.823557240 +0200
+@@ -47,6 +47,10 @@
+ /* We need <unistd.h> for isatty(). */
+ #include <unistd.h>
+#ifdef WITH_SELINUX
+#include <selinux/selinux.h>
#if ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
-@@ -129,6 +133,9 @@
- static boolean parse_warn PARAMS((char *argv[], int *arg_ptr));
- static boolean parse_xtype PARAMS((char *argv[], int *arg_ptr));
- static boolean parse_quit PARAMS((char *argv[], int *arg_ptr));
+@@ -147,6 +151,9 @@
+ static boolean parse_warn PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+ static boolean parse_xtype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+ static boolean parse_quit PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+#ifdef WITH_SELINUX
-+static boolean parse_scontext PARAMS((char *argv[], int *arg_ptr));
++static boolean parse_scontext PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+#endif /*WITH_SELINUX*/
- static boolean insert_regex PARAMS((char *argv[], int *arg_ptr, boolean ignore_case));
- static boolean insert_type PARAMS((char *argv[], int *arg_ptr, boolean (*which_pred )()));
-@@ -254,6 +261,10 @@
- {ARG_TEST, "wholename", parse_wholename}, /* GNU, replaces -path */
- {ARG_OPTION, "xdev", parse_xdev},
- {ARG_TEST, "xtype", parse_xtype}, /* GNU */
+
+
+@@ -280,6 +287,10 @@
+ PARSE_TEST_NP ("wholename", wholename), /* GNU, replaces -path */
+ PARSE_OPTION ("xdev", xdev),
+ PARSE_TEST ("xtype", xtype), /* GNU */
+#ifdef WITH_SELINUX
-+ {ARG_TEST, "context", parse_scontext}, /* SELINUX */
-+ {ARG_TEST, "-context", parse_scontext}, /* SELINUX */
++ PARSE_TEST ("context", scontext), /* SELINUX */
++ PARSE_TEST ("-context", scontext), /* SELINUX */
+#endif /*WITH_SELINUX*/
- {0, 0, 0}
- };
- \f
-@@ -726,6 +737,10 @@
+ #ifdef UNIMPLEMENTED_UNIX
+ /* It's pretty ugly for find to know about archive formats.
+ Plus what it could do with cpio archives is very limited.
+@@ -803,6 +814,10 @@
-nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n\
-wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\
-used N -user NAME -xtype [bcdpfls]\n"));
+ -context CONTEXT\n"));
+#endif /*WITH_SELINUX*/
puts (_("\
- actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n\
- -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -delete\n\
-@@ -1542,6 +1557,32 @@
- return true;
+ actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n\
+ -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n\
+@@ -1614,6 +1629,30 @@
+ return insert_num (argv, arg_ptr, entry);
}
+#ifdef WITH_SELINUX
+
+static boolean
-+parse_scontext ( argv, arg_ptr )
-+ char *argv[];
-+ int *arg_ptr;
++parse_scontext (const struct parser_table *entry, char **argv, int *arg_ptr)
+{
+ struct predicate *our_pred;
+
+ if ( (argv == NULL) || (argv[*arg_ptr] == NULL) )
+ return( false );
+
-+ our_pred = insert_primary(pred_scontext);
-+ our_pred->need_stat = false;
++ our_pred = insert_primary_withpred (entry, pred_scontext);
++ our_pred->need_stat = our_pred->need_type = false;
+#ifdef DEBUG
+ our_pred->p_name = find_pred_name (pred_scontext);
+#endif /*DEBUG*/
+#endif /*WITH_SELINUX*/
+
static boolean
- parse_xtype (char **argv, int *arg_ptr)
+ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
{
-@@ -1702,7 +1743,11 @@
+@@ -1949,7 +1988,11 @@
if (*scan2 == '.')
for (scan2++; ISDIGIT (*scan2); scan2++)
/* Do nothing. */ ;
last_pred->pred_next = NULL;
last_pred->pred_left = NULL;
last_pred->pred_right = NULL;
---- findutils-4.2.20/po/pl.po.orig 2005-03-08 00:20:30.000000000 +0100
-+++ findutils-4.2.20/po/pl.po 2005-03-27 23:37:43.592682032 +0200
-@@ -204,6 +204,11 @@
+--- findutils-4.2.28/po/pl.po.orig 2006-08-26 00:46:49.506053750 +0200
++++ findutils-4.2.28/po/pl.po 2006-08-26 00:48:19.247662250 +0200
+@@ -151,6 +151,11 @@
msgid "paths must precede expression"
msgstr "¶cie¿ki musz± poprzedzaæ wyra¿enie"
-+#: find/find.c:471
++#: find/find.c:559
+#, c-format
+msgid "Error: invalid predicate %s: the kernel is not SELinux-enabled.\n"
+msgstr "B³±d: b³êdne wyra¿enie %s: j±dro nie ma w³±czonej obs³ugi SELinuksa.\n"
+
- #: find/find.c:518
+ #: find/find.c:545
#, c-format
msgid "invalid predicate `%s'"
-@@ -400,6 +405,10 @@
- " -wholename WZORZEC -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n"
- " -used N -user NAZWA -xtype [bcdpfls]\n"
+@@ -357,6 +362,10 @@
+ "w przypadku braku dostêpu do WWW, wysy³aj±c pocztê elektroniczn± pod\n"
+ "adres <bug-findutils@gnu.org>."
-+#: find/parser.c:755
++#: find/parser.c:817
+msgid " -context CONTEXT\n"
+msgstr " -context KONTEKST\n"
+
- #: find/parser.c:747
- msgid ""
- "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n"
+ #: find/parser.c:841
+ msgid "sanity check of the fnmatch() library function failed."
+ msgstr ""