Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2012 00:22:27 -0400
From:      Jason Hellenthal <jhellenthal@dataix.net>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Mike Meyer <mwm@mired.org>
Subject:   Re: install-prompt for missing features (Was: Re: Pull in upstream before 9.1 code freeze?)
Message-ID:  <20120705042227.GC392@DataIX.net>
In-Reply-To: <20120705011110.GA27618@server.rulingia.com>
References:  <CAC8HS2Hx%2BqV1zYSzyM6wYzbyA6BStd3HEwc-VDhv40DHM=qCvw@mail.gmail.com> <CAOjFWZ5ikPz_yDhEQutiXVG354qRHYJTn-M_S4Cx-=YRgFP7eQ@mail.gmail.com> <20120704185104.GA42355@DataIX.net> <4FF4B36A.2040608@FreeBSD.org> <20120704180134.7c649e1b@bhuda.mired.org> <4FF4BEED.10103@FreeBSD.org> <4FF4CA45.7070502@rawbw.com> <4FF4CB54.1060004@FreeBSD.org> <20120704191008.0aa46225@bhuda.mired.org> <20120705011110.GA27618@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, Jul 05, 2012 at 11:11:10AM +1000, Peter Jeremy wrote:
> On 2012-Jul-04 19:10:08 -0400, Mike Meyer <mwm@mired.org> wrote:
> >My first thought was to suggest it be a port as well, but I'm not sure
> >that can be done sanely.
> 
> The easiest way is probably to implement some form of generic "command
> not found" hook into sh(1) and tcsh(1) - in interactive mode, if a
> specific function exists, execute it rather than reporting an error
> message .  The actual functionality to map a command name to a port
> and suggest it to the user could nten be implemented separately as a
> port and the user would enable it by adding the appropriate function
> definition to their .profile/.login/.[t]cshrc files.
> 
> Note that I'm not currently interested in this functionality and am
> not volunteering to implement it.
> 

Still appreciated input.


I think it might be easier to make use "securely" of LD_PRELOAD and
write a library with very specific functions and maybe even functions
that will call in pkgng functions and such.

LD_PRELOAD - Within interactive shell only load the functions...
Check interactivity.
Check return codes of commands issued.
Make sure its a secure path and that any file referenced should not be
owned by the user or writable by anyone else ... etc... etc... 
Check a database against plist mappings to packages for only those
things that would be in the users PATH.
Check to make sure that the user is in a preconfigured group of users
authorized to be pestered by prompts..
- probably more -





-- 

 - (2^(N-1))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120705042227.GC392>