diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-03 13:13:45 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-03 13:13:45 +0100 |
commit | 25cac9fce0ea9a3bb1e642255087f16d1872ee7c (patch) | |
tree | e333f21b52f0e11fe6190ea791f321567f0eb707 /lib | |
parent | 7d2fd192e16f7167c064a3c71078a40036cc9b93 (diff) | |
download | abrt-25cac9fce0ea9a3bb1e642255087f16d1872ee7c.tar.gz abrt-25cac9fce0ea9a3bb1e642255087f16d1872ee7c.tar.xz abrt-25cac9fce0ea9a3bb1e642255087f16d1872ee7c.zip |
improved compatibility with kernel hook (zprikryl)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MiddleWare/MiddleWare.cpp | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp index 161b1f8e..477bd141 100644 --- a/lib/MiddleWare/MiddleWare.cpp +++ b/lib/MiddleWare/MiddleWare.cpp @@ -282,23 +282,36 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p dd.LoadText(FILENAME_EXECUTABLE, executable); package = m_RPMInfo.GetPackage(executable, description); - std::string packageName = package.substr(0, package.rfind("-", package.rfind("-") - 1)); - if (packageName == "" || - (m_setBlackList.find(packageName) != m_setBlackList.end())) + if (executable != "kernel") { - dd.Delete(); - dd.Close(); - return 0; - } - if (m_bOpenGPGCheck) - { - if (!m_RPMInfo.CheckFingerprint(packageName) || - !m_RPMInfo.CheckHash(packageName, executable)) + std::string packageName = package.substr(0, package.rfind("-", package.rfind("-") - 1)); + if (packageName == "" || + (m_setBlackList.find(packageName) != m_setBlackList.end())) { dd.Delete(); dd.Close(); return 0; } + if (m_bOpenGPGCheck) + { + if (!m_RPMInfo.CheckFingerprint(packageName) || + !m_RPMInfo.CheckHash(packageName, executable)) + { + dd.Delete(); + dd.Close(); + return 0; + } + } + } + else + { + package = "kernel"; + description = "The Linux kernel" + description += "\n\n"; + description += "The kernel contains the Linux kernel (vmlinuz), the core of any" + "Linux operating system. The kernel handles the basic functions" + "of the operating system: memory allocation, process allocation, device" + "input and output, etc." } dd.SaveText(FILENAME_PACKAGE, package); dd.SaveText(FILENAME_DESCRIPTION, description); |