diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-09 14:50:52 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-09 14:50:52 -0500 |
commit | 64211010978d0e35c80ec7c119f1986a48f97543 (patch) | |
tree | 4a9d67ed8f7682cf8eb61686709fd69341394e63 /cache.cxx | |
parent | 5e90af3e298ae39838acedf85f1301806143e920 (diff) | |
download | systemtap-steved-64211010978d0e35c80ec7c119f1986a48f97543.tar.gz systemtap-steved-64211010978d0e35c80ec7c119f1986a48f97543.tar.xz systemtap-steved-64211010978d0e35c80ec7c119f1986a48f97543.zip |
Don't reference global variable modpath in insert_module and its helpers.
This allows insert_module to to be used for loading the signed uprobes.ko
module.
Allow the use of $$parms and $$return in uprobes based probes for
unprivileged users.
Re-add management of module signatures in the cache. Don't know why
it was removed.
Diffstat (limited to 'cache.cxx')
-rw-r--r-- | cache.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -68,6 +68,9 @@ add_to_cache(systemtap_session& s) s.use_cache = false; return; } + // Copy the signature file, if any. It is not an error if this fails. + if (file_exists (module_src_path + ".sgn")) + copy_file(module_src_path + ".sgn", s.hash_path + ".sgn", verbose); string c_dest_path = s.hash_path; if (c_dest_path.rfind(".ko") == (c_dest_path.size() - 3)) @@ -155,6 +158,10 @@ get_from_cache(systemtap_session& s) close(fd_c); return false; } + // Copy the module signature file, if any. + // It is not an error if this fails. + if (file_exists (s.hash_path + ".sgn")) + copy_file(s.hash_path + ".sgn", module_dest_path + ".sgn"); } // We're done with these file handles. |