summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/staprun_funcs.c
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-03-25 11:41:16 -0400
committerDave Brolley <brolley@redhat.com>2009-03-25 11:41:16 -0400
commit666d747e2a8880c2906c1e2ead49182cf061df74 (patch)
tree12ae1700dd11b1ef13415b0349641cfb70e01982 /runtime/staprun/staprun_funcs.c
parentd171a9ff5fda69cab247d2afd06ec5952941969e (diff)
parentb41a544e20a42413daa0323d2f149e9e34586ccf (diff)
downloadsystemtap-steved-666d747e2a8880c2906c1e2ead49182cf061df74.tar.gz
systemtap-steved-666d747e2a8880c2906c1e2ead49182cf061df74.tar.xz
systemtap-steved-666d747e2a8880c2906c1e2ead49182cf061df74.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts: Makefile.in
Diffstat (limited to 'runtime/staprun/staprun_funcs.c')
-rw-r--r--runtime/staprun/staprun_funcs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c
index 48d82d01..020bb312 100644
--- a/runtime/staprun/staprun_funcs.c
+++ b/runtime/staprun/staprun_funcs.c
@@ -312,6 +312,15 @@ check_path(void)
return -1;
}
+ /* Overwrite the modpath with the canonicalized one, to defeat
+ a possible race between path checking below and somewhat later
+ module loading. */
+ modpath = strdup (module_realpath);
+ if (modpath == NULL) {
+ _perr("allocating memory failed");
+ exit (1);
+ }
+
/* To make sure the user can't specify something like
* /lib/modules/`uname -r`/systemtapmod.ko, put a '/' on the
* end of staplib_dir_realpath. */