From 7f10181be367d77e5f3203e938ab24cf722119df Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Thu, 29 Oct 2009 15:20:56 +0100 Subject: Normal user can see kerneloops and report it Bugzilla memory leaks fix --- src/Applet/Applet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Applet/Applet.cpp') diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index 9d7be5f..c2d5467 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #if HAVE_CONFIG_H #include #endif @@ -63,9 +64,13 @@ static void Crash(DBusMessage* signal) //if (m_pSessionDBus->has_name("com.redhat.abrt.gui")) // return; - uid_t uid_num = atoi(uid_str); +// uid_t uid_num = atol(uid_str); - if (uid_num != getuid()) + char* endptr; + uid_t uid_num = (uid_t)strtoul(uid_str,&endptr, 10); + + printf("%u:%s\n", uid_num, uid_str); + if ((uid_num != getuid()) && (uid_num != UINT_MAX)) return; const char* message = _("A crash in package %s has been detected"); -- cgit