summaryrefslogtreecommitdiff
path: root/pcr/apparmor-openrc
diff options
context:
space:
mode:
authorDavid P <megver83@openmailbox.org>2017-09-26 22:18:27 -0300
committerDavid P <megver83@openmailbox.org>2017-09-26 22:18:27 -0300
commit889bd5eb1c9f4d6018fcfad65724c0a67cf0d8d1 (patch)
treeb21b988db24618386bb6b3057c89dae4efe772b9 /pcr/apparmor-openrc
parentde9f81790af660d848c317a686716673b62ae39b (diff)
downloadabslibre-889bd5eb1c9f4d6018fcfad65724c0a67cf0d8d1.tar.gz
abslibre-889bd5eb1c9f4d6018fcfad65724c0a67cf0d8d1.tar.bz2
abslibre-889bd5eb1c9f4d6018fcfad65724c0a67cf0d8d1.zip
Added pcr/openrc-security
Diffstat (limited to 'pcr/apparmor-openrc')
-rw-r--r--pcr/apparmor-openrc/PKGBUILD32
-rw-r--r--pcr/apparmor-openrc/apparmor-init91
-rw-r--r--pcr/apparmor-openrc/apparmor.install12
3 files changed, 0 insertions, 135 deletions
diff --git a/pcr/apparmor-openrc/PKGBUILD b/pcr/apparmor-openrc/PKGBUILD
deleted file mode 100644
index 90200d530..000000000
--- a/pcr/apparmor-openrc/PKGBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# Maintainer: David P. <megver83@parabola.nu>
-
-pkgname=apparmor-openrc
-pkgver=20160816
-pkgrel=2
-pkgdesc="OpenRC apparmor init script"
-arch=('any')
-url="http://apparmor.net/"
-license=('GPL2')
-depends=('apparmor' 'openrc')
-install='apparmor.install'
-_filename='apparmor-init'
-source=("https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-apps/apparmor/files/$_filename")
-sha256sums=('fb8d7b46e682b452ba3061cca6eaf32b6a8f542208e35ea823e8c9c3bc89f764')
-
-#pkgver() {
-# date +%Y%m%d
-#}
-
-_inst_initd(){
- install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1
-
- sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \
- -e 's|/var/run|/run|g' \
- -i "${pkgdir}/etc/init.d/$1"
- # ^^--- should work without this, but actually does not (at boot)
-}
-
-package() {
- mv "$_filename" -v apparmor.initd
- _inst_initd 'apparmor'
-}
diff --git a/pcr/apparmor-openrc/apparmor-init b/pcr/apparmor-openrc/apparmor-init
deleted file mode 100644
index 2c7836b48..000000000
--- a/pcr/apparmor-openrc/apparmor-init
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Load all configured profiles for the AppArmor security module."
-description_reload="Reload all profiles"
-
-extra_started_commands="reload"
-
-aa_action() {
- local arg=$1
- local return
-
- shift
- $*
- return=$?
-
- if [ ${return} -eq 0 ]; then
- aa_log_success_msg $arg
- else
- aa_log_failure_msg arg
- fi
-
- return $return
-}
-
-aa_log_action_start() {
- ebegin $1
-}
-
-aa_log_action_end() {
- eend $1
-}
-
-aa_log_success_msg() {
- einfo $1
-}
-
-aa_log_warning_msg() {
- ewarn $1
-}
-
-aa_log_failure_msg() {
- eerror $1
-}
-
-aa_log_skipped_msg() {
- einfo $1
-}
-
-aa_log_daemon_msg() {
- einfo $1
-}
-
-aa_log_end_msg() {
- eend $1
-}
-
-. /usr/lib/apparmor/rc.apparmor.functions
-
-start() {
- ebegin "Starting AppArmor"
- eindent
-
- if ! is_apparmor_loaded ; then
- load_module
- if [ $? -ne 0 ]; then
- eerror "AppArmor kernel support is not present"
- eend 1
- return 1
- fi
- fi
-
- parse_profiles load
-
- eoutdent
-}
-
-stop() {
- ebegin "Stopping AppArmor"
- eindent
- apparmor_stop
- eoutdent
-}
-
-reload() {
- # todo: split out clean_profiles into its own function upstream
- # so we can do parse_profiles reload && clean_profiles
- # and do a proper reload instead of restart
- apparmor_restart
-}
diff --git a/pcr/apparmor-openrc/apparmor.install b/pcr/apparmor-openrc/apparmor.install
deleted file mode 100644
index a59542111..000000000
--- a/pcr/apparmor-openrc/apparmor.install
+++ /dev/null
@@ -1,12 +0,0 @@
-_svc="apparmor"
-_rlvl="boot"
-
-post_install() {
- _cmd="rc-update add ${_svc} ${_rlvl}"
- echo " ==> run '${_cmd}'"
-}
-
-post_remove() {
- _cmd="rc-update del ${_svc} ${_rlvl}"
- echo " ==> run '${_cmd}'"
-}