diff options
author | Jim Keniston <jkenisto@us.ibm.com> | 2009-03-31 11:06:58 -0700 |
---|---|---|
committer | Jim Keniston <jkenisto@us.ibm.com> | 2009-03-31 11:06:58 -0700 |
commit | 2020af07c2a7f58538874ce652b52a6883f7ada0 (patch) | |
tree | 25c9ae36d86a27963d52cdb5a780e4b90c5967f4 /runtime/staprun/staprun_funcs.c | |
parent | 1cd9c3ad40595180123083109e5b7d1230095f54 (diff) | |
parent | c5746f91b1ba8f374b4230e16cb33e1b9206ca2b (diff) | |
download | systemtap-steved-2020af07c2a7f58538874ce652b52a6883f7ada0.tar.gz systemtap-steved-2020af07c2a7f58538874ce652b52a6883f7ada0.tar.xz systemtap-steved-2020af07c2a7f58538874ce652b52a6883f7ada0.zip |
Merge branch 'master' of ssh://kenistoj@sources.redhat.com/git/systemtap
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. */ |