diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-10 12:12:54 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-10 12:12:54 -0500 |
commit | 7885012ba0a7c1d7c974dd9528afa90aeed916a6 (patch) | |
tree | 7136ec8624b0b09bc1bc38d0d99fb52c3a7e99a3 /runtime/staprun/staprun_funcs.c | |
parent | 3d3942f6b1ccb9062794527f2f204d98642eaed2 (diff) | |
download | systemtap-steved-7885012ba0a7c1d7c974dd9528afa90aeed916a6.tar.gz systemtap-steved-7885012ba0a7c1d7c974dd9528afa90aeed916a6.tar.xz systemtap-steved-7885012ba0a7c1d7c974dd9528afa90aeed916a6.zip |
Replace the use of the global variable 'modpath' in diagnostic
messages within verify_it with the use of a 'module_name'
parameter passed in.
Add a comment in insert_module explaining why it's ok to
overwrite the 'path' parameter with the canonicalized path.
Diffstat (limited to 'runtime/staprun/staprun_funcs.c')
-rw-r--r-- | runtime/staprun/staprun_funcs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c index 47ad6a19..89f78ade 100644 --- a/runtime/staprun/staprun_funcs.c +++ b/runtime/staprun/staprun_funcs.c @@ -84,7 +84,9 @@ int insert_module( /* Overwrite the path with the canonicalized one, to defeat a possible race between path and signature checking below and, - somewhat later, module loading. */ + somewhat later, module loading. This path gets propogated to the + helper functions called by this function and is not used for any + other purpose, so it is ok to overwrite the 'path' parameter. */ path = strdup (module_realpath); if (path == NULL) { _perr("allocating memory failed"); @@ -256,7 +258,7 @@ check_signature(const char *path, const void *module_data, off_t module_size) } sprintf (signature_realpath, "%s.sgn", path); - rc = verify_module (signature_realpath, module_data, module_size); + rc = verify_module (signature_realpath, path, module_data, module_size); dbug(2, "verify_module returns %d\n", rc); |