diff options
-rw-r--r-- | main.cxx | 16 | ||||
-rwxr-xr-x | stap-env | 6 |
2 files changed, 13 insertions, 9 deletions
@@ -415,14 +415,6 @@ main (int argc, char * const argv []) else s.cert_db_path = getenv("HOME") + string ("/.systemtap/ssl/server"); - // Location of our signing certificate. - // If we're root, use the database in SYSCONFDIR, otherwise - // use the one in our $HOME directory. */ - if (geteuid() == 0) - s.cert_db_path = SYSCONFDIR "/systemtap/ssl/server"; - else - s.cert_db_path = getenv("HOME") + string ("/.systemtap/ssl/server"); - const char* s_p = getenv ("SYSTEMTAP_TAPSET"); if (s_p != NULL) { @@ -468,6 +460,14 @@ main (int argc, char * const argv []) } } + // Location of our signing certificate. + // If we're root, use the database in SYSCONFDIR, otherwise + // use the one in s.data_path. */ + if (geteuid() == 0) + s.cert_db_path = SYSCONFDIR "/systemtap/ssl/server"; + else + s.cert_db_path = s.data_path + "/ssl/server"; + const char* s_tc = getenv ("SYSTEMTAP_COVERAGE"); if (s_tc != NULL) s.tapset_compile_coverage = true; @@ -25,7 +25,11 @@ stap_avahi_service_tag=_stap._tcp # NSS certificate databases stap_root_ssl_db=$stap_sysconfdir/systemtap/ssl -stap_user_ssl_db=$HOME/.systemtap/ssl +if test "X$SYSTEMTAP_DIR" = "X"; then + stap_user_ssl_db=$HOME/.systemtap/ssl +else + stap_user_ssl_db=$SYSTEMTAP_DIR/ssl +fi if test $EUID = 0; then stap_ssl_db=$stap_root_ssl_db |