summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2008-06-23 15:56:53 -0500
committerDavid Smith <dsmith@redhat.com>2008-06-23 15:57:22 -0500
commit6b4b4f4a9e8d56db4050cf66572604708f483115 (patch)
tree74755d5694c69afe408350e71301827d50357b79
parent99a5f9cff817559055ffec853ad1d6d91ad21098 (diff)
downloadsystemtap-steved-6b4b4f4a9e8d56db4050cf66572604708f483115.tar.gz
systemtap-steved-6b4b4f4a9e8d56db4050cf66572604708f483115.tar.xz
systemtap-steved-6b4b4f4a9e8d56db4050cf66572604708f483115.zip
Handle exec's that use a relative path.
2008-06-23 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_task_finder_report_exec): Handles relative exec paths correctly.
-rw-r--r--runtime/ChangeLog3
-rw-r--r--runtime/task_finder.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 9c275c0a..fb92dccc 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,5 +1,8 @@
2008-06-23 David Smith <dsmith@redhat.com>
+ * task_finder.c (__stp_utrace_task_finder_report_exec): Handles
+ relative exec paths correctly.
+
* task_finder_vma.c (__stp_tf_vma_hash): Improved determination of
whether this is a 64-bit platform.
* syscall.h: Handles kernels with older style register
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index abb76e09..71b11569 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -482,12 +482,10 @@ __stp_utrace_task_finder_report_exec(struct utrace_attached_engine *engine,
__stp_utrace_attach_match_tsk(tsk->real_parent, tsk, 0, 1);
}
- // On exec, check bprm
- if (bprm->filename == NULL)
- return UTRACE_ACTION_RESUME;
-
- // We assume that all exec's are exec'ing a new process
- __stp_utrace_attach_match_filename(tsk, bprm->filename, 1, 1);
+ // We assume that all exec's are exec'ing a new process. Note
+ // that we don't use bprm->filename, since that path can be
+ // relative.
+ __stp_utrace_attach_match_tsk(tsk, tsk, 1, 1);
return UTRACE_ACTION_RESUME;
}