aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2018-08-29 13:17:19 +0000
committercassio <cassiopc@gmail.com>2018-08-29 13:17:19 +0000
commitb117763dfafeec631c47a8fca6880400c5c6d854 (patch)
tree1dba4f049e6f1ad5c6df0976ecd366d63c4201fc
parent27cf41d1424d045e7c54c2fa12f87bedb663b781 (diff)
downloadboca-b117763dfafeec631c47a8fca6880400c5c6d854.tar.gz
boca-b117763dfafeec631c47a8fca6880400c5c6d854.zip
chmods in the postinst
-rw-r--r--Makefile2
-rw-r--r--debian/boca-autojudge.postinst4
-rw-r--r--debian/boca-common.postinst3
-rw-r--r--debian/boca-db.postinst3
-rw-r--r--debian/boca-submission-tools.postinst12
5 files changed, 16 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index af01438..6ec0a69 100644
--- a/Makefile
+++ b/Makefile
@@ -44,9 +44,9 @@ install-bocaautojudge: tools/safeexec
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/etc/
install tools/safeexec $(DESTDIR)/usr/bin/safeexec
- chmod 4555 $(DESTDIR)/usr/bin/safeexec
install tools/boca-createjail $(DESTDIR)/usr/sbin/boca-createjail
install tools/boca-autojudge.sh $(DESTDIR)/usr/sbin/boca-autojudge
+ chmod 4555 $(DESTDIR)/usr/bin/safeexec
chmod 700 $(DESTDIR)/usr/sbin/boca-createjail
chmod 700 $(DESTDIR)/usr/sbin/boca-autojudge
diff --git a/debian/boca-autojudge.postinst b/debian/boca-autojudge.postinst
index 37b144c..06fa222 100644
--- a/debian/boca-autojudge.postinst
+++ b/debian/boca-autojudge.postinst
@@ -1,5 +1,7 @@
#!/bin/bash
-chmod 4555 /usr/bin/safeexec
+chmod 4555 /usr/bin/safeexec
+chmod 700 /usr/sbin/boca-createjail
+chmod 700 /usr/sbin/boca-autojudge
exit 0
diff --git a/debian/boca-common.postinst b/debian/boca-common.postinst
index d28de8a..0a35a35 100644
--- a/debian/boca-common.postinst
+++ b/debian/boca-common.postinst
@@ -1,5 +1,8 @@
#!/bin/bash
+chmod 700 /usr/sbin/boca-config-dbhost
+chmod 700 /usr/sbin/boca-fixssh
+
set -e
. /usr/share/debconf/confmodule
diff --git a/debian/boca-db.postinst b/debian/boca-db.postinst
index c4215df..de205c0 100644
--- a/debian/boca-db.postinst
+++ b/debian/boca-db.postinst
@@ -1,5 +1,8 @@
#!/bin/bash
+chmod 700 /usr/sbin/boca-createdb
+chmod 700 /usr/sbin/boca-dump
+
set -e
. /usr/share/debconf/confmodule
diff --git a/debian/boca-submission-tools.postinst b/debian/boca-submission-tools.postinst
index 6cd6b4f..b8a5dcf 100644
--- a/debian/boca-submission-tools.postinst
+++ b/debian/boca-submission-tools.postinst
@@ -1,12 +1,12 @@
#!/bin/bash
#Make sure wrapper is suid and others are not readable
-chmod 4555 /usr/bin/boca-submit-run-root-wrapper 2>/dev/null
-chmod 700 /usr/sbin/boca-fixes 2>/dev/null
-chmod 700 /usr/sbin/boca-auth-runs 2>/dev/null
-chmod 700 /usr/sbin/boca-outmanage 2>/dev/null
-chmod 700 /usr/sbin/boca-submit-log 2>/dev/null
-chmod 700 /usr/bin/boca-submit-run-* 2>/dev/null
+chmod 4555 /usr/bin/boca-submit-run-root-wrapper
+chmod 700 /usr/sbin/boca-fixes
+chmod 700 /usr/sbin/boca-auth-runs
+chmod 700 /usr/sbin/boca-outmanage
+chmod 700 /usr/sbin/boca-submit-log
+chmod 700 /usr/bin/boca-submit-run-*
for i in boca-submit-list boca-submit-oldlist; do
rm -f /usr/bin/$i || true