summaryrefslogtreecommitdiffstats
path: root/stap-server
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-14 17:43:51 -0700
committerJosh Stone <jistone@redhat.com>2009-09-14 17:43:51 -0700
commit21af222fd514238737bc90ccd5d290152502c5ca (patch)
tree21c0954b56b8be49e67d21bec46f6ca41effb98f /stap-server
parent8faf4a73f94f70f72537b4f4fbd5830ca4dd17c6 (diff)
downloadsystemtap-steved-21af222fd514238737bc90ccd5d290152502c5ca.tar.gz
systemtap-steved-21af222fd514238737bc90ccd5d290152502c5ca.tar.xz
systemtap-steved-21af222fd514238737bc90ccd5d290152502c5ca.zip
Get the module to sign from -p4's stdout
The saved stdout should have the exact name of the generated module, which is better than using a recursive find to locate it. Tracepoints and @cast may generate additional .ko's which we don't want to confuse with the real deal. * stap-server (create_response): grep stdout for the module name.
Diffstat (limited to 'stap-server')
-rwxr-xr-xstap-server6
1 files changed, 3 insertions, 3 deletions
diff --git a/stap-server b/stap-server
index 3358bcf1..f9ccde04 100755
--- a/stap-server
+++ b/stap-server
@@ -368,9 +368,9 @@ function create_response {
# Add the contents of the stap temp directory to the server output directory
ln -s $tmpdir_stap `basename $tmpdir_stap`
- # Sign any resulting module if --unprivileged was specified.
- if test $unprivileged = 1; then
- modname=`find $tmpdir_stap -name '*.ko'`
+ # Sign the resulting module if --unprivileged was specified.
+ if test $unprivileged = 1 -a $p_phase -ge 4; then
+ modname=$tmpdir_stap/`grep -m1 '^.*\.ko$' stdout`
if test "X$modname" != "X"; then
${stap_exec_prefix}stap-sign-module $modname $ssl_db
fi