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/CCApplet.cpp | |
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/CCApplet.cpp')
-rw-r--r-- | src/Applet/CCApplet.cpp | 9 |
1 files changed, 7 insertions, 2 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 { |