summaryrefslogtreecommitdiffstats
path: root/stap-add-server-cert
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-01-13 13:38:41 -0500
committerDave Brolley <brolley@redhat.com>2009-01-13 13:38:41 -0500
commit790c4dd6eff3fbc127b67e23478d7edc6bf1cd08 (patch)
tree0ea6b20f76a39f9570c4be5f8f3ff5d1e0d32ce1 /stap-add-server-cert
parenta50cb7894f72eb3ac3301adde9950d12425594b7 (diff)
downloadsystemtap-steved-790c4dd6eff3fbc127b67e23478d7edc6bf1cd08.tar.gz
systemtap-steved-790c4dd6eff3fbc127b67e23478d7edc6bf1cd08.tar.xz
systemtap-steved-790c4dd6eff3fbc127b67e23478d7edc6bf1cd08.zip
Separate the creation of the server's certificate from its addition to the
client-side database.
Diffstat (limited to 'stap-add-server-cert')
-rwxr-xr-xstap-add-server-cert10
1 files changed, 5 insertions, 5 deletions
diff --git a/stap-add-server-cert b/stap-add-server-cert
index 81424c82..976f323f 100755
--- a/stap-add-server-cert
+++ b/stap-add-server-cert
@@ -25,21 +25,21 @@ if test "X$2" = "X"; then
echo "Certificate database directory must be specified" >&2
exit 1
fi
-if ! test -d $2; then
- if ! mkdir -p $2; then
- echo "Unable to find or create the client certificate database directory: $2" >&2
+if ! test -d $2/client; then
+ if ! mkdir -p $2/client; then
+ echo "Unable to find or create the client certificate database directory: $2/client" >&2
exit 1
fi
fi
# Add the certificate
-if ! certutil -A -n stap-server -d $2 -i $1 -t "P,P,P" > /dev/null; then
+if ! certutil -A -n stap-server -d $2/client -i $1 -t "P,P,P" > /dev/null; then
echo "Unable to add $1 to the client certificate database $2" >&2
exit 1
fi
# Ensure that the database is readable by others
-if ! chmod +r $2/*.db; then
+if ! chmod +r $2/client/*.db; then
echo "Warning: unable to make the client certificate database $2 readable by others" >&2
fi