From cf4a6df840531c1b30f8cfa7d10981d071911b98 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 15 Jan 2010 03:06:52 -0500 Subject: PR11105: robustify stap-server * main.cxx (main): Always downgrade client-provided -p5 to -p4. * stap-client (unpack_response): Sanitize stdout due to same. * stap-server-connect.c: Eliminate a bunch of globals. (handle_connection): Make things locals instead. Base tmp files on $TMPDIR. (spawn_and_wait): New helper function. (handleRequest): New monster function to inline rest of old stap-server-request. --- stap-client | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stap-client') diff --git a/stap-client b/stap-client index fc3d9908..f8be3838 100755 --- a/stap-client +++ b/stap-client @@ -544,6 +544,11 @@ function unpack_response { # Remove the output line due to the synthetic server-side -k sed -i "/^Keeping temporary directory.*/ d" $tmpdir_server/stderr fi + + if test $p_phase = 5; then + # Remove the output line due to the synthetic server-side -p4 + sed -i "/^.*\.ko$/ d" $tmpdir_server/stdout + fi } # function: find_and_connect_to_server -- cgit