diff options
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); |