summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/staprun_funcs.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-01 23:04:29 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-01 23:04:29 +0200
commit2c246d55893998d60461671767c5f9c05f70c6b7 (patch)
tree04e20f69c813c67534d8a3bd9cd0d4cad84a3544 /runtime/staprun/staprun_funcs.c
parentdd1636396623adacdb9e6502adabd9195ae7ef33 (diff)
parent952ce18c9672046c052fc77d5da8f98e8ae75735 (diff)
downloadsystemtap-steved-2c246d55893998d60461671767c5f9c05f70c6b7.tar.gz
systemtap-steved-2c246d55893998d60461671767c5f9c05f70c6b7.tar.xz
systemtap-steved-2c246d55893998d60461671767c5f9c05f70c6b7.zip
Merge branch 'master' into pr6866
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 5e7fa102..e94e5d13 100644
--- a/runtime/staprun/staprun_funcs.c
+++ b/runtime/staprun/staprun_funcs.c
@@ -269,6 +269,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. */