From owner-freebsd-hackers Wed Jun 11 07:29:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id HAA26002 for hackers-outgoing; Wed, 11 Jun 1997 07:29:57 -0700 (PDT) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA25989 for ; Wed, 11 Jun 1997 07:29:52 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by agora.rdrop.com (8.8.5/8.8.5) with SMTP id HAA06322 for ; Wed, 11 Jun 1997 07:29:42 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id PAA09210; Wed, 11 Jun 1997 15:52:35 +0200 From: Luigi Rizzo Message-Id: <199706111352.PAA09210@labinfo.iet.unipi.it> Subject: Re: rtprio from non-root users ? To: dufault@hda.com (Peter Dufault) Date: Wed, 11 Jun 1997 15:52:35 +0200 (MET DST) Cc: luigi@iet.unipi.it, hackers@FreeBSD.ORG In-Reply-To: <199706111219.IAA02802@hda.hda.com> from "Peter Dufault" at Jun 11, 97 08:19:31 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > I am trying to allow non-root accounts to use CD-R devices. Although ... > > Of the following two fixes: > > > > a) modify the rtprio syscall so that it can set realtime priority > > for a restricted set of users (but then, how to configure this > > set ?); > > > > b) modify the rtprio(1) command so that it can run suid-root, by > > allowing RTP_SET for a configurable class of users (e.g. > > /etc/rtprio.users) and calling setuid to restore the real uid > > before calling execvp > > I have some of this now - can you wait a bit longer so we don't > collide? The problem with the current patches is they use ioctls > against a device and I have to change them to system calls. I have (yesterday night) implemented a small change to rtprio (check PRs in the last 24 hours, I don't remember the number) which reads allowed users from /etc/rtprio.conf . Jordan suggests to use the login.class database to add a rtprio capability, which seems a much better approach. I am not very much in favour of modifying the kernel if the desired functionality can be achieved in userspace. > I'm using a pseudo device that requires that you either be root or > have the device opened, then I use group protection on the device. ... > I've been thinking of changing this to an inherited per process > bit mask you set by opening a pseudo device. Then you get the > privileges by "cp /dev/null /dev/rtperms" and they stay for all > descendant processes until you give it up or have it revoked. > > Comments? frankly, the use of a capability file seems the simplest solution since permission are checked very rarely. Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________