summaryrefslogtreecommitdiffstats
path: root/src/daemon
Commit message (Collapse)AuthorAgeFilesLines
* btparser integration: merge it into ABRT's directory hierarchyKarel Klic2010-10-142-4/+4
|
* btparser integration: sync with recent UUID changeKarel Klic2010-10-141-2/+2
|
* btparser initial integrationKarel Klic2010-10-142-83/+66
|
* move uuid generation for CCpp to a separate program (abrt-action-analyze-c)Denys Vlasenko2010-10-142-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | | This patch splits off uuid generation for CCpp to a separate program: Usage: abrt-action-analyze-c [-v] -d DIR Calculates and saves UUID -v, --verbose be verbose -d DIR Crash dump directory Run tested. Thus, now entire cycle of coredump processing/reporting consists of external programs: abrt-action-analyze-c abrt-action-save-package-data abrt-action-install-debuginfo abrt-action-generate-backtrace abrt-action-bugzilla Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* restore abrt-action-save-package-data's description in --helpDenys Vlasenko2010-10-131-4/+9
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* trivial cleanupsDenys Vlasenko2010-10-131-4/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Add a warning comment that options and their enums should be in syncDenys Vlasenko2010-10-124-18/+11
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Return a bitmask of found options from parse_opts()Denys Vlasenko2010-10-124-50/+49
| | | | | | | | | | | | | This patch makes it easier to analyze "bool" type options - now they are all just bits in a single return value, no need to have an integer variable for each option. The previous behavior is retained too: it is useful for "cumulative" options like -vvv. The patch also removes all OPT_GROUPs. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* move bugzilla reporting to a separate program (abrt-action-bugzilla)Denys Vlasenko2010-10-112-190/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits off Bugzilla plugin's bugzilla submission generation into a separate tool: abrt-action-bugzilla: invalid option -- 'z' Usage: abrt-action-bugzilla -c CONFFILE -d DIR [-vs] Report a crash to Bugzilla Options: -c FILE Configuration file (may be given many times) -d DIR Crash dump directory -v Verbose -s Log to syslog This change is bigger than previous similar patches: I needed to find a way to pass settings to the child and get back reporting result - all without breaking current interface. I decided to pass configuration via -c CONFFILE: (1) it is trivial to pass /etc/abrt/bugzilla.conf to it, and (2) I can use "-c -" to parse config from stdin. abrtd simply write per-reporting settings to child's stdin. The log and reporting result (success/failure) is taken from child's stdout. After a few more such patches, we can remove XMLRPC and HTTP code and library dependencies from abrtd. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* move load_crash_data_from_debug_dump from MiddleWare to CrashTypesDenys Vlasenko2010-10-111-123/+0
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* preparatory patch with trivial changes onlyDenys Vlasenko2010-10-111-5/+5
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* adding abrt-action-bugzilla.cpp as an exact copy of Bugzilla.cppDenys Vlasenko2010-10-111-0/+989
| | | | | | | | The mext commit will be much more readable: insted of huge insert, you will actually see that there are very few changes to actual bz code in that file. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* s/CD_DUPHASH/FILENAME_DUPHASH/gDenys Vlasenko2010-10-112-4/+4
| | | | | | | This is needed to make duplicate hash visible for separate programs looking at crash dumps. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrt-action-generate-backtrace.c: fix -i optionNikola Pajkovsky2010-10-081-1/+1
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* Remove arrays in usage text, use a single string insteadDenys Vlasenko2010-10-084-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | Currently, usage is an array of pointers to string. It is meant to support this: usage: foo --bar or: foo --baz or: foo -z The patch removes this and makes usage just a string: usage: foo --bar Why remove this? (1) We can achieve old format by using the usage string with many lines: usage = "foo --bar\n" " or: foo --baz\n" " or: foo -z"; (2) We don't use multi-line usage anyway. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* add --help option in parse_opts(), not at every call site.Denys Vlasenko2010-10-084-38/+26
| | | | | | | This patch removes the need to add --help option to every program. It is added (and handled) by parse_opts(). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* use OPT_GROUP macro for help optionNikola Pajkovsky2010-10-084-0/+4
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* use OPT__VERBOSE macro for help optionNikola Pajkovsky2010-10-084-4/+4
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* use OPT__HELP macro for help optionNikola Pajkovsky2010-10-084-4/+4
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* abrt-server uses new parserNikola Pajkovsky2010-10-071-30/+23
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* abrt-action-save-package-data uses new parserNikola Pajkovsky2010-10-071-33/+26
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* use a new INTEGER optionNikola Pajkovsky2010-10-071-11/+1
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* abrt-action-generate-backtrace uses new parserNikola Pajkovsky2010-10-071-47/+34
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* Settings.cpp: avoid double free corruptionNikola Pajkovsky2010-10-061-0/+5
| | | | | | | | | | | | I meant, that settings_free() should not only do free(g_settings_*); but also should do g_settings_* = NULL; Otherwise calling settings_free() twice will cause double-free and likely segfault. Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* Daemon.cpp: FindNewDumps() uses GListNikola Pajkovsky2010-10-061-6/+12
| | | | | | transform vector_string_t to GList Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* Merge branch 'settings'Nikola Pajkovsky2010-10-056-58/+87
|\ | | | | | | | | | | | | | | | | * settings: g_settings_sWatchCrashdumpArchiveDir uses char* g_settings_sDatabase uses char* g_settings_setBlackListedPaths uses GList g_settings_setBlackListedPkgs uses GList g_settings_setOpenGPGPublicKeys uses GList
| * g_settings_sWatchCrashdumpArchiveDir uses char*Nikola Pajkovsky2010-09-243-7/+9
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
| * g_settings_sDatabase uses char*Nikola Pajkovsky2010-09-244-15/+20
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
| * g_settings_setBlackListedPaths uses GListNikola Pajkovsky2010-09-243-33/+10
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
| * g_settings_setBlackListedPkgs uses GListNikola Pajkovsky2010-09-243-6/+39
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
| * g_settings_setOpenGPGPublicKeys uses GListNikola Pajkovsky2010-09-244-7/+19
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* | parse_options.c: add argument helpNikola Pajkovsky2010-10-051-1/+1
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* | Daemon.cpp: remove getopt and use parse_opts insteadNikola Pajkovsky2010-10-041-31/+34
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* | Daemon.cpp: remove unused rpm.hNikola Pajkovsky2010-09-301-1/+0
|/ | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* rename abrt-debuginfo-install to abrt-action-install-debuginfoDenys Vlasenko2010-09-232-4/+6
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove unused codeNikola Pajkovsky2010-09-232-12/+0
| | | | | | code is run in abrt-action-save-package-data.cpp Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* This patch splits off abrtd's package/component/descriptionDenys Vlasenko2010-09-225-263/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | generation into a separate tool: abrt-action-save-package-data: invalid option -- 'z' Usage: abrt-action-save-package-data -d DIR [-vs] Query package database and save package name, component, and description Options: -d DIR Crash dump directory -v Verbose -s Log to syslog This also allows for debugging and regression testing of abrt-action-save-package-data - it can be simply run from command-line. Also it provides a better fault isolation - crash in abrt-action-save-package-data does not take down abrtd. Same goes for isolation of memory leaks - old code actually had leaks on a rarely used error path. New code doesn't, but if it would have, it wouldn't matter, since the process is short-lived. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* add two flags to dd_opendir()Nikola Pajkovsky2010-09-222-39/+21
| | | | | | | | | | | | | | | | | | | DD_CLOSE_ON_OPEN_ERR - free dump_dir structure when opening dump_dir does not exist DD_FAIL_QUIETLY - suppress message when dump directory does not exist VERB1 log(_("Unable to open debug dump '%s'"), pDebugDumpDir); is all removed because there is error_msg("'%s' does not exist", dd->dd_dir); in dd_opendir() which sometimes we don't want to print(DD_FAIL_QUIETLY) example: crash dump directory trimming code running concurrently. Second process may try to delete a directory which is already gone. it should not complain that it is missing. Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com> Acked-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* eliminate LoadOpenGPGPublicKey wrapperDenys Vlasenko2010-09-224-11/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* fix a small memory leakDenys Vlasenko2010-09-211-1/+3
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* This patch splits off CCpp's backtrace generation into a separate tool:Denys Vlasenko2010-09-202-1/+447
| | | | | | | | | | | | | | | | | | | | | | | | | | | $ abrt-action-generate-backtrace -z abrt-action-generate-backtrace: invalid option -- 'z' Usage: abrt-action-generate-backtrace -d DIR [-i DIR1:DIR2] [-t SECONDS] [-vs] Generate backtrace, its quality rating, hash, and crashed function Options: -d DIR Crash dump directory -i DIR1:DIR2 Additional debuginfo directories -t SECONDS Kill gdb if it runs for more than SECONDS -v Verbose -s Log to syslog This also allows for debugging and regression testing of abrt-action-generate-backtrace separately - it can be simply run from command-line. Also it provides a better fault isolation - crash in abrt-action-generate-backtrace does not take down abrtd. The code is based on CCpp.cpp. CCpp analyzer is made to spawn a child to do the backtrace generation. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* unhide dump_dir structure from typedefNikola Pajkovsky2010-09-202-9/+9
| | | | | | no other code changes Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* perror has to be used immediately after failed syscallDenys Vlasenko2010-09-161-1/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Pure file rename without changesDenys Vlasenko2010-09-141-0/+0
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* This patch makes abrtd spawn a new process, abrt-server,Denys Vlasenko2010-09-144-488/+371
| | | | | | | | | | | | | | | | | | | | | | | | | for every socket client. This allows for simpler timeout handling using SIGALRM, and makes timers for tracking client timeouts unnecessary. This also allows for debugging and regression testing of abrt-server separately - it can be simply run from command-line and fed commands on stdin. Also it provides a better fault isolation - crash in abrt-server does not take down abrtd. The code is based on dumpsocket.{cpp,h}. Most of dumpsocket.cpp goes to abrt-server.c, a small part goes to Daemon.cpp (i.e. to abrtd). This change will not compile - it does not have dumpsocket.cpp renamed to abrt-server.c, which makes the change easier to read. The next change, which I'll commit after this one, contains only the renaming. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* msg_prefix now doesn't need ": " suffixDenys Vlasenko2010-09-142-5/+5
| | | | | | Contains some other trivial changes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* MiddleWare.cpp: remove unused variablesNikola Pajkovsky2010-09-081-5/+0
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* add forgotten database disconnect on error pathDenys Vlasenko2010-09-081-7/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* SQLite3.cpp: replace std::vector by GListNikola Pajkovsky2010-09-082-41/+72
| | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com> Acked-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* DebugDump.* -> dump_dir.*Nikola Pajkovsky2010-09-074-4/+0
| | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com> Acked-off-by: Jiri Moskovcak <jmoskovc@redhat.com>