[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with exported functions

From: Dan Douglas
Subject: Re: Issues with exported functions
Date: Thu, 25 Sep 2014 09:55:15 -0500
User-agent: KMail/4.14 (Linux/3.16.2; KDE/4.14.0; x86_64; ; )

On Thursday, September 25, 2014 10:29:16 AM Chet Ramey wrote:
> On 9/25/14, 10:25 AM, Dan Douglas wrote:
> > Have you considered the FPATH mechanism? Exploiting it requires being able 
> > create files and set FPATH accordingly. I've had some success with the 
> > function loader code in examples/functions/autoload.*. I believe it serves 
> > mostly the same purpose as exported functions.
> I have thought about it, but it is even less backwards compatible than
> the other suggestions.


I guess one key point is that it's "lazy" and only gets checked if a command 
doesn't exist. A user could implement function import entirely by means of 
command_not_found_handle - searching only for a function with the name given 
in "$1", which should be inherently more secure than looking at every variable 
at startup.

Dan Douglas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]