+++ /dev/null
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-daemon="rklogd"
-rsbac_info="/proc/rsbac-info"
-
-start() {
- ebegin "Starting rklogd"
-
- local ret
- if [ -d "${rsbac_info}" ]; then
- if type run-jail >/dev/null 2>&1; then
- $(which run-jail) $daemon start-stop-daemon --start --exec $(which ${daemon})
- else
- start-stop-daemon --start --exec $(which ${daemon})
- fi
- ret=$?
- else
- ewarn "No rsbac-info directory avaible."
- ret=1
- fi
-
- eend $ret
-}
-
-stop() {
- ebegin "Stopping rklogd"
- start-stop-daemon --stop --exec $(which ${daemon})
- eend $?
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <maintainer type="project">
- <email>hardened@gentoo.org</email>
- <name>Gentoo Hardened</name>
- </maintainer>
- <longdescription lang="en">
- Administrative tool for RSBAC system
- </longdescription>
- <use>
- <flag name="rklogd">Enabled deprecated RSBAC kernel logger</flag>
- </use>
-</pkgmetadata>
+++ /dev/null
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit multilib toolchain-funcs
-
-DESCRIPTION="Rule Set Based Access Control (RSBAC) Admin Tools"
-HOMEPAGE="http://www.rsbac.org/"
-SRC_URI="http://download.rsbac.org/code/${PV}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-# using rklogd is deprecated but offer the option since it is fully removed
-# from source
-IUSE="pam rklogd"
-
-DEPEND="
- dev-util/dialog
- pam? ( sys-libs/pam )
- sys-apps/baselayout
- >=sys-libs/ncurses-5.2"
-
-RDEPEND="${DEPEND}"
-
-src_compile() {
- local rsbacmakeargs="libs tools"
- use rklogd && rsbacmakeargs="${rsbacmakeargs} rklogd"
- use pam && rsbacmakeargs="${rsbacmakeargs} pam nss"
- emake PREFIX=/usr LIBDIR=/$(get_libdir) ${rsbacmakeargs}
-}
-
-src_install() {
- local rsbacinstallargs="headers-install libs-install tools-install"
- use rklogd && rsbacinstallargs="${rsbacinstallargs} rklogd-install"
- use pam && rsbacinstallargs="${rsbacinstallargs} pam-install nss-install"
- emake PREFIX=/usr LIBDIR=/$(get_libdir) DESTDIR="${D}" ${rsbacinstallargs}
-
- use rklogd && doinitd "${FILESDIR}"/rklogd
-
- insinto /etc
- doins "${FILESDIR}"/rsbac.conf
-
- #FHS compliance
- dodir /usr/$(get_libdir)
- mv "${D}"/$(get_libdir)/librsbac.{,l}a "${D}"/usr/$(get_libdir)
- mv "${D}"/$(get_libdir)/libnss_rsbac.{,l}a "${D}"/usr/$(get_libdir)
- gen_usr_ldscript librsbac.so
- gen_usr_ldscript libnss_rsbac.so
-}
-
-pkg_postinst() {
- einfo "********************************************************************************"
- einfo "You have to add a security user to your system if you have not already done so."
- einfo "The name could be 'secoff' or 'security' and, if you did not change the default"
- einfo "uid in the RSBAC kernel configuration, then the following will work:"
- einfo
- einfo " groupadd -g 400 security"
- einfo " useradd -g 400 -u 400 security"
- einfo
- einfo "We suggest you run a separate copy of syslog-ng (for example) to log RSBAC"
- einfo "messages as user 'audit' (uid 404) instead of using the deprecated rklogd."
- einfo "See"
- einfo
- einfo " http://www.rsbac.org/documentation/administration_examples/syslog-ng"
- einfo
- einfo "for more information."
- einfo "********************************************************************************"
-}