diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-10-29 15:20:56 +0100 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-10-29 15:20:56 +0100 |
commit | 7f10181be367d77e5f3203e938ab24cf722119df (patch) | |
tree | 2c5f02ed0e9174bc3483aee3d0b84f860c314aef /src/Applet | |
parent | ad158666b7a144d557a9476408766a7bbf7ace9d (diff) | |
download | abrt-7f10181be367d77e5f3203e938ab24cf722119df.tar.gz abrt-7f10181be367d77e5f3203e938ab24cf722119df.tar.xz abrt-7f10181be367d77e5f3203e938ab24cf722119df.zip |
Normal user can see kerneloops and report it
Bugzilla memory leaks fix
Diffstat (limited to 'src/Applet')
-rw-r--r-- | src/Applet/Applet.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index 9d7be5fc..c2d5467d 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -20,6 +20,7 @@ #include <dbus/dbus-shared.h> #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> +#include <limits.h> #if HAVE_CONFIG_H #include <config.h> #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"); |