summaryrefslogtreecommitdiffstats
path: root/src/daemon/Daemon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fixes for missing uid caseDenys Vlasenko2011-03-251-1/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove FILENAME_INFORMALL and tighten up some loose endsDenys Vlasenko2011-03-251-10/+0
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* make $ABRT_PROG_PREFIX control whether log messages are prefixedDenys Vlasenko2011-03-251-2/+7
| | | | | | | | | | by abrt-action-foo programs. abrtd, abrt-server and abrt-handle-crashdump now have option -p which sets ABRT_PROG_PREFIX=1 for their children and thus makes them emit program name prefixes. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrtd: heed glib warning about hash table being NULLDenys Vlasenko2011-03-161-6/+7
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* override old gui by new oneNikola Pajkovsky2011-03-111-4/+6
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* make fork_execv_on_steroids capable of setting env vars tooDenys Vlasenko2011-03-081-1/+1
| | | | | | Before, it could only unset them. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* run abrt-action-install-debuginfo.py using trivial sgid wrapperJiri Moskovcak2011-02-211-1/+1
| | | | | Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove CCommLayerServer[DBus] classesDenys Vlasenko2011-01-211-9/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* s/QuotaExceed/QuotaExceeded/gDenys Vlasenko2011-01-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Remove CCrashWatcher and CObserver classes; merge libabrt_daemon into abrtdDenys Vlasenko2011-01-211-3/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* make option handling more regular across all toolsDenys Vlasenko2011-01-201-25/+25
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* introduce and use new helper function list_free_with_freeDenys Vlasenko2011-01-201-3/+2
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrtd: merge pid and lock files into oneDenys Vlasenko2011-01-191-40/+28
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* move (de)installation of abrt-hook-ccpp into abrt-ccpp service.Denys Vlasenko2011-01-191-10/+1
| | | | | | | | | Init script is packaged and installed with abrt-addon-ccpp package. In order to not install the hook twice, "old" plugin loading in abrtd is disabled (pending deletion of entire "old" plugin machinery). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove [ Cron ] handlingDenys Vlasenko2011-01-171-160/+0
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* replace KerneloopsScanner plugin and dumpoops with abrt-dump-oops, use it in ↵Denys Vlasenko2011-01-171-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | abrtd Patch adds new tool: $ abrt-dump-oops Usage: abrt-dump-oops [-vsrdow] FILE Extract oops from syslog/dmesg file -v, --verbose Be verbose -s Log to syslog -r Parse kernel's message buffer before parsing FILE -d Create ABRT dump for every oops found -o Print found oopses on standard output -w Do not exit, watch the file for new oopses It extends dumpoops. Extensions: * it can watch the syslog using -w option (uses inotify) * it can scan dmesg buffer too In this way, it also becomes a replacement for KerneloopsScanner plugin: oops-detecting logic is taken verbatim from KerneloopsScanner source. abrtd is changed to start it if it sees this directive in abrt.conf: [ LogScanners ] abrt-dump-oops = abrt-dump-oops -drw /var/log/messages Default abrt.conf is changed to have such line. Patch doesn't remove KerneloopsScanner plugin and dumpoops binary yet, I will do it in a separate trivial patch. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* move abrt-action-FOO from /usr/libexec to /usr/binDenys Vlasenko2011-01-111-5/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Rename foo_crash_dump_dir -> foo_dump_dirDenys Vlasenko2010-12-151-3/+3
| | | | | | | | | | | | | To be exact, these three functions are renamed: load_crash_data_from_crash_dump_dir create_crash_dump_dir delete_crash_dump_dir Rationale: data structure is called "struct dump_dir", not "struct crash_dump_dir" Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* removal of C++isms from libabrt, part 1Denys Vlasenko2010-12-081-66/+40
| | | | | | | | | | | | | This patch converts libabrt usage of C++ map<string, string> to a glib-based container, GHashTable. It is typedef-ed to map_string_h. We can't typedef it to map_string_t, since other parts of ABRT (daemon, cli) still use that name for C++ container. Also, exceptions are removed everywhere. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* This patch changes crash data to use C structures.Denys Vlasenko2010-12-061-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The smallest data element is: struct crash_item { char *content; unsigned flags; }; where content is, eh, content, and flags is a bit flag field. crash_data_t is a map of crash_item's, implemented as a pointer to heap-allocated GHashTable. vector_of_crash_data_t is a vector of crash_data_t's, implemented as a pointer to heap-allocated GPtrArray. Most operations have light wrappers around them to hide the nature of the containers. For example, to free vector_of_crash_data, you need to use free_vector_of_crash_data(ptr) instead of open-coding g_ptr_array_free. The wrapper is thin. The goal is not so much to hide the implementation, but more to make it easier to use the correct function. dbus (un)marshalling functions convert crash_item to three-element array of strings, in order to keep compatibility with abrt-gui (python). This can be changed later to use native representation. crash_data_t and vector_of_crash_data_t are represented in "natural" way, no funny stuff there. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* preparatory patch for future factoring out of headers for reportlibDenys Vlasenko2010-11-261-3/+3
| | | | | | Some files and functions are renamed, no logic changes. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrtd: suppress spurious warning about missing coredump and inform_allDenys Vlasenko2010-11-251-1/+1
| | | | | | Also plugs two memory leaks Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove sqlite DBDenys Vlasenko2010-11-231-99/+12
| | | | | | | | | | | | | | | | | | | | | | This change removes sqlite database. Database was used to find dump dirs by [UID:]UUID. This patch uses more natural way: dump dirs are addressed by their directory names. DB was also used to produce a list of dump dirs. Now it is done by iterating over the /var/spool/abrt directory. And finally, DB was also used to find duplicate UUIDs. Now it is done by iterating over the /var/spool/abrt directory. Crash count, "inform all" and reporting result message are moved from DB field to a file in dump dir. "Reported" DB field is deleted - if message != "", then this dump was reported. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Cleanup. Remove last vestiges of AnalyzerActionsAndReporters.Denys Vlasenko2010-11-181-17/+0
| | | | | | Also: made one function static, made dd_delete() call dd_close(). Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove unused SetPluginSettings(...)Nikola Pajkovsky2010-11-161-1/+0
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* abrt-handle-crashdump: prepend our libexec path to $PATHDenys Vlasenko2010-11-151-6/+6
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* move files from lib/plugins to src/pluginsJiri Moskovcak2010-11-101-0/+5
|
* Decouple settings handling from old-style pluginsDenys Vlasenko2010-11-101-2/+2
| | | | | | | | The breakage was discovered when i removed Logger class. it turned out the fix is somewhat involved. This change implements it as discussed with the rest of the team. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Move some functions from CrashWatcher to MiddleWareDenys Vlasenko2010-11-091-0/+4
| | | | | | They have nothing to do with CrashWatcher class. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrtd: remove support for ActionsAndReporters, abrt_event.conf supersedes itDenys Vlasenko2010-11-081-10/+0
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* save/restore errno in signal handlerDenys Vlasenko2010-11-031-0/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Added DIR paramented to "Crash" dbus signalDenys Vlasenko2010-11-021-5/+5
| | | | | | Run-tested Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* remove AutoReportUIDs supportDenys Vlasenko2010-11-021-28/+0
| | | | | | | | abrt_action.conf provides a way to configure that behaviour. This change adds a commented-out example how to do it for kerneloops. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrtd: remove resolv.conf refresh codeDenys Vlasenko2010-11-021-30/+0
| | | | | | | It is not needed anymore since we report to web using separate applications. And they reinitialize resolver on startup. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Splitting web-related functions into libABRT_web_utils.soDenys Vlasenko2010-10-251-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was: linux-vdso.so.1 => (0x00007fff4e4a0000) libABRTUtils.so.0 => /usr/lib64/libABRTUtils.so.0 (0x00007f64316c0000) libABRTdUtils.so.0 => /usr/lib64/libABRTdUtils.so.0 (0x00007f64314b6000) libpolkit-gobject-1.so.0 => /usr/lib64/libpolkit-gobject-1.so.0 (0x0000003c2c600000) libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x0000003c20a00000) libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x0000003c1f600000) libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x0000003c20600000) libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x0000003c1fa00000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000003c1f200000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003c28200000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f64312b2000) libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x0000003c1fe00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6431096000) librt.so.1 => /lib64/librt.so.1 (0x00007f6430e8e000) libxmlrpc.so.3 => /usr/lib64/libxmlrpc.so.3 (0x0000003c22e00000) libxmlrpc_util.so.3 => /usr/lib64/libxmlrpc_util.so.3 (0x0000003c23600000) libxmlrpc_client.so.3 => /usr/lib64/libxmlrpc_client.so.3 (0x0000003c23a00000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003c2c200000) libm.so.6 => /lib64/libm.so.6 (0x00007f6430c0a000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003c28e00000) libc.so.6 => /lib64/libc.so.6 (0x00007f643088b000) libeggdbus-1.so.0 => /usr/lib64/libeggdbus-1.so.0 (0x0000003c30200000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f6430671000) libz.so.1 => /lib64/libz.so.1 (0x0000003c1e600000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6430452000) /lib64/ld-linux-x86-64.so.2 (0x00007f64318d0000) libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f64301f6000) libdbus-glib-1.so.2 => /usr/lib64/libdbus-glib-1.so.2 (0x00007f642ffd3000) libidn.so.11 => /lib64/libidn.so.11 (0x0000003c21200000) liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f642fdc5000) libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x00007f642fb80000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f642f951000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f642f694000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f642f468000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003c29200000) libssl3.so => /usr/lib64/libssl3.so (0x00007f642f234000) libsmime3.so => /usr/lib64/libsmime3.so (0x00007f642f009000) libnss3.so => /usr/lib64/libnss3.so (0x00007f642eccf000) libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f642eab0000) libplds4.so => /lib64/libplds4.so (0x00007f642e8ad000) libplc4.so => /lib64/libplc4.so (0x00007f642e6a9000) libnspr4.so => /lib64/libnspr4.so (0x00007f642e46c000) libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x0000003c21600000) libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x0000003c34e00000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x0000003c2d600000) libcrypto.so.10 => /lib64/libcrypto.so.10 (0x0000003c29a00000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f642e263000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003c2aa00000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f642e02c000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f642ddcf000) Now: linux-vdso.so.1 => (0x00007fff187ff000) libABRTUtils.so.0 => /usr/lib64/libABRTUtils.so.0 (0x00007fb12b24e000) libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x0000003c1fe00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb12b032000) libABRTdUtils.so.0 => /usr/lib64/libABRTdUtils.so.0 (0x00007fb12ae2b000) libpolkit-gobject-1.so.0 => /usr/lib64/libpolkit-gobject-1.so.0 (0x0000003c2c600000) libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x0000003c20a00000) libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x0000003c1f600000) libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x0000003c20600000) libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x0000003c1fa00000) librt.so.1 => /lib64/librt.so.1 (0x00007fb12ac23000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000003c1f200000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fb12aa1f000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003c2c200000) libm.so.6 => /lib64/libm.so.6 (0x00007fb12a79b000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003c28e00000) libc.so.6 => /lib64/libc.so.6 (0x00007fb12a41c000) /lib64/ld-linux-x86-64.so.2 (0x00007fb12b45e000) libeggdbus-1.so.0 => /usr/lib64/libeggdbus-1.so.0 (0x0000003c30200000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fb12a202000) libz.so.1 => /lib64/libz.so.1 (0x0000003c1e600000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fb129fe3000) libdbus-glib-1.so.2 => /usr/lib64/libdbus-glib-1.so.2 (0x00007fb129dc0000) Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* abrtd: fix "unset PATH" problem when started from dbus daemonDenys Vlasenko2010-10-151-0/+7
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Add a warning comment that options and their enums should be in syncDenys Vlasenko2010-10-121-5/+3
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Return a bitmask of found options from parse_opts()Denys Vlasenko2010-10-121-14/+14
| | | | | | | | | | | | | 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>
* Remove arrays in usage text, use a single string insteadDenys Vlasenko2010-10-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-081-10/+6
| | | | | | | 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-081-0/+1
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* use OPT__VERBOSE macro for help optionNikola Pajkovsky2010-10-081-1/+1
| | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
* use OPT__HELP macro for help optionNikola Pajkovsky2010-10-081-1/+1
| | | | 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>
* 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-051-4/+5
|\ | | | | | | | | | | | | | | | | * 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-241-4/+4
| | | | | | | | Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
| * g_settings_setOpenGPGPublicKeys uses GListNikola Pajkovsky2010-09-241-0/+1
| | | | | | | | 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>