summaryrefslogtreecommitdiffstats
path: root/stap-serverd
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-02-02 14:08:31 -0500
committerDave Brolley <brolley@redhat.com>2010-02-02 14:08:31 -0500
commitd2334a2233f4efd055dab021c603f7c046730a66 (patch)
treec7400b7219c381d6a242f1e1bb987b7b6d279d69 /stap-serverd
parent495b9d7c310985f3c185f4ca642b521141d9b722 (diff)
downloadsystemtap-steved-d2334a2233f4efd055dab021c603f7c046730a66.tar.gz
systemtap-steved-d2334a2233f4efd055dab021c603f7c046730a66.tar.xz
systemtap-steved-d2334a2233f4efd055dab021c603f7c046730a66.zip
Compile server logging and robustness.
Log certificate location and status when starting server. Additional care in handling arguments in stap-serverd. New test case discovered by fuzzing added and fixed.
Diffstat (limited to 'stap-serverd')
-rwxr-xr-xstap-serverd18
1 files changed, 12 insertions, 6 deletions
diff --git a/stap-serverd b/stap-serverd
index fc186233..eda9711e 100755
--- a/stap-serverd
+++ b/stap-serverd
@@ -81,12 +81,18 @@ function initialization {
-x `which ${stap_exec_prefix}stap-client 2>/dev/null`; then
${stap_exec_prefix}stap-authorize-server-cert $ssl_db/$stap_certfile >> $logfile 2>&1
fi
- elif ! test -f $stap_ssl_db/client/cert8.db; then
- # If the client's database does not exist, then initialize it with our certificate.
- # Do this only if the client has been installed.
- if test -f `which ${stap_exec_prefix}stap-client` -a \
- -x `which ${stap_exec_prefix}stap-client`; then
- ${stap_exec_prefix}stap-authorize-server-cert $ssl_db/$stap_certfile >> $logfile 2>&1
+ else
+ echo "Certificate found in database $ssl_db" >> $logfile
+ certutil -L -d "$ssl_db" -n stap-server | \
+ awk '/Validity|Not After|Not Before/ { print $0 }' | \
+ sed 's/^ */ /' >> $logfile
+ if ! test -f $stap_ssl_db/client/cert8.db; then
+ # If the client's database does not exist, then initialize it with our certificate.
+ # Do this only if the client has been installed.
+ if test -f `which ${stap_exec_prefix}stap-client 2>/dev/null` -a \
+ -x `which ${stap_exec_prefix}stap-client 2>/dev/null`; then
+ ${stap_exec_prefix}stap-authorize-server-cert $ssl_db/$stap_certfile >> $logfile 2>&1
+ fi
fi
fi
fi