[syslinux] CHDIR Directive?

H. Peter Anvin hpa at zytor.com
Fri Dec 14 13:20:36 PST 2012


On 12/14/2012 12:28 PM, Shao Miller wrote:
> 
> Yes, this makes perfect sense for why it doesn't quite seem worth the
> effort and additional complication.  I have to admit that it was a bit
> of an X Y question while thinking about a recent thread...  I wondered
> if such a directive might have its own merit(s), however.
> 
> In regards to the X in the X Y, my impression is that it's not generally
> safe to "backtrack" in a URI, but appending is safe.  In other words,
> given a CWD of:
> 
>   http://webserver/some/path/
> 
> we would turn '../' into:
> 
>   http://webserver/some/path/../
> 
> (which my web-server handles just fine) instead of:
> 
>   http://webserver/some/
> 
> I just assume that the opacity of the URI CWD is the reason for this.
> (<- ?)  Of course, one can reset the CWD to a totally new URI.
> 

It depends on the scheme.  AFAIK it is well-defined in http but not in
ftp and especially not in tftp.  tftp doesn't even have a concept of
paths or directories, it just has "filenames" as opaque strings.

	-hpa



More information about the Syslinux mailing list