summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Weiler <pylon@gentoo.org>2004-10-31 02:03:29 +0000
committerLars Weiler <pylon@gentoo.org>2004-10-31 02:03:29 +0000
commitc39260be1243d03027fabfad4c4cf3c552e2c517 (patch)
treec9a1c8e8913fcebd118b2e8137708651164bf5cd /sys-apps/resmgr
parentBump to version 0.6_beta. Closes bug #67889. (Manifest recommit) (diff)
downloadgentoo-2-c39260be1243d03027fabfad4c4cf3c552e2c517.tar.gz
gentoo-2-c39260be1243d03027fabfad4c4cf3c552e2c517.tar.bz2
gentoo-2-c39260be1243d03027fabfad4c4cf3c552e2c517.zip
Thanks to Stefan Briesenick for this ebuild in Bug #38122.
Diffstat (limited to 'sys-apps/resmgr')
-rw-r--r--sys-apps/resmgr/ChangeLog11
-rw-r--r--sys-apps/resmgr/Manifest6
-rw-r--r--sys-apps/resmgr/files/README.gentoo39
-rw-r--r--sys-apps/resmgr/files/desktopdev12
-rw-r--r--sys-apps/resmgr/files/digest-resmgr-1.01
-rw-r--r--sys-apps/resmgr/files/resmgrd.confd1
-rw-r--r--sys-apps/resmgr/files/resmgrd.rc21
-rw-r--r--sys-apps/resmgr/metadata.xml8
-rw-r--r--sys-apps/resmgr/resmgr-1.0.ebuild46
9 files changed, 145 insertions, 0 deletions
diff --git a/sys-apps/resmgr/ChangeLog b/sys-apps/resmgr/ChangeLog
new file mode 100644
index 000000000000..29ef8b705508
--- /dev/null
+++ b/sys-apps/resmgr/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sys-apps/resmgr
+# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/resmgr/ChangeLog,v 1.1 2004/10/31 02:03:29 pylon Exp $
+
+*resmgr-1.0 (31 Oct 2004)
+
+ 31 Oct 2004; Lars Weiler <pylon@gentoo.org> +metadata.xml,
+ +files/README.gentoo, +files/desktopdev, +files/resmgrd.confd,
+ +files/resmgrd.rc, +resmgr-1.0.ebuild:
+ Thanks to Stefan Briesenick for this ebuild in Bug #38122.
+
diff --git a/sys-apps/resmgr/Manifest b/sys-apps/resmgr/Manifest
new file mode 100644
index 000000000000..a034ada39533
--- /dev/null
+++ b/sys-apps/resmgr/Manifest
@@ -0,0 +1,6 @@
+MD5 f7794634bb4542d966e768f928bb21b4 resmgr-1.0.ebuild 1492
+MD5 7070484a957c6df9a2596c47b2e1e57e files/resmgrd.confd 16
+MD5 394244f9bd1bc2471fb7c9e02fe597e6 files/resmgrd.rc 492
+MD5 b7e1e7081f910cac837bc24c429cfac5 files/digest-resmgr-1.0 62
+MD5 e42318eac112c1bd4d4e2645a6f094fe files/README.gentoo 1294
+MD5 ee1fd044e65e19dba48dcf15ae0b21c1 files/desktopdev 364
diff --git a/sys-apps/resmgr/files/README.gentoo b/sys-apps/resmgr/files/README.gentoo
new file mode 100644
index 000000000000..a288524bc60c
--- /dev/null
+++ b/sys-apps/resmgr/files/README.gentoo
@@ -0,0 +1,39 @@
+
+
+Installing the resource manager
+
+In order to use the resource manager, all you need to do is add the
+pam_resmgr module to your PAM files, and adjust the access control lists
+in /etc/resmgr.conf.
+
+When adding pam_resmgr to "local" login facilities such as XDM,
+it makes sense to give all users access to certain resource classes,
+e.g. a resource class named "desktop" that includes all devices
+a typical desktop user may need. To do so, use the following
+line
+
+ session optional pam_resmgr.so grant=desktop
+
+If you want to support X terminals, you may want to limit
+access to desktop devices only to the local X session, but
+not give any access to remote X terminals. To do so, remove
+the "grant=desktop" statement and use the following access control
+rule in /etc/resmgr.conf:
+
+ allow desktop tty=:0
+
+You can also add resmgr support to SSH sessions by editing
+/etc/pam.d/ssh, and adding the following line:
+
+ session optional pam_resmgr.so fake_ttyname
+
+Again, there's probably no point in giving all users logging
+in via ssh access to any devices by default. However, it may
+be useful to grant specific users access to certains classes
+of devices. For instance, the following gives user "kf"
+access to the scanner device:
+
+ class scanners
+ add /dev/scanner scanners
+ allow scanners user=kf
+
diff --git a/sys-apps/resmgr/files/desktopdev b/sys-apps/resmgr/files/desktopdev
new file mode 100644
index 000000000000..19645a465bc4
--- /dev/null
+++ b/sys-apps/resmgr/files/desktopdev
@@ -0,0 +1,12 @@
+#!/bin/bash
+# This adds a USB device to the "desktop usb" group.
+# You just need to create an entry "desktopdev ..." in a usermap file
+# and it will be picked up automatically.
+
+if [ -x /sbin/resmgr ]; then
+ if [ "${ACTION}" = "add" ]; then
+ /sbin/resmgr ${ACTION} ${DEVICE} desktop usb && exit 0
+ else
+ /sbin/resmgr ${ACTION} ${DEVICE} desktop && exit 0
+ fi
+fi
diff --git a/sys-apps/resmgr/files/digest-resmgr-1.0 b/sys-apps/resmgr/files/digest-resmgr-1.0
new file mode 100644
index 000000000000..645fefb947b3
--- /dev/null
+++ b/sys-apps/resmgr/files/digest-resmgr-1.0
@@ -0,0 +1 @@
+MD5 c231de6ca7d59265eeeccdfcb8090801 resmgr-1.0.tar.bz2 34945
diff --git a/sys-apps/resmgr/files/resmgrd.confd b/sys-apps/resmgr/files/resmgrd.confd
new file mode 100644
index 000000000000..663cb7b07d52
--- /dev/null
+++ b/sys-apps/resmgr/files/resmgrd.confd
@@ -0,0 +1 @@
+RESMGRD_OPTS=""
diff --git a/sys-apps/resmgr/files/resmgrd.rc b/sys-apps/resmgr/files/resmgrd.rc
new file mode 100644
index 000000000000..4509ea402ec7
--- /dev/null
+++ b/sys-apps/resmgr/files/resmgrd.rc
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/resmgr/files/resmgrd.rc,v 1.1 2004/10/31 02:03:29 pylon Exp $
+
+depend() {
+ before cron
+ need hotplug
+}
+
+start() {
+ ebegin "Starting resource manager"
+ /sbin/resmgrd -- ${RESMGRD_OPTS}
+ eend $? "Failed to start the resource manager"
+}
+
+stop() {
+ ebegin "Stopping the resource manager"
+ /sbin/resmgrd -k
+ eend $?
+}
diff --git a/sys-apps/resmgr/metadata.xml b/sys-apps/resmgr/metadata.xml
new file mode 100644
index 000000000000..66e0c3df3934
--- /dev/null
+++ b/sys-apps/resmgr/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>pylon@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/resmgr/resmgr-1.0.ebuild b/sys-apps/resmgr/resmgr-1.0.ebuild
new file mode 100644
index 000000000000..d1aa52e2227f
--- /dev/null
+++ b/sys-apps/resmgr/resmgr-1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/resmgr/resmgr-1.0.ebuild,v 1.1 2004/10/31 02:03:29 pylon Exp $
+
+DESCRIPTION="Resource manager that will provide unprivileged users access to device files"
+HOMEPAGE="http://rechner.lst.de/~okir/resmgr/"
+SRC_URI="ftp://ftp.lst.de/pub/people/okir/resmgr/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+
+DEPEND="sys-apps/hotplug
+ sys-libs/pam"
+
+IUSE=""
+
+src_compile() {
+ emake CFLAGS="$CFLAGS" || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dosym $(basename ${D}/lib/libresmgr.so.*) /lib/libresmgr.so
+ exeinto /etc/init.d
+ newexe "${FILESDIR}/resmgrd.rc" resmgrd
+ insinto /etc/conf.d
+ newins "${FILESDIR}/resmgrd.confd" resmgrd
+ exeinto /etc/hotplug/usb
+ newexe "${FILESDIR}/desktopdev" desktopdev
+ dodoc ANNOUNCE COPYING INSTALL README TODO
+ dodoc "${FILESDIR}/README.gentoo"
+}
+
+pkg_postinst() {
+ ewarn "You need to define access control lists in /etc/resmgr.conf"
+ ewarn "For a start, it is probably a good idea to add a rule such as"
+ ewarn " allow desktop tty=:0"
+ ewarn "which will give everyone logged in via kdm/gdm access to"
+ ewarn "resource class desktop."
+ echo
+ ewarn "Then start the daemon by running /etc/init.d/resmgrd start"
+ ewarn "and add pam_resmgr.so to the PAM configuration file that"
+ ewarn "controls your graphical login. Depending on your desktop,"
+ ewarn "this will be /etc/pam.d/xdm, /etc/pam.d/gdm, /etc/pam.d/kdm,"
+ ewarn "or /etc/pam.d/kde."
+}