diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-08-26 15:35:50 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-08-26 15:35:50 +0200 |
commit | 556a4b3df4f116965e8dc46c08ac5e720834022e (patch) | |
tree | 863dd4d67b2ace8b6b95e2157cce8b2be3076763 /src/Applet | |
parent | de7e5c9866603aed5f7b9c3ba6986a7ff1d37028 (diff) | |
download | abrt-556a4b3df4f116965e8dc46c08ac5e720834022e.tar.gz abrt-556a4b3df4f116965e8dc46c08ac5e720834022e.tar.xz abrt-556a4b3df4f116965e8dc46c08ac5e720834022e.zip |
resolved: Bug 518420 - ordinary user's abrt-applet shows up for root owned crashes
Diffstat (limited to 'src/Applet')
-rw-r--r-- | src/Applet/CCApplet.cpp | 9 | ||||
-rw-r--r-- | src/Applet/CCApplet.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index 8f01133e..187cce35 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -94,11 +94,16 @@ CApplet::~CApplet() } /* dbus related */ -void CApplet::Crash(std::string &value) +void CApplet::Crash(const std::string& progname, const std::string& uid ) { if (m_pCrashHandler) { - m_pCrashHandler(value.c_str()); + std::istringstream input_string(uid); + uid_t num; + input_string >> num; + + if( (num == getuid()) ) + m_pCrashHandler(progname.c_str()); } else { diff --git a/src/Applet/CCApplet.h b/src/Applet/CCApplet.h index faf89d10..ff6be8e5 100644 --- a/src/Applet/CCApplet.h +++ b/src/Applet/CCApplet.h @@ -73,7 +73,7 @@ class CApplet static void onHide_cb(GtkMenuItem *menuitem, gpointer applet); private: /* dbus stuff */ - void Crash(std::string &value); + void Crash(const std::string& progname, const std::string& uid); /* the real signal handler called to handle the signal */ void (*m_pCrashHandler)(const char *progname); |