From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 17:16:36 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A394837B401 for ; Tue, 8 Apr 2003 17:16:36 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED8C043FAF for ; Tue, 8 Apr 2003 17:16:35 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0311.cvx21-bradley.dialup.earthlink.net ([209.179.193.56] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1933GO-0005LH-00; Tue, 08 Apr 2003 17:16:29 -0700 Message-ID: <3E936602.24CC4EE2@mindspring.com> Date: Tue, 08 Apr 2003 17:14:58 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <86vfxpmov5.fsf@pseiko.studfb.unibw-muenchen.de> <20030408192718.GP1280@garage.freebsd.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4a588bfb349debbeb65e22b3888c292a2387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Steffen Mazanek Subject: Re: Idea related to UNIX directories X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 00:16:36 -0000 Pawel Jakub Dawidek wrote: > > On Tue, Apr 08, 2003 at 09:26:22AM +0200, Steffen Mazanek wrote: > +> I think it would be quit useful to allow some > +> code to be related to e.g. the i-nodes of directories. > +> Consider therefore an example. At first, all > +> directories have a default assignment to save > +> memory. This default assignment may realize > +> permission related stuff. Now some privileged users > +> have the permission to add their own code, which > +> must implement an interface and some standard > +> functions and in addition they are able to trigger > +> some events, e.g. write something to a log-file > +> whenever a user enters the directory or start > +> an application. > +> > +> What do you think about this idea? Is it feasible > +> at all? > > You can try CerbNG, it provides much more than you want. > > http://cerber.sourceforge.net > > There is policy that privide logging of execve() calls with arguments > and all interesting process informations: > > http://cerber.sourceforge.net/policies/log-exec.cb > > You can write policy that will log interesting events with some prefix > and write program that will catch those logs and handle with catched > event. > > If you give me some examples I could help you to write suitable policies. His description indicated that he wants the moral equivalent of database triggers, on lin a filesystem, instead of as a result of having installed database software that supports triggers (e.g. Postgres, from ports). He says he wants to associate some code with the operation, not just be notified of the operation. This would be really easy to abuse, and it might even be possible to abuse to toe-nail in some nasty code. You would also need to substantially revamp per-file attribute storage for the stored scripting code associated with the trigger; in an SQL server, the stored code is stored in a metadata record associated with the object itself. Same for stored code for the LDAP record triggers in the iPlanet and Microsoft Active Directory. -- Terry