On Thu, Jul 05, 2012 at 11:11:10AM +1000, Peter Jeremy wrote: > On 2012-Jul-04 19:10:08 -0400, Mike Meyer <m...@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)) _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"