]> sourceware.org Git - systemtap.git/commitdiff
Get the module to sign from -p4's stdout
authorJosh Stone <jistone@redhat.com>
Tue, 15 Sep 2009 00:43:51 +0000 (17:43 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 15 Sep 2009 00:43:51 +0000 (17:43 -0700)
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.

stap-server

index 3358bcf10d497c281987b9d400b169b13402da2d..f9ccde04e3cd77e0e6e240bd5e154daccef2ca5c 100755 (executable)
@@ -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
This page took 0.033045 seconds and 5 git commands to generate.