summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-12-14 17:20:03 +0100
committerKarel Klic <kklic@redhat.com>2009-12-14 17:20:03 +0100
commitb6fbdbdee4e4a78528d765bbf4ddb1087adce5f4 (patch)
tree6af427ef59b46a9c452c4f263908f27be9b20ce5
parenta24d2906c51e3740e6e0acf8f0093827b4e35bc3 (diff)
parentfdce1d751b45bbd0210b45989f4f4c0e092683dc (diff)
downloadabrt-b6fbdbdee4e4a78528d765bbf4ddb1087adce5f4.tar.gz
abrt-b6fbdbdee4e4a78528d765bbf4ddb1087adce5f4.tar.xz
abrt-b6fbdbdee4e4a78528d765bbf4ddb1087adce5f4.zip
Merge branch 'master' of git://git.fedorahosted.org/git/abrt
-rw-r--r--inc/abrtlib.h4
-rw-r--r--lib/Plugins/CCpp.conf4
-rw-r--r--lib/Plugins/CCpp.cpp49
-rw-r--r--lib/Plugins/Catcut.cpp16
-rw-r--r--lib/Plugins/FileTransfer.cpp11
-rw-r--r--lib/Plugins/Firefox.cpp36
-rw-r--r--lib/Plugins/Mailx.cpp5
-rw-r--r--lib/Plugins/TicketUploader.cpp8
-rw-r--r--lib/Utils/xfuncs.cpp12
-rw-r--r--po/de.po184
-rw-r--r--src/Daemon/Daemon.cpp9
-rw-r--r--src/Daemon/MiddleWare.cpp28
-rw-r--r--src/Daemon/RPM.cpp25
-rw-r--r--src/Daemon/RPM.h4
-rw-r--r--src/Daemon/abrt.conf3
-rw-r--r--src/Hooks/CCpp.cpp11
16 files changed, 194 insertions, 215 deletions
diff --git a/inc/abrtlib.h b/inc/abrtlib.h
index 2227ef33..17bd5429 100644
--- a/inc/abrtlib.h
+++ b/inc/abrtlib.h
@@ -150,6 +150,10 @@ void copyfd_exact_size(int src_fd, int dst_fd, off_t size);
off_t copy_file(const char *src_name, const char *dst_name);
+void xsetreuid(uid_t ruid, uid_t euid);
+void xsetregid(gid_t rgid, uid_t egid);
+
+
unsigned long long monotonic_ns(void);
unsigned long long monotonic_us(void);
unsigned monotonic_sec(void);
diff --git a/lib/Plugins/CCpp.conf b/lib/Plugins/CCpp.conf
index e5ba5ad9..e42b85a4 100644
--- a/lib/Plugins/CCpp.conf
+++ b/lib/Plugins/CCpp.conf
@@ -7,8 +7,8 @@ MakeCompatCore = no
# Generate memory map too (IGNORED FOR NOW)
MemoryMap = no
-# How to get debug-info: install, mount
-## install - download and install debug-info packages
+# How to get debuginfo: install, mount
+## install - download and install debuginfo packages
## mount - mount fedora NFS with debug info
## (IGNORED FOR NOW)
DebugInfo = install
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index add4e50f..37a2c8bc 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -101,13 +101,6 @@ static int ExecVP(char **pArgs, uid_t uid, string& pOutput)
int pipeout[2];
pid_t child;
- gid_t gid = uid;
- struct passwd* pw = getpwuid(uid);
- if (pw)
- {
- gid = pw->pw_gid;
- }
-
xpipe(pipeout);
child = fork();
if (child == -1)
@@ -120,18 +113,15 @@ static int ExecVP(char **pArgs, uid_t uid, string& pOutput)
close(pipeout[0]); /* read side of the pipe */
xmove_fd(pipeout[1], STDOUT_FILENO);
/* Make sure stdin is safely open to nothing */
- close(STDIN_FILENO);
- if (open("/dev/null", O_RDONLY))
- {
- if (open("/", O_RDONLY))
- abort(); /* never happens */
- }
+ xmove_fd(xopen("/dev/null", O_RDONLY), STDIN_FILENO);
/* Not a good idea, we won't see any error messages */
/* close(STDERR_FILENO); */
+ struct passwd* pw = getpwuid(uid);
+ gid_t gid = pw ? pw->pw_gid : uid;
setgroups(1, &gid);
- setregid(gid, gid);
- setreuid(uid, uid);
+ xsetregid(gid, gid);
+ xsetreuid(uid, uid);
setsid();
/* Nuke everything which may make setlocale() switch to non-POSIX locale:
@@ -261,7 +251,7 @@ static void GetBacktrace(const char *pDebugDumpDir,
const char *pDebugInfoDirs,
string& pBacktrace)
{
- update_client(_("Getting backtrace..."));
+ update_client(_("Generating backtrace"));
string UID;
string executable;
@@ -379,7 +369,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
const char *debuginfo_dirs,
string& build_ids)
{
- update_client(_("Searching for debug-info packages..."));
+ update_client(_("Starting debuginfo installation"));
int pipeout[2]; //TODO: can we use ExecVP?
xpipe(pipeout);
@@ -395,8 +385,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
{
close(pipeout[0]);
xmove_fd(pipeout[1], STDOUT_FILENO);
- close(STDIN_FILENO);
- xopen("/dev/null", O_RDONLY);
+ xmove_fd(xopen("/dev/null", O_RDONLY), STDIN_FILENO);
/* Not a good idea, we won't see any error messages */
/*close(STDERR_FILENO);*/
@@ -413,8 +402,6 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
close(pipeout[1]);
- update_client(_("Downloading and installing debug-info packages..."));
-
FILE *pipeout_fp = fdopen(pipeout[0], "r");
if (pipeout_fp == NULL) /* never happens */
{
@@ -564,12 +551,6 @@ string CAnalyzerCCpp::GetGlobalUUID(const char *pDebugDumpDir)
args[4] = (char*)backtrace_path.c_str();
args[5] = NULL;
- uid_t uid = atoi(uid_str.c_str());
- gid_t gid = uid;
- struct passwd* pw = getpwuid(uid);
- if (pw)
- gid = pw->pw_gid;
-
int pipeout[2];
xpipe(pipeout); /* stdout of abrt-backtrace */
pid_t child = fork();
@@ -582,12 +563,13 @@ string CAnalyzerCCpp::GetGlobalUUID(const char *pDebugDumpDir)
xmove_fd(pipeout[1], STDOUT_FILENO);
close(pipeout[0]); /* read side of the pipe */
- /* abrt-backtrace is executed under the user's
- uid and gid. */
+ /* abrt-backtrace is executed under the user's uid and gid. */
+ uid_t uid = atoi(uid_str.c_str());
+ struct passwd* pw = getpwuid(uid);
+ gid_t gid = pw ? pw->pw_gid : uid;
setgroups(1, &gid);
- setregid(gid, gid);
- setreuid(uid, uid);
- setsid();
+ xsetregid(gid, gid);
+ xsetreuid(uid, uid);
execvp(args[0], args);
VERB1 perror_msg("Can't execute '%s'", args[0]);
@@ -638,8 +620,7 @@ static bool DebuginfoCheckPolkit(int uid)
if (child_pid == 0)
{
//child
- if (setuid(uid))
- exit(1); //paranoia
+ xsetreuid(uid, uid);
PolkitResult result = polkit_check_authorization(getpid(),
"org.fedoraproject.abrt.install-debuginfos");
exit(result != PolkitYes); //exit 1 (failure) if not allowed
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
index 9974faa9..ebddfdd3 100644
--- a/lib/Plugins/Catcut.cpp
+++ b/lib/Plugins/Catcut.cpp
@@ -50,7 +50,7 @@ send_string(const char *pURL,
return;
}
- do
+ while (1)
{
int content_length = strlen(pContent);
FILE* f = fmemopen((void*)pContent, content_length, "r");
@@ -63,9 +63,11 @@ send_string(const char *pURL,
if (!result)
return;
update_client(_("Sending failed, try it again: %s"), curl_easy_strerror((CURLcode)result));
+ if (--retryCount <= 0)
+ break;
+ /* retry the upload if not succesful, wait a bit before next try */
+ sleep(retryDelaySeconds);
}
- /*retry the upload if not succesful, wait a bit before next try*/
- while (--retryCount != 0 && (sleep(retryDelaySeconds), 1));
throw CABRTException(EXCEP_PLUGIN, "send_string: can't send string");
}
@@ -84,7 +86,7 @@ send_file(const char *pURL,
update_client(_("Sending file %s to %s"), pFilename, pURL);
- do
+ while (1)
{
FILE* f = fopen(pFilename, "r");
if (!f)
@@ -99,9 +101,11 @@ send_file(const char *pURL,
if (!result)
return;
update_client(_("Sending failed, try it again: %s"), curl_easy_strerror((CURLcode)result));
+ if (--retryCount <= 0)
+ break;
+ /* retry the upload if not succesful, wait a bit before next try */
+ sleep(retryDelaySeconds);
}
- /*retry the upload if not succesful, wait a bit before next try*/
- while (--retryCount != 0 && (sleep(retryDelaySeconds), 1));
throw CABRTException(EXCEP_PLUGIN, "send_file: can't send file");
}
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 03ee464d..c98645cf 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -68,9 +68,8 @@ void CFileTransfer::SendFile(const char *pURL, const char *pFilename)
string wholeURL = concat_path_file(pURL, pFilename);
- int result;
int count = m_nRetryCount;
- do
+ while (1)
{
FILE *f;
struct stat buf;
@@ -99,12 +98,14 @@ void CFileTransfer::SendFile(const char *pURL, const char *pFilename)
curl_easy_setopt(curl, CURLOPT_READDATA, f);
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buf.st_size);
/* everything is done here; result 0 means success */
- result = curl_easy_perform(curl);
+ int result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
fclose(f);
+ if (result == 0 || --count <= 0)
+ break;
+ /* retry the upload if not succesful, wait a bit before next try */
+ sleep(m_nRetryDelay);
}
- /*retry the upload if not succesful, wait a bit before next try*/
- while (result != 0 && --count >= 0 && (sleep(m_nRetryDelay), 1));
}
/*
diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp
index 6f2c60d6..bcc59485 100644
--- a/lib/Plugins/Firefox.cpp
+++ b/lib/Plugins/Firefox.cpp
@@ -97,12 +97,6 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
int pipeout[2];
pid_t child;
- struct passwd* pw = getpwuid(uid);
- if (!pw)
- {
- throw CABRTException(EXCEP_PLUGIN, "%s: can't get GID for UID", __func__);
- }
-
xpipe(pipeout);
child = fork();
if (child == -1)
@@ -115,17 +109,15 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
close(pipeout[0]); /* read side of the pipe */
xmove_fd(pipeout[1], STDOUT_FILENO);
/* Make sure stdin is safely open to nothing */
- close(STDIN_FILENO);
- if (open("/dev/null", O_RDONLY))
- if (open("/", O_RDONLY))
- abort(); /* never happens */
+ xmove_fd(xopen("/dev/null", O_RDONLY), STDIN_FILENO);
/* Not a good idea, we won't see any error messages */
/* close(STDERR_FILENO); */
- setgroups(1, &pw->pw_gid);
- setregid(pw->pw_gid, pw->pw_gid);
- setreuid(uid, uid);
- setsid();
+ struct passwd* pw = getpwuid(uid);
+ gid_t gid = pw ? pw->pw_gid : uid;
+ setgroups(1, &gid);
+ xsetregid(gid, gid);
+ xsetreuid(uid, uid);
/* Nuke everything which may make setlocale() switch to non-POSIX locale:
* we need to avoid having gdb output in some obscure language.
@@ -251,7 +243,7 @@ static int rate_backtrace(const char *backtrace)
static void GetBacktrace(const char *pDebugDumpDir, std::string& pBacktrace)
{
- update_client(_("Getting backtrace..."));
+ update_client(_("Generating backtrace"));
std::string UID;
std::string executable;
@@ -549,7 +541,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
dd.LoadText(FILENAME_PACKAGE, package);
}
- update_client(_("Searching for debug-info packages..."));
+ update_client(_("Starting debuginfo installation"));
int pipein[2], pipeout[2];
xpipe(pipein);
@@ -611,8 +603,6 @@ Another application is holding the yum lock, cannot continue
safe_write(pipein[1], "y\n", sizeof("y\n")-1);
close(pipein[1]);
- update_client(_("Downloading and installing debug-info packages..."));
-
FILE *pipeout_fp = fdopen(pipeout[0], "r");
if (pipeout_fp == NULL) /* never happens */
{
@@ -676,7 +666,7 @@ Another application is holding the yum lock, cannot continue
*/
static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
{
- update_client(_("Searching for debug-info packages..."));
+ update_client(_("Starting debuginfo installation"));
int pipeout[2]; //TODO: can we use ExecVP?
xpipe(pipeout);
@@ -692,8 +682,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
{
close(pipeout[0]);
xmove_fd(pipeout[1], STDOUT_FILENO);
- close(STDIN_FILENO);
- xopen("/dev/null", O_RDONLY);
+ xmove_fd(xopen("/dev/null", O_RDONLY), STDIN_FILENO);
/* Not a good idea, we won't see any error messages */
/*close(STDERR_FILENO);*/
@@ -710,8 +699,6 @@ static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
close(pipeout[1]);
- update_client(_("Downloading and installing debug-info packages..."));
-
FILE *pipeout_fp = fdopen(pipeout[0], "r");
if (pipeout_fp == NULL) /* never happens */
{
@@ -860,8 +847,7 @@ static bool DebuginfoCheckPolkit(int uid)
if (child_pid == 0)
{
//child
- if (setuid(uid))
- exit(1); //paranoia
+ xsetreuid(uid, uid);
PolkitResult result = polkit_check_authorization(getpid(),
"org.fedoraproject.abrt.install-debuginfos");
exit(result != PolkitYes); //exit 1 (failure) if not allowed
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp
index 26b6ec41..b06edebb 100644
--- a/lib/Plugins/Mailx.cpp
+++ b/lib/Plugins/Mailx.cpp
@@ -57,9 +57,8 @@ static void exec_and_feed_input(uid_t uid, const char* pText, char **pArgs)
struct passwd* pw = getpwuid(uid);
gid_t gid = pw ? pw->pw_gid : uid;
setgroups(1, &gid);
- setregid(gid, gid);
- setreuid(uid, uid);
- setsid(); /* why? I propose removing this */
+ xsetregid(gid, gid);
+ xsetreuid(uid, uid);
execvp(pArgs[0], pArgs);
exit(1); /* exec failed */
diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp
index aa6d4124..06b6cde8 100644
--- a/lib/Plugins/TicketUploader.cpp
+++ b/lib/Plugins/TicketUploader.cpp
@@ -112,7 +112,7 @@ void CTicketUploader::SendFile(const char *pURL, const char *pFilename)
string wholeURL = concat_path_file(pURL, base);
int count = m_nRetryCount;
int result;
- do
+ while (1)
{
FILE* f = fopen(pFilename, "r");
if (!f)
@@ -144,9 +144,11 @@ void CTicketUploader::SendFile(const char *pURL, const char *pFilename)
{
update_client(_("Sending failed, trying again. %s"), curl_easy_strerror((CURLcode)result));
}
+ if (result == 0 || --count <= 0)
+ break;
+ /* retry the upload if not succesful, wait a bit before next try */
+ sleep(m_nRetryDelay);
}
- /*retry the upload if not succesful, wait a bit before next try*/
- while (result != 0 && --count != 0 && (sleep(m_nRetryDelay), 1));
if (count <= 0 && result != 0)
{
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp
index 0e57639b..8621b5f4 100644
--- a/lib/Utils/xfuncs.cpp
+++ b/lib/Utils/xfuncs.cpp
@@ -362,6 +362,18 @@ bool string_to_bool(const char *s)
return false;
}
+void xsetreuid(uid_t ruid, uid_t euid)
+{
+ if (setreuid(ruid, euid) != 0)
+ perror_msg_and_die("can't set %cid %d", 'u', (int)ruid);
+}
+
+void xsetregid(gid_t rgid, uid_t egid)
+{
+ if (setregid(rgid, egid) != 0)
+ perror_msg_and_die("can't set %cid %d", 'g', (int)rgid);
+}
+
uid_t getuidbyname(const char* login)
{
struct passwd* pwd = getpwnam(login);
diff --git a/po/de.po b/po/de.po
index 6907b664..18889efb 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4,7 +4,6 @@
# This file is distributed under the same license as the abrt package.
#
#
-#: ../src/Gui/CCReporterDialog.py:200
# Fabian Affolter <fab@fedoraproject.org>, 2009.
# Hedda Peters <hpeters@redhat.com>, 2009.
# Marcus Nitzschke <kenda@fedoraproject.org>, 2009.
@@ -13,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master.de\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-12-07 19:37+0000\n"
-"PO-Revision-Date: 2009-12-08 09:37+1000\n"
-"Last-Translator: Hedda Peters <hpeters@redhat.com>\n"
+"POT-Creation-Date: 2009-12-12 08:18+0000\n"
+"PO-Revision-Date: 2009-12-14 10:42+0100\n"
+"Last-Translator: Marcus Nitzschke <kenda@fedoraproject.org>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -29,9 +28,7 @@ msgstr "Ein anderer Client läuft bereits, versuche ihn zu wecken."
#: ../src/Gui/ABRTExceptions.py:13
msgid "Got unexpected data from daemon (is the database properly updated?)."
-msgstr ""
-"Unerwartete Daten vom Daemon erhalten (ist die Datenbank korrekt "
-"aktualisisert?)"
+msgstr "Unerwartete Daten vom Daemon erhalten (ist die Datenbank korrekt aktualisisert?)"
#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
@@ -53,11 +50,13 @@ msgstr "Datenbank-Plugins"
msgid "Plugin name is not set, can't load its settings"
msgstr "Plugin-Name nicht gesetzt, Einstellungen können nicht geladen werden."
-#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97
+#: ../src/Gui/CCDBusBackend.py:74
+#: ../src/Gui/CCDBusBackend.py:97
msgid "Can't connect to system dbus"
msgstr "Kann nicht mit System-Dbus verbinden"
-#: ../src/Gui/CCDBusBackend.py:104 ../src/Gui/CCDBusBackend.py:107
+#: ../src/Gui/CCDBusBackend.py:104
+#: ../src/Gui/CCDBusBackend.py:107
msgid "Please check if abrt daemon is running"
msgstr "Bitte überprüfen Sie, ob der abrt-Daemon läuft"
@@ -77,7 +76,8 @@ msgstr "(C) 2009 Red Hat, Inc."
msgid "About ABRT"
msgstr "Über ABRT"
-#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/abrt.desktop.in.h:1
+#: ../src/Gui/ccgui.glade.h:3
+#: ../src/Gui/abrt.desktop.in.h:1
msgid "Automatic Bug Reporting Tool"
msgstr "Automatic Bug Reporting Tool"
@@ -86,83 +86,74 @@ msgid "Delete"
msgstr "Löschen"
#: ../src/Gui/ccgui.glade.h:5
+msgid "Details"
+msgstr "Details"
+
+#: ../src/Gui/ccgui.glade.h:6
msgid "Not Reported"
msgstr "Nicht berichtet"
-#: ../src/Gui/ccgui.glade.h:6
+#: ../src/Gui/ccgui.glade.h:7
msgid "Please wait.."
msgstr "Bitte warten ..."
-#: ../src/Gui/ccgui.glade.h:7
+#: ../src/Gui/ccgui.glade.h:8
msgid "Plugins"
msgstr "Plugins"
-#: ../src/Gui/ccgui.glade.h:8 ../src/Gui/report.glade.h:5
+#: ../src/Gui/ccgui.glade.h:9
+#: ../src/Gui/report.glade.h:6
msgid "Report"
msgstr "Bericht"
-#: ../src/Gui/ccgui.glade.h:9
+#: ../src/Gui/ccgui.glade.h:10
msgid ""
-"This program is free software; you can redistribute it and/or modify it "
-"under the terms of the GNU General Public License as published by the Free "
-"Software Foundation; either version 2 of the License, or (at your option) "
-"any later version.\n"
+"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n"
"\n"
-"This program is distributed in the hope that it will be useful, but WITHOUT "
-"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
-"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
-"more details.\n"
+"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n"
"\n"
-"You should have received a copy of the GNU General Public License along with "
-"this program. If not, see <http://www.gnu.org/licenses/>."
+"You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>."
msgstr ""
-"Dieses Programm ist freie Software. Sie können es unter den Bedingungen der "
-"GNU General Public License, wie von der Free Software Foundation "
-"veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 2 "
-"der Lizenz oder (nach Ihrer Option) jeder späteren Version.\n"
+"Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 2 der Lizenz oder (nach Ihrer Option) jeder späteren Version.\n"
"\n"
-"Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen "
-"von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die "
-"implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN "
-"BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.\n"
+"Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.\n"
"\n"
-"Sie sollten ein Exemplar der GNU General Public License zusammen mit diesem "
-"Programm erhalten haben. Falls nicht, siehe <http://www.gnu.org/licenses/>."
+"Sie sollten ein Exemplar der GNU General Public License zusammen mit diesem Programm erhalten haben. Falls nicht, siehe <http://www.gnu.org/licenses/>."
-#: ../src/Gui/ccgui.glade.h:14
+#: ../src/Gui/ccgui.glade.h:15
msgid "_Edit"
msgstr "_Bearbeiten"
-#: ../src/Gui/ccgui.glade.h:15
+#: ../src/Gui/ccgui.glade.h:16
msgid "_File"
msgstr "_Datei"
-#: ../src/Gui/ccgui.glade.h:16
+#: ../src/Gui/ccgui.glade.h:17
msgid "_Help"
msgstr "_Hilfe"
#. add pixbuff separatelly
-#: ../src/Gui/CCMainWindow.py:70
+#: ../src/Gui/CCMainWindow.py:71
msgid "Icon"
msgstr "Symbol"
-#: ../src/Gui/CCMainWindow.py:78
+#: ../src/Gui/CCMainWindow.py:79
msgid "Package"
msgstr "Paket"
-#: ../src/Gui/CCMainWindow.py:79
+#: ../src/Gui/CCMainWindow.py:80
msgid "Application"
msgstr "Anwendung"
-#: ../src/Gui/CCMainWindow.py:80
+#: ../src/Gui/CCMainWindow.py:81
msgid "Date"
msgstr "Datum"
-#: ../src/Gui/CCMainWindow.py:81
+#: ../src/Gui/CCMainWindow.py:82
msgid "Crash count"
msgstr "Absturz-Anzahl"
-#: ../src/Gui/CCMainWindow.py:82
+#: ../src/Gui/CCMainWindow.py:83
msgid "User"
msgstr "Benutzer"
@@ -173,7 +164,7 @@ msgid ""
"%s"
msgstr "Der Einstellungsdialog %s kann nicht angezeigt werden"
-#: ../src/Gui/CCMainWindow.py:170
+#: ../src/Gui/CCMainWindow.py:160
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -183,7 +174,7 @@ msgstr ""
"%s"
#. there is something wrong with the daemon if we cant get the dumplist
-#: ../src/Gui/CCMainWindow.py:188
+#: ../src/Gui/CCMainWindow.py:184
#, python-format
msgid ""
"Error while loading the dumplist.\n"
@@ -192,15 +183,15 @@ msgstr ""
"Fehler beim Laden der Dump-Liste.\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:225
-msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
-msgstr "<b>Dieser Absturz wurde gemeldet, der Bericht befindet sich unter:</b>\n"
+#: ../src/Gui/CCMainWindow.py:221
+msgid "<b>This crash has been reported:</b>\n"
+msgstr "<b>Dieser Absturz wurde gemeldet:</b>\n"
-#: ../src/Gui/CCMainWindow.py:233
+#: ../src/Gui/CCMainWindow.py:231
msgid "<b>Not reported!</b>"
msgstr "<b>Nicht berichtet!</b>"
-#: ../src/Gui/CCMainWindow.py:282
+#: ../src/Gui/CCMainWindow.py:280
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -208,7 +199,7 @@ msgstr ""
"Konnte Bericht nicht abrufen!\n"
"Fehlt Debuginfo?"
-#: ../src/Gui/CCMainWindow.py:301
+#: ../src/Gui/CCMainWindow.py:299
#, python-format
msgid ""
"Reporting failed!\n"
@@ -217,12 +208,13 @@ msgstr ""
"Berichterstellung fehlgeschlagen!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:319 ../src/Gui/CCMainWindow.py:345
+#: ../src/Gui/CCMainWindow.py:318
+#: ../src/Gui/CCMainWindow.py:345
#, python-format
msgid "Error getting the report: %s"
msgstr "Fehler beim Abrufen des Berichts: %s"
-#: ../src/Gui/CCReporterDialog.py:128
+#: ../src/Gui/CCReporterDialog.py:136
#, python-format
msgid ""
"Can't save plugin settings:\n"
@@ -231,47 +223,44 @@ msgstr ""
"Plugin-Einstellungen konnten nicht gesichert werden:\n"
"%s"
-#: ../src/Gui/CCReporterDialog.py:186
+#: ../src/Gui/CCReporterDialog.py:194
msgid "Brief description how to reproduce this or what you did..."
msgstr "Kurze Beschreibung, wie dies reproduziert werden kann bzw. was Sie taten ..."
-#: ../src/Gui/CCReporterDialog.py:231
+#: ../src/Gui/CCReporterDialog.py:239
#, python-format
msgid ""
"Reporting disabled because the backtrace is unusable.\n"
-"Please try to install debuginfo manually using command: <b>debuginfo-install "
-"%s</b> \n"
+"Please try to install debuginfo manually using command: <b>debuginfo-install %s</b> \n"
"then use Refresh button to regenerate the backtrace."
msgstr ""
"Berichterstellung deaktiviert, da der Backtrace unbrauchbar ist.\n"
-"Bitte versuchen Sie, Debuginfo mittels folgendem Befehl manuell zu installieren:<b>debuginfo-install "
-"%s</b> \n"
+"Bitte versuchen Sie, Debuginfo mittels folgendem Befehl manuell zu installieren:<b>debuginfo-install %s</b> \n"
"nutzen Sie dann die Aktualisieren-Schaltfläche, um den Backtrace erneut zu generieren."
-#: ../src/Gui/CCReporterDialog.py:233
+#: ../src/Gui/CCReporterDialog.py:241
msgid "The backtrace is unusable, you can't report this!"
msgstr "Der Backtrace ist unbrauchbar, Sie können dies nicht berichten!"
-#: ../src/Gui/CCReporterDialog.py:240
-msgid ""
-"The backtrace is incomplete, please make sure you provide good steps to "
-"reproduce."
-msgstr ""
-"Der Backtrace ist unvollständig, bitte stellen Sie sicher, dass alle "
-"Schritte zum Reproduzieren vorhanden sind."
+#: ../src/Gui/CCReporterDialog.py:246
+msgid "The backtrace is incomplete, please make sure you provide good steps to reproduce."
+msgstr "Der Backtrace ist unvollständig, bitte stellen Sie sicher, dass alle Schritte zum Reproduzieren vorhanden sind."
-#: ../src/Gui/CCReporterDialog.py:290
+#: ../src/Gui/CCReporterDialog.py:296
#, python-format
msgid ""
-"<b>WARNING</b>, you're about to send data which might contain sensitive "
-"information.\n"
+"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
"Do you really want to send <b>%s</b>?\n"
msgstr ""
-"<b>WARNUNG</b>, Sie sind im Begriff, möglicherweise sensible Daten zu "
-"senden.\n"
+"<b>WARNUNG</b>, Sie sind im Begriff, möglicherweise sensible Daten zu senden.\n"
"Möchten Sie wirklich senden<b>%s</b>?\n"
#: ../src/Gui/dialogs.glade.h:1
+#: ../src/Gui/report.glade.h:5
+msgid "Log"
+msgstr "Log"
+
+#: ../src/Gui/dialogs.glade.h:2
msgid "Report done"
msgstr "Bericht fertiggestellt"
@@ -285,7 +274,8 @@ msgstr "Kann PluginDialog-Widget nicht in UI-Beschreibung finden!"
msgid "No UI for plugin %s"
msgstr "Kein UI für Plugin %s"
-#: ../src/Gui/PluginSettingsUI.py:55 ../src/Gui/PluginSettingsUI.py:81
+#: ../src/Gui/PluginSettingsUI.py:55
+#: ../src/Gui/PluginSettingsUI.py:81
msgid "combo box is not implemented"
msgstr "Combo-Box ist nicht implementiert"
@@ -302,18 +292,19 @@ msgid "<b>Comment</b>"
msgstr "<b>Kommentar</b>"
#: ../src/Gui/report.glade.h:3
-msgid "<b>Following items will be send</b>"
-msgstr "<b>Das folgende wird gesendet</b> "
+msgid "<b>Following items will be sent</b>"
+msgstr "<b>Folgendes wird gesendet werden</b> "
#: ../src/Gui/report.glade.h:4
msgid "<b>How to reproduce (in a few simple steps)</b>"
msgstr "<b>Wie kann der Fehler wieder erzeugt werden (in einfachen Schritten)</b>"
-#: ../src/Gui/report.glade.h:6
+#: ../src/Gui/report.glade.h:7
msgid "Send"
msgstr "Senden"
-#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Plugin wählen</b>"
@@ -434,7 +425,7 @@ msgstr "Anwendungsabstürze einsehen und berichten"
msgid "A crash in package %s has been detected"
msgstr "In Paket %s wurde ein Absturz entdeckt!"
-#: ../src/Applet/Applet.cpp:253
+#: ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "ABRT-Dienst wird nicht ausgeführt."
@@ -442,13 +433,9 @@ msgstr "ABRT-Dienst wird nicht ausgeführt."
msgid "Warning"
msgstr "Warnung"
-#: ../src/Daemon/Daemon.cpp:467
-msgid ""
-"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
-"value in abrt.conf."
-msgstr ""
-"Berichtgröße überschreitet die maximale Größe. Bitte überprüfen Sie Ihren "
-"MaxCrashReportsSize-Wert in abrt.conf."
+#: ../src/Daemon/Daemon.cpp:473
+msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
+msgstr "Berichtgröße überschreitet die maximale Größe. Bitte überprüfen Sie Ihren MaxCrashReportsSize-Wert in abrt.conf."
#: ../lib/Plugins/Bugzilla.cpp:202
#, c-format
@@ -492,26 +479,22 @@ msgstr "Rufe lokale, universelle, eindeutige Identifikation ab"
msgid "Getting backtrace..."
msgstr "Backtrace abrufen ..."
-#: ../lib/Plugins/CCpp.cpp:380
+#: ../lib/Plugins/CCpp.cpp:382
msgid "Searching for debug-info packages..."
msgstr "debug-info-Pakete suchen ..."
-#: ../lib/Plugins/CCpp.cpp:414
+#: ../lib/Plugins/CCpp.cpp:416
msgid "Downloading and installing debug-info packages..."
msgstr "debug-info-Pakete herunterladen und installieren ..."
-#: ../lib/Plugins/CCpp.cpp:522
+#: ../lib/Plugins/CCpp.cpp:524
msgid "Getting local universal unique identification..."
msgstr "Lokale, universelle, eindeutige Identifikation abrufen ..."
-#: ../lib/Plugins/CCpp.cpp:541
+#: ../lib/Plugins/CCpp.cpp:543
msgid "Getting global universal unique identification..."
msgstr "Globale, universelle, eindeutige Identifikation abrufen ..."
-#: ../lib/Plugins/CCpp.cpp:658
-msgid "Starting report creation..."
-msgstr "Berichterstellung beginnen ..."
-
#: ../lib/Plugins/CCpp.cpp:691
msgid "Skipping debuginfo installation"
msgstr "debuginfo-Installation wird übersprungen"
@@ -520,11 +503,13 @@ msgstr "debuginfo-Installation wird übersprungen"
msgid "Creating and submitting a report..."
msgstr "Einen Bericht erstellen und einreichen ..."
-#: ../lib/Plugins/Logger.cpp:66
-msgid "Creating a report..."
-msgstr "Einen Bericht erstellen ..."
+#: ../lib/Plugins/Logger.cpp:82
+#, c-format
+msgid "Writing report to '%s'"
+msgstr "Bericht wird nach '%s' geschrieben"
-#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:384
+#: ../lib/Plugins/FileTransfer.cpp:63
+#: ../lib/Plugins/FileTransfer.cpp:384
msgid "FileTransfer: URL not specified"
msgstr "Dateiübertragung: URL nicht angegeben"
@@ -568,3 +553,8 @@ msgstr "sosreport ausführen: %s"
msgid "done running sosreport"
msgstr "Ausführung von sosreport abgeschlossen"
+#~ msgid "Starting report creation..."
+#~ msgstr "Berichterstellung beginnen ..."
+#~ msgid "Creating a report..."
+#~ msgstr "Einen Bericht erstellen ..."
+
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 3971a2cc..c6cae5de 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -623,14 +623,11 @@ static void run_main_loop(GMainLoop* loop)
static void start_syslog_logging()
{
/* Open stdin to /dev/null */
- close(STDIN_FILENO);
- xopen("/dev/null", O_RDWR);
+ xmove_fd(xopen("/dev/null", O_RDWR), STDIN_FILENO);
/* We must not leave fds 0,1,2 closed.
* Otherwise fprintf(stderr) dumps messages into random fds, etc. */
- close(STDOUT_FILENO);
- close(STDERR_FILENO);
- xdup(0);
- xdup(0);
+ xdup2(STDIN_FILENO, STDOUT_FILENO);
+ xdup2(STDIN_FILENO, STDERR_FILENO);
openlog("abrtd", 0, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
}
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 5235c172..b597a411 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -575,29 +575,35 @@ static mw_result_t SavePackageDescriptionToDebugDump(const char *pExecutable,
}
else
{
- package = GetPackage(pExecutable);
+ char *rpm_pkg = GetPackage(pExecutable);
+ if (rpm_pkg == NULL)
+ {
+ log("Executable '%s' doesn't belong to any package", pExecutable);
+ return MW_PACKAGE_ERROR;
+ }
+
+ package = rpm_pkg;
packageName = package.substr(0, package.rfind("-", package.rfind("-") - 1));
- if (packageName == "" ||
- (g_setBlackList.find(packageName) != g_setBlackList.end()))
+ VERB2 log("Package:'%s' short:'%s'", rpm_pkg, packageName.c_str());
+ free(rpm_pkg);
+
+ if (g_setBlackList.find(packageName) != g_setBlackList.end())
{
- if (packageName == "")
- {
- error_msg("Executable doesn't belong to any package");
- return MW_PACKAGE_ERROR;
- }
- log("Blacklisted package");
+ log("Blacklisted package '%s'", packageName.c_str());
return MW_BLACKLISTED;
}
if (g_settings_bOpenGPGCheck)
{
if (!s_RPM.CheckFingerprint(packageName.c_str()))
{
- error_msg("package isn't signed with proper key");
+ log("Package '%s' isn't signed with proper key", packageName.c_str());
return MW_GPG_ERROR;
}
if (!CheckHash(packageName.c_str(), pExecutable))
{
- error_msg("executable has bad hash");
+ error_msg("Executable '%s' seems to be modified, "
+ "doesn't match one from package '%s'",
+ pExecutable, packageName.c_str());
return MW_GPG_ERROR;
}
}
diff --git a/src/Daemon/RPM.cpp b/src/Daemon/RPM.cpp
index b3cf2c1c..6f05c0b9 100644
--- a/src/Daemon/RPM.cpp
+++ b/src/Daemon/RPM.cpp
@@ -100,16 +100,12 @@ bool CheckHash(const char* pPackage, const char* pPath)
if (strcmp(pPath, rpmfiFN(fi)) == 0)
{
headerHash = rpmfiFDigestHex(fi, &hashAlgo);
+ rpmDoDigest(hashAlgo, pPath, 1, (unsigned char*) computedHash, NULL);
+ ret = (headerHash != "" && headerHash == computedHash);
+ break;
}
}
rpmfiFree(fi);
-
- rpmDoDigest(hashAlgo, pPath, 1, (unsigned char*) computedHash, NULL);
-
- if (headerHash != "" && headerHash == computedHash)
- {
- ret = true;
- }
}
rpmdbFreeIterator(iter);
rpmtsFree(ts);
@@ -118,7 +114,7 @@ bool CheckHash(const char* pPackage, const char* pPath)
std::string GetDescription(const char* pPackage)
{
- std::string pDescription = "";
+ std::string pDescription;
rpmts ts = rpmtsCreate();
rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_NAME, pPackage, 0);
Header header = rpmdbNextIterator(iter);
@@ -139,7 +135,7 @@ std::string GetDescription(const char* pPackage)
std::string GetComponent(const char* pFileName)
{
- std::string ret = "";
+ std::string ret;
rpmts ts = rpmtsCreate();
rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_BASENAMES, pFileName, 0);
Header header = rpmdbNextIterator(iter);
@@ -161,20 +157,15 @@ std::string GetComponent(const char* pFileName)
return ret;
}
-std::string GetPackage(const char* pFileName)
+char* GetPackage(const char* pFileName)
{
- std::string ret = "";
+ char* ret = NULL;
rpmts ts = rpmtsCreate();
rpmdbMatchIterator iter = rpmtsInitIterator(ts, RPMTAG_BASENAMES, pFileName, 0);
Header header = rpmdbNextIterator(iter);
if (header != NULL)
{
- char* nerv = headerGetNEVR(header, NULL);
- if (nerv != NULL)
- {
- ret = nerv;
- free(nerv);
- }
+ ret = headerGetNEVR(header, NULL);
}
rpmdbFreeIterator(iter);
diff --git a/src/Daemon/RPM.h b/src/Daemon/RPM.h
index 67cd4a29..fed5e43d 100644
--- a/src/Daemon/RPM.h
+++ b/src/Daemon/RPM.h
@@ -82,9 +82,9 @@ std::string GetDescription(const char* pPackage);
* file. If the file doesn't belong to any package, empty string is
* returned.
* @param pFileName A file name.
- * @return A package name.
+ * @return A package name (malloced string)
*/
-std::string GetPackage(const char* pFileName);
+char* GetPackage(const char* pFileName);
/**
* Finds a main package for given file. This package contains particular
* file. If the file doesn't belong to any package, empty string is
diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf
index ee034a6c..0a5cdc40 100644
--- a/src/Daemon/abrt.conf
+++ b/src/Daemon/abrt.conf
@@ -4,7 +4,8 @@
[ Common ]
# With this option set to "yes",
# only crashes in signed packages will be analyzed.
-OpenGPGCheck = yes
+# uses prelink which can be dangerous, and it's disallowed by SELinux
+OpenGPGCheck = no
# GPG keys
OpenGPGPublicKeys = /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
# Blacklisted packages
diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp
index fdb31a5c..fd789cfb 100644
--- a/src/Hooks/CCpp.cpp
+++ b/src/Hooks/CCpp.cpp
@@ -216,7 +216,7 @@ int main(int argc, char** argv)
/* not an error, exit silently */
return 0;
}
- if (pid <= 0 || uid < 0)
+ if (pid <= 0 || (int)uid < 0)
{
error_msg_and_die("pid '%s' or uid '%s' are bogus", argv[2], argv[4]);
}
@@ -450,9 +450,14 @@ int main(int argc, char** argv)
create_user_core:
/* Write a core file for user */
+ struct passwd* pw = getpwuid(uid);
+ gid_t gid = pw ? pw->pw_gid : uid;
+ setgroups(1, &gid);
+ xsetregid(gid, gid);
+ xsetreuid(uid, uid);
+
errno = 0;
- if (setuid(uid) != 0
- || user_pwd == NULL
+ if (user_pwd == NULL
|| chdir(user_pwd) != 0
) {
perror_msg_and_die("can't cd to %s", user_pwd);