diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-09-15 18:29:45 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-09-15 18:29:45 -0400 |
commit | da23eceb71cc70668ab9dfd80d318b3837703d9d (patch) | |
tree | dcfb85f50cf035213bde1836d2167ceca00c8205 /stap-server | |
parent | 2260f4e32eb4c0b4cc95e4bef8ccdc5dc66261af (diff) | |
parent | 24fcff20ed7a4a9f2b772c572db28ee8df49161f (diff) | |
download | systemtap-steved-da23eceb71cc70668ab9dfd80d318b3837703d9d.tar.gz systemtap-steved-da23eceb71cc70668ab9dfd80d318b3837703d9d.tar.xz systemtap-steved-da23eceb71cc70668ab9dfd80d318b3837703d9d.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
* 'master' of ssh://sources.redhat.com/git/systemtap: (34 commits)
Update the langref copyright notice
Fix some probe examples in the language reference
Remove automatic authorization of servers started by root as trusted signers.
docs: add abnormal termination section to PROCESSING
Remove unneeded header file
Get the module to sign from -p4's stdout
Move --unprivileged support news to the top.
Firther updates to NEWS regarding signing and unprivileged users.
Authorize new certificates created for servers started by root as authorized signers.
2009-09-14 Dave Brolley <brolley@redhat.com>
Allow remaining process.* probes for unprivileged users.
Use the sched_switch tracepoint if available.
PR10608: mark test cases untested once compilation failed
Make check.exp not sleep so much in test_installcheck.
Make tracepoints.exp test more efficient by running as one giant script.
Only test highest optimization for exelib.exp test.
Replace small exelib.exp testcases with one jumbo testcase.
Remove duplicate uprobe_derived_probe code
Add semaphores for use with the forthcoming sdt marker checks.
Add actual pc address to semantic error about inaccessible variables.
...
Conflicts:
tapsets.cxx
Diffstat (limited to 'stap-server')
-rwxr-xr-x | stap-server | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/stap-server b/stap-server index 316cc954..f9ccde04 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 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 + fi fi # If the user specified -p5, remove the name of the kernel module from stdout. @@ -377,7 +395,7 @@ function package_response { # Compress the server's temporary directory into a .zip archive. (rm $zip_server && zip -r $zip_server `basename $tmpdir_server` > /dev/null) || \ - fatal "zip of request tree, $tmpdir_server, failed" + fatal "zip of server response tree, $tmpdir_server, failed" } # function: fatal [ MESSAGE ] |