summaryrefslogtreecommitdiffstats
path: root/src/Hooks/abrt-pyhook-helper.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-11-12 16:58:07 +0100
committerKarel Klic <kklic@redhat.com>2009-11-12 16:58:07 +0100
commit32cee84a34c005fe0d2863f439007ec633687fa8 (patch)
tree149ca7014e4295de3788f28ae88e9d9d7003da46 /src/Hooks/abrt-pyhook-helper.cpp
parent5a8a8a6c99c9067e0dfcce839c32826a2badff0b (diff)
parent3938e6e075867ae3a349ba307ee672aa458d2662 (diff)
downloadabrt-32cee84a34c005fe0d2863f439007ec633687fa8.tar.gz
abrt-32cee84a34c005fe0d2863f439007ec633687fa8.tar.xz
abrt-32cee84a34c005fe0d2863f439007ec633687fa8.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/Hooks/abrt-pyhook-helper.cpp')
-rw-r--r--src/Hooks/abrt-pyhook-helper.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Hooks/abrt-pyhook-helper.cpp b/src/Hooks/abrt-pyhook-helper.cpp
index 8a5a1914..08ccc125 100644
--- a/src/Hooks/abrt-pyhook-helper.cpp
+++ b/src/Hooks/abrt-pyhook-helper.cpp
@@ -20,6 +20,7 @@
*/
#include <getopt.h>
+#include <unistd.h>
/* We can easily get rid of abrtlib (libABRTUtils.so) usage in this file,
* but DebugDump will pull it in anyway */
#include "abrtlib.h"
@@ -34,7 +35,6 @@ static char *pid;
static char *executable;
static char *uuid;
static char *cmdline;
-static char *loginuid;
int main(int argc, char** argv)
{
@@ -45,7 +45,6 @@ int main(int argc, char** argv)
{ "executable", required_argument, NULL, 'e' },
{ "uuid" , required_argument, NULL, 'u' },
{ "cmdline" , required_argument, NULL, 'c' },
- { "loginuid" , required_argument, NULL, 'l' },
{ 0 },
};
int opt;
@@ -65,9 +64,6 @@ int main(int argc, char** argv)
case 'c':
cmdline = optarg;
break;
- case 'l':
- loginuid = optarg;
- break;
default:
usage:
error_msg_and_die(
@@ -77,7 +73,6 @@ int main(int argc, char** argv)
" -p,--executable PATH absolute path to the program that crashed\n"
" -u,--uuid UUID hash generated from the backtrace\n"
" -c,--cmdline TEXT command line of the crashed program\n"
- " -l,--loginuid UID login UID\n"
);
}
}
@@ -112,8 +107,11 @@ int main(int argc, char** argv)
dd.SaveText("cmdline", cmdline);
if (uuid)
dd.SaveText("uuid", uuid);
- if (loginuid)
- dd.SaveText("uid", loginuid);
+
+ char uid[sizeof(int) * 3 + 2];
+ sprintf(uid, "%d", (int)getuid());
+ dd.SaveText("uid", uid);
+
dd.SaveText("backtrace", bt);
free(bt);
dd.Close();