summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/staprun/staprun_funcs.c2
-rw-r--r--stap-server-connect.c12
-rw-r--r--testsuite/lib/systemtap.exp1
3 files changed, 9 insertions, 6 deletions
diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c
index 40af1678..8da7e7e8 100644
--- a/runtime/staprun/staprun_funcs.c
+++ b/runtime/staprun/staprun_funcs.c
@@ -448,9 +448,9 @@ check_groups (void)
int check_permissions(void)
{
int check_groups_rc;
+#if HAVE_NSS
int check_signature_rc = 0;
-#if HAVE_NSS
/* Attempt to verify the module against its signature. Return failure
if the module has been tampered with (altered). */
check_signature_rc = check_signature ();
diff --git a/stap-server-connect.c b/stap-server-connect.c
index 31fbefca..33d4983b 100644
--- a/stap-server-connect.c
+++ b/stap-server-connect.c
@@ -377,6 +377,7 @@ handle_connection(PRFileDesc *tcpSocket)
PRSocketOptionData socketOption;
PRFileInfo info;
char *cmdline;
+ char *stap_server_prefix;
int rc;
char *rc1;
@@ -465,10 +466,11 @@ handle_connection(PRFileDesc *tcpSocket)
#endif
/* Call the stap-server script. */
- cmdline = PORT_Alloc(sizeof ("stap-server") +
- sizeof (requestFileName) +
- sizeof (responseDirName) +
- sizeof (responseZipName) +
+ stap_server_prefix = getenv("SYSTEMTAP_SERVER_SCRIPTS") ?: BINDIR;
+ cmdline = PORT_Alloc(strlen (stap_server_prefix) + sizeof ("/stap-server") + 1 +
+ sizeof (requestFileName) + 1 +
+ sizeof (responseDirName) + 1 +
+ sizeof (responseZipName) + 1 +
strlen (dbdir) + 1);
if (! cmdline) {
errWarn ("PORT_Alloc");
@@ -476,7 +478,7 @@ handle_connection(PRFileDesc *tcpSocket)
goto cleanup;
}
- sprintf (cmdline, "stap-server %s %s %s %s",
+ sprintf (cmdline, "%s/stap-server %s %s %s %s", stap_server_prefix,
requestFileName, responseDirName, responseZipName, dbdir);
rc = system (cmdline);
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 019b1bf8..379f6c58 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -109,6 +109,7 @@ proc setup_server {} {
if {! [installtest_p]} then {
# Make sure the server management scripts and tools are on the $PATH.
set env(PATH) "$srcdir/..:[exec pwd]/..:$env(PATH)"
+ set env(SYSTEMTAP_SERVER_SCRIPTS) "$srcdir/.."
}
# Try to find or start the server.