|
|
70810f1 |
Index: libselinux/include/selinux/selinux.h
|
|
|
70810f1 |
===================================================================
|
|
|
70810f1 |
RCS file: /nfshome/pal/CVS/selinux-usr/libselinux/include/selinux/selinux.h,v
|
|
|
70810f1 |
retrieving revision 1.50
|
|
|
70810f1 |
diff -u -p -r1.50 selinux.h
|
|
|
70810f1 |
--- libselinux/include/selinux/selinux.h 7 Nov 2005 19:30:36 -0000 1.50
|
|
|
70810f1 |
+++ libselinux/include/selinux/selinux.h 8 Nov 2005 19:04:31 -0000
|
|
|
70810f1 |
@@ -292,6 +292,7 @@ extern void set_matchpathcon_canoncon(in
|
|
|
70810f1 |
|
|
|
70810f1 |
/* Set flags controlling operation of matchpathcon_init or matchpathcon. */
|
|
|
70810f1 |
#define MATCHPATHCON_BASEONLY 1 /* Only process the base file_contexts file. */
|
|
|
70810f1 |
+#define MATCHPATHCON_NOTRANS 2 /* Do not perform any context translation. */
|
|
|
70810f1 |
extern void set_matchpathcon_flags(unsigned int flags);
|
|
|
70810f1 |
|
|
|
70810f1 |
/* Load the file contexts configuration specified by 'path'
|
|
|
70810f1 |
Index: libselinux/src/matchpathcon.c
|
|
|
70810f1 |
===================================================================
|
|
|
70810f1 |
RCS file: /nfshome/pal/CVS/selinux-usr/libselinux/src/matchpathcon.c,v
|
|
|
70810f1 |
retrieving revision 1.32
|
|
|
70810f1 |
diff -u -p -r1.32 matchpathcon.c
|
|
|
70810f1 |
--- libselinux/src/matchpathcon.c 7 Nov 2005 19:30:37 -0000 1.32
|
|
|
70810f1 |
+++ libselinux/src/matchpathcon.c 8 Nov 2005 19:08:05 -0000
|
|
|
70810f1 |
@@ -570,6 +570,10 @@ static int process_line( const char *pat
|
|
|
70810f1 |
skip_type:
|
|
|
70810f1 |
if (strcmp(context, "<<none>>")) {
|
|
|
70810f1 |
char *tmpcon = NULL;
|
|
|
70810f1 |
+
|
|
|
70810f1 |
+ if (myflags & MATCHPATHCON_NOTRANS)
|
|
|
70810f1 |
+ goto skip_trans;
|
|
|
70810f1 |
+
|
|
|
70810f1 |
if (context_translations) {
|
|
|
70810f1 |
if (raw_to_trans_context(context, &tmpcon)) {
|
|
|
70810f1 |
myprintf("%s: line %u has invalid "
|
|
|
70810f1 |
@@ -584,6 +588,7 @@ static int process_line( const char *pat
|
|
|
70810f1 |
return -1;
|
|
|
70810f1 |
}
|
|
|
70810f1 |
|
|
|
70810f1 |
+skip_trans:
|
|
|
70810f1 |
if (myinvalidcon) {
|
|
|
70810f1 |
/* Old-style validation of context. */
|
|
|
70810f1 |
if (myinvalidcon(path, lineno, context))
|
|
|
70810f1 |
}
|