diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | runtime/staprun/staprun_funcs.c | 2 | ||||
-rw-r--r-- | stap-server-connect.c | 12 | ||||
-rw-r--r-- | testsuite/lib/systemtap.exp | 1 |
5 files changed, 11 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index 7779c0eb..d1b5789e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -129,7 +129,7 @@ PHONIES += install-scripts # scripts should be installed before this rule is run install-scripts: install-binSCRIPTS for f in $(bin_SCRIPTS); do \ - sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ + sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=.*,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ done endif diff --git a/Makefile.in b/Makefile.in index 960c88d3..0892715e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1549,7 +1549,7 @@ cscope: # scripts should be installed before this rule is run @BUILD_SERVER_TRUE@install-scripts: install-binSCRIPTS @BUILD_SERVER_TRUE@ for f in $(bin_SCRIPTS); do \ -@BUILD_SERVER_TRUE@ sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ +@BUILD_SERVER_TRUE@ sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=.*,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ @BUILD_SERVER_TRUE@ done install-exec-hook: 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. |