summaryrefslogtreecommitdiffstats
path: root/src/daemon/abrt-handle-crashdump.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-15 17:12:31 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-15 17:12:31 +0100
commit13ecd00fcc2fe6e4104ce73d500484f517e5417b (patch)
treee13051edba80875ca216d1463bf0499d1fb6c34f /src/daemon/abrt-handle-crashdump.c
parent46d60e990d57758c1d72ed76efdeee19e55996f1 (diff)
downloadabrt-13ecd00fcc2fe6e4104ce73d500484f517e5417b.tar.gz
abrt-13ecd00fcc2fe6e4104ce73d500484f517e5417b.tar.xz
abrt-13ecd00fcc2fe6e4104ce73d500484f517e5417b.zip
abrt-handle-crashdump: prepend our libexec path to $PATH
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon/abrt-handle-crashdump.c')
-rw-r--r--src/daemon/abrt-handle-crashdump.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/daemon/abrt-handle-crashdump.c b/src/daemon/abrt-handle-crashdump.c
index 02463ae9..2217c67a 100644
--- a/src/daemon/abrt-handle-crashdump.c
+++ b/src/daemon/abrt-handle-crashdump.c
@@ -86,6 +86,14 @@ int main(int argc, char **argv)
}
/* -e EVENT: run event */
+
+ /* Need to add LIBEXEC_DIR to PATH, because otherwise abrt-action-*
+ * are not found by exec()
+ */
+ const char *env_path = getenv("PATH");
+ if (!env_path) env_path = "";
+ putenv(xasprintf("PATH=%s%s%s", LIBEXEC_DIR, (!env_path[0] ? "" : ":"), env_path));
+
struct run_event_state *run_state = new_run_event_state();
run_state->logging_callback = do_log;
int r = run_event(run_state, dump_dir_name ? dump_dir_name : ".", event);