Blame SOURCES/fapolicyd-java3.patch
|
|
0af8c4 |
From 006a656205765ce26327d176b4ca07e44bd55422 Mon Sep 17 00:00:00 2001
|
|
|
0af8c4 |
From: Steve Grubb <sgrubb@redhat.com>
|
|
|
0af8c4 |
Date: Tue, 10 Nov 2020 16:44:25 -0500
|
|
|
0af8c4 |
Subject: [PATCH] Add comments about what each file extension is looking for in
|
|
|
0af8c4 |
the /usr/share filter
|
|
|
0af8c4 |
|
|
|
0af8c4 |
---
|
|
|
0af8c4 |
src/library/rpm-backend.c | 14 ++++++++++++++
|
|
|
0af8c4 |
1 file changed, 14 insertions(+)
|
|
|
0af8c4 |
|
|
|
0af8c4 |
diff --git a/src/library/rpm-backend.c b/src/library/rpm-backend.c
|
|
|
0af8c4 |
index 6ce8a2d..ba648d3 100644
|
|
|
0af8c4 |
--- a/src/library/rpm-backend.c
|
|
|
0af8c4 |
+++ b/src/library/rpm-backend.c
|
|
|
0af8c4 |
@@ -184,45 +184,59 @@ static int drop_path(const char *file_name)
|
|
|
0af8c4 |
// not python, javascript, or has a libexec dir
|
|
|
0af8c4 |
if (file_name[6] == 'h' ) {
|
|
|
0af8c4 |
// These are roughly ordered by quantity
|
|
|
0af8c4 |
+ // Python byte code
|
|
|
0af8c4 |
if (fnmatch("*.py?",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Python text files
|
|
|
0af8c4 |
else if (fnmatch("*.py",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Some apps have a private libexec
|
|
|
0af8c4 |
else if (fnmatch("*/libexec/*",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Ruby
|
|
|
0af8c4 |
else if (fnmatch("*.rb",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Perl
|
|
|
0af8c4 |
else if (fnmatch("*.pl",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // System Tap
|
|
|
0af8c4 |
else if (fnmatch("*.stp",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Javascript
|
|
|
0af8c4 |
else if (fnmatch("*.js",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Java
|
|
|
0af8c4 |
else if (fnmatch("*.jar",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // M4
|
|
|
0af8c4 |
else if (fnmatch("*.m4",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // PHP
|
|
|
0af8c4 |
else if (fnmatch("*.php",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Lisp
|
|
|
0af8c4 |
else if (fnmatch("*.el",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Perl Modules
|
|
|
0af8c4 |
else if (fnmatch("*.pm",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Lua
|
|
|
0af8c4 |
else if (fnmatch("*.lua",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|
|
|
0af8c4 |
+ // Java
|
|
|
0af8c4 |
else if (fnmatch("*.java",
|
|
|
0af8c4 |
file_name, 0) == 0)
|
|
|
0af8c4 |
return 0;
|