diff options
Diffstat (limited to 'stap-server')
-rwxr-xr-x | stap-server | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/stap-server b/stap-server index 316cc954..a6539d44 100755 --- a/stap-server +++ b/stap-server @@ -31,6 +31,7 @@ function initialization { # Default options settings p_phase=5 keep_temps=0 + unprivileged=0 # Request file name. zip_client=$1 @@ -188,6 +189,15 @@ function parse_options { # Start of a new token. first_token=$1 + + # Handle the --unprivileged option. + if test "X$first_token" = "X--unprivileged"; then + unprivileged=1 + shift + continue + fi + + # Process the option. until test $advance_p != 0 do # Identify the next option @@ -357,6 +367,14 @@ 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'` + if test "X$modname" != "X"; then + ${stap_exec_prefix}stap-sign-module $modname $ssl_db + fi + fi fi # If the user specified -p5, remove the name of the kernel module from stdout. |