diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-04-01 23:04:29 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-04-01 23:04:29 +0200 |
commit | 2c246d55893998d60461671767c5f9c05f70c6b7 (patch) | |
tree | 04e20f69c813c67534d8a3bd9cd0d4cad84a3544 /runtime/staprun/staprun_funcs.c | |
parent | dd1636396623adacdb9e6502adabd9195ae7ef33 (diff) | |
parent | 952ce18c9672046c052fc77d5da8f98e8ae75735 (diff) | |
download | systemtap-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.c | 9 |
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. */ |