summaryrefslogtreecommitdiff
path: root/debian/rebuild-security-providers
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-09 12:42:08 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-09 12:42:08 +0300
commit781434cd4f3b1be60b117ae61babaf60f4a9e563 (patch)
tree092486dd2ad6dc75d28590f63357eb64790eafb5 /debian/rebuild-security-providers
downloadgcc-defaults-781434cd4f3b1be60b117ae61babaf60f4a9e563.tar.gz
Imported 1.168debian/1.168
Diffstat (limited to 'debian/rebuild-security-providers')
-rwxr-xr-xdebian/rebuild-security-providers19
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/rebuild-security-providers b/debian/rebuild-security-providers
new file mode 100755
index 0000000..bd33a66
--- /dev/null
+++ b/debian/rebuild-security-providers
@@ -0,0 +1,19 @@
+#! /bin/bash
+# Rebuild the list of security providers in classpath.security
+
+secfiles="/var/lib/security/classpath.security"
+
+for secfile in $secfiles; do
+ # check if this classpath.security file exists
+ #[ -f "$secfile" ] || continue
+
+ sed '/^security\.provider\./d' /etc/java/security/classpath.security \
+ > $secfile
+
+ count=0
+ for provider in $(ls /etc/java/security/security.d)
+ do
+ count=$((count + 1))
+ echo "security.provider.${count}=${provider#*-}" >> "$secfile"
+ done
+done