summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/Kerneloops.conf2
-rw-r--r--lib/Plugins/KerneloopsReporter.cpp2
-rw-r--r--lib/Utils/parse_release.cpp2
-rw-r--r--lib/Utils/xfuncs.cpp11
4 files changed, 16 insertions, 1 deletions
diff --git a/lib/Plugins/Kerneloops.conf b/lib/Plugins/Kerneloops.conf
index 08dacd00..a0141533 100644
--- a/lib/Plugins/Kerneloops.conf
+++ b/lib/Plugins/Kerneloops.conf
@@ -1,6 +1,8 @@
# compatibility with kerneloops.org tool
InformAllUsers = yes
+AutoReportUIDs = root
+
# KerneloopsReporter configuration. Reports kernel crashes collected by the addon.
################################################################################
diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp
index f38f5031..a1fd3f16 100644
--- a/lib/Plugins/KerneloopsReporter.cpp
+++ b/lib/Plugins/KerneloopsReporter.cpp
@@ -113,7 +113,7 @@ std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
/* FIXME: be more informative */
throw CABRTException(EXCEP_PLUGIN, std::string("CKerneloopsReporter::Report(): Report has not been sent..."));
}
- return "Kernel oops report was uploaded to: " + m_sSubmitURL;
+ return "Kernel oops report was uploaded.";
}
void CKerneloopsReporter::SetSettings(const map_plugin_settings_t& pSettings)
diff --git a/lib/Utils/parse_release.cpp b/lib/Utils/parse_release.cpp
index 33d3edb1..b96cab76 100644
--- a/lib/Utils/parse_release.cpp
+++ b/lib/Utils/parse_release.cpp
@@ -11,6 +11,7 @@ void parse_release(const char *pRelease, string& pProduct, string& pVersion)
{
pProduct = "Fedora";
pVersion = "rawhide";
+ VERB3 log("%s:Version is '%s' and product is '%s'",__func__, pVersion.c_str(), pProduct.c_str());
return;
}
if (strstr(pRelease, "Fedora"))
@@ -35,4 +36,5 @@ void parse_release(const char *pRelease, string& pProduct, string& pVersion)
}
space++;
}
+ VERB3 log("%s:Version is '%s' and product is '%s'",__func__, pVersion.c_str(), pProduct.c_str());
}
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp
index 97c2f763..4b208a9e 100644
--- a/lib/Utils/xfuncs.cpp
+++ b/lib/Utils/xfuncs.cpp
@@ -368,3 +368,14 @@ bool string_to_bool(const char *s)
return true;
return false;
}
+
+bool xgetpwnam(const char* login, uid_t *uid)
+{
+ struct passwd* pwd = getpwnam(login);
+ if (pwd == NULL)
+ return false;
+
+ *uid = pwd->pw_uid;
+ return true;
+}
+