summaryrefslogtreecommitdiffstats
path: root/cache.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-09 14:50:52 -0500
committerDave Brolley <brolley@redhat.com>2009-11-09 14:50:52 -0500
commit64211010978d0e35c80ec7c119f1986a48f97543 (patch)
tree4a9d67ed8f7682cf8eb61686709fd69341394e63 /cache.cxx
parent5e90af3e298ae39838acedf85f1301806143e920 (diff)
downloadsystemtap-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.cxx7
1 files changed, 7 insertions, 0 deletions
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.