From 64211010978d0e35c80ec7c119f1986a48f97543 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Mon, 9 Nov 2009 14:50:52 -0500 Subject: 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. --- cache.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cache.cxx') diff --git a/cache.cxx b/cache.cxx index 8a6553ff..29c20d0d 100644 --- a/cache.cxx +++ b/cache.cxx @@ -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. -- cgit