install-prompt for missing features (Was: Re: Pull in upstream before 9.1 code freeze?)

Jason Hellenthal jhellenthal at dataix.net
Thu Jul 5 04:22:44 UTC 2012



On Thu, Jul 05, 2012 at 11:11:10AM +1000, Peter Jeremy wrote:
> On 2012-Jul-04 19:10:08 -0400, Mike Meyer <mwm at 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))


More information about the freebsd-hackers mailing list