[syslinux] CHDIR Directive?
Shao Miller
sha0.miller at gmail.com
Fri Dec 14 12:28:11 PST 2012
On 12/12/2012 21:00, H. Peter Anvin meant to write:
> On 12/12/2012 01:27 PM, Shao Miller wrote:
>> Perhaps it could be useful to have a "CHDIR" config-file directive? I'm
>> thinking it'd override anything passed by config.c32. I'm also thinking
>> it'd be a config-file-global, rather than a LABEL-specific, option.
>> Then a
>> config-file could set its own working directory without using
>> config.c32 as
>> an intermediate step. Does this seem like a reasonable feature to
>> have? -
>> Shao
>>
>> P. S. Maybe this already exists and I haven't read about it. If so, then
>> oops.
>>
>
> The problem with CHDIR is that it makes it very hard to deal with the
> fact that it suddenly matters "when" a certain path is interpreted. The
> reason this is currently mixed with the CONFIG directive is that that is
> a natural reset point anyway.
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.
- Shao Miller
More information about the Syslinux
mailing list