(Forwarding to crash-catcher-list)
I tested the patch and it works well. Please see the comments below.
Reviewed by: Karel Klic <kklic(a)redhat.com>
On 05/06/2010 02:56 AM, Denys Vlasenko wrote:
diff -x '*.po' -d -urpN abrt.4/src/Daemon/abrt.conf
abrt.5/src/Daemon/abrt.conf
--- abrt.4/src/Daemon/abrt.conf 2010-03-31 17:40:56.000000000 +0200
+++ abrt.5/src/Daemon/abrt.conf 2010-05-06 02:01:15.327928666 +0200
@@ -8,6 +8,8 @@ OpenGPGCheck = yes
BlackList = nspluginwrapper, valgrind, strace, avant-window-navigator
# Process crashes in executables which do not belong to any package?
ProcessUnpackaged = no
+# Blacklisted executable paths (shell patterns)
+BlackListedPaths = /usr/share/doc/*, */example*
Should we mention this new item
also in abrt.conf man page?
diff -x '*.po' -d -urpN abrt.4/src/Daemon/MiddleWare.cpp
abrt.5/src/Daemon/MiddleWare.cpp
--- abrt.4/src/Daemon/MiddleWare.cpp 2010-05-06 01:53:04.836994653 +0200
+++ abrt.5/src/Daemon/MiddleWare.cpp 2010-05-06 02:48:47.813218492 +0200
@@ -739,6 +740,17 @@ static mw_result_t SavePackageDescriptio
log("Blacklisted package '%s'", packageName.c_str());
return MW_BLACKLISTED;
}
+ set_string_t::iterator it = g_settings_setBlackListedPaths.begin();
+ while (it != g_settings_setBlackListedPaths.end())
+ {
+ if (fnmatch(it->c_str(), pExecutable, /*flags:*/ 0) == 0)
+ {
+ log("Blacklisted executable '%s'", pExecutable);
+ return MW_BLACKLISTED;
+ }
+ it++;
+ }
When the matching is placed here, BlackListedPaths does not work for
unpackaged binaries/scripts (enabled by ProcessUnpackaged = yes).
Is this behaviour intentional?
It might be the right thing to do, but this fact should IMHO be
documented in the man page (I was surprised by it).
@@ -475,6 +481,7 @@ void SaveSettings()
SaveBool("OpenGPGCheck", g_settings_bOpenGPGCheck, fOut);
SaveSetString("OpenGPGPublicKeys", g_settings_setOpenGPGPublicKeys,
fOut);
SaveSetString("BlackList", g_settings_setBlackListedPkgs, fOut);
+ SaveSetString("BlackListedPaths", g_settings_setBlackListedPaths,
fOut);
fprintf(fOut, "Database = %s\n", g_settings_sDatabase.c_str());
fprintf(fOut, "MaxCrashReportsSize = %u\n",
g_settings_nMaxCrashReportsSize);
SaveVectorPairStrings("ActionsAndReporters",
g_settings_vectorActionsAndReporters, fOut);
SaveSettings() has been removed in
recent git version.
Karel