From ae9e32a05d4310a9ef574a579c8cfdf0847f584d Mon Sep 17 00:00:00 2001 From: Harvie Date: Wed, 18 Jan 2012 07:20:38 +0100 Subject: [PATCH] apparmor initscript + some perl dnssec stuff --- apparmor/apparmor.rc | 60 +++++++++++++++++++++++++++++++++++++ perl-dns-zoneparse/PKGBUILD | 2 +- perl-net-dns-sec/PKGBUILD | 2 +- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 apparmor/apparmor.rc diff --git a/apparmor/apparmor.rc b/apparmor/apparmor.rc new file mode 100644 index 0000000..40c68b7 --- /dev/null +++ b/apparmor/apparmor.rc @@ -0,0 +1,60 @@ +#!/bin/bash +. /etc/rc.conf +. /etc/rc.d/functions + +aa_profiles='/etc/apparmor.d/' +aa_log='/var/log/apparmor.init.log' + +aa_log_daemon_msg() { echo "$@"; } +aa_log_failure_msg() { echo "$@"; } +aa_log_end_msg() { echo "$@"; } +. /lib/apparmor/rc.apparmor.functions + +aa_parser_all() { + apparmor_parser $@ $(find "$aa_profiles" -maxdepth 1 -type f) 2>>"$aa_log" +} + +case "$1" in + start) + stat_busy "Enabling AppArmor profiles" + aa_parser_all -r + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon apparmor + stat_done + fi + ;; + stop) + stat_busy "Disabling AppArmor profiles" + aa_parser_all -R + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon apparmor + stat_done + fi + ;; + complain) + $0 stop + sleep 1 + stat_busy "Enabling AppArmor profiles in complain mode" + aa_parser_all -C + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + status) + aa-status + ;; + *) + echo "usage: $0 {start|stop|complain|restart|status}" +esac +exit 0 diff --git a/perl-dns-zoneparse/PKGBUILD b/perl-dns-zoneparse/PKGBUILD index 2b63ce6..67697dc 100644 --- a/perl-dns-zoneparse/PKGBUILD +++ b/perl-dns-zoneparse/PKGBUILD @@ -10,7 +10,7 @@ license=('unknown') source=('http://search.cpan.org/CPAN/authors/id/M/MS/MSCHILLI/DNS-ZoneParse-1.10.tar.gz') md5sums=('663b517d731f939742550fa45118650e') sha256sums=('b96db6acf39bde6578dc3b83caa2e85fa4f5481c110ede83f1f95e1a3fb4124c') -depends=('perl' 'perl-storable>=0.407.0') +depends=('perl') makedepends=('perl-extutils-makemaker') options=(!emptydirs) diff --git a/perl-net-dns-sec/PKGBUILD b/perl-net-dns-sec/PKGBUILD index ca7af0a..e43d2d1 100644 --- a/perl-net-dns-sec/PKGBUILD +++ b/perl-net-dns-sec/PKGBUILD @@ -10,7 +10,7 @@ license=('unknown') source=('http://search.cpan.org/CPAN/authors/id/O/OL/OLAF/Net-DNS-SEC-0.16.tar.gz') md5sums=('70a8b59dda39a0effe22bfc12905d942') sha256sums=('3d5b542ec58060066573f84698add1ba811ed6e9ea10e2101a0d8fdea52cd6e4') -depends=(dnssec-root-zone-trust-anchors 'perl-crypt-openssl-bignum' 'perl-crypt-openssl-dsa>=0.100.0' 'perl-crypt-openssl-rsa' 'perl-digest-bubblebabble>=0.10.0' 'perl-digest-sha1' 'perl-digest-sha' 'perl-math-bigint' 'perl-mime-base32' 'perl-mime-base64' 'perl-net-dns' 'perl-time-local') +depends=(dnssec-root-zone-trust-anchors 'perl-crypt-openssl-bignum' 'perl-crypt-openssl-dsa>=0.100.0' 'perl-crypt-openssl-rsa' 'perl-digest-bubblebabble>=0.10.0' 'perl-digest-sha1' 'perl-digest-sha' 'perl-mime-base32' 'perl-net-dns') makedepends=('perl-extutils-makemaker') provides=('perl-net-dns-keyset=728' 'perl-net-dns-rr-dlv=580' 'perl-net-dns-rr-dnskey=847.' 'perl-net-dns-rr-ds=728.' 'perl-net-dns-rr-key=847.' 'perl-net-dns-rr-nsec3=510.' 'perl-net-dns-rr-nsec3param=510.' 'perl-net-dns-rr-nsec=813.' 'perl-net-dns-rr-nxt=318.' 'perl-net-dns-rr-rrsig=814.' 'perl-net-dns-rr-sig=777.' 'perl-net-dns-sec-private=816.') options=(!emptydirs) -- 2.30.2