emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add shell-quasiquote.


From: Eli Zaretskii
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Sun, 18 Oct 2015 20:32:31 +0300

> From: Random832 <address@hidden>
> Date: Sun, 18 Oct 2015 08:59:32 -0400
> 
> | Precisely what this function does depends on your operating
> | system. The function is designed to work with the syntax of your
> | system’s standard shell; if you use an unusual shell, you will
> | need to redefine this function.
> 
> But it doesn't bother explaining what operating systems it works on,

If the doc string doesn't say anything about limitations or special
considerations for specific OSes, it means the function works on all
supported systems.  That is the convention in Emacs (and elsewhere, I
believe): only state limitations, not the lack thereof.  Explicitly
mentioning the lack of limitations will unduly bloat the
documentation.

> what is an unusual shell

Any shell that is not the "system's standard shell" is unusual.  I
thought the text made that clear; if not, please suggest how to
clarify it (without having an exhaustive list of shells, which would
be a maintenance burden).

> or that _not_ having it defined in a way consistent with the shell
> has security implications.

Any undefined behavior can have security implications.  I hope that
once the domain of the function is now explained in the doc string,
users will be able to realize that for this particular function, if
they need to use a non-standard shell.

> I think this has contributed to Taylan having a "gut feeling" that
> it may not be secure on Windows, because it is difficult to
> understand the implementation and is not well-documented and the
> attitude is not a good sign. For example, ^-quoting is only applied
> if [%!"] are present, but is applied to [%!()"<>&|^]. Why? Who
> knows?

We do.  See the discussion that led to that code; it started here:

  http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00717.html

> Why does ms-dos have separate logic from nt?

Because the "standard shell" is different (command.cm instead of
cmd.exe), and the way to invoke inferior process via functions like
'system' differs.  The details are too many to describe here; if you
are interested, please read the sources of the DJGPP libc, available
from http://www.delorie.com/djgpp/cvs.html, and the accompanying
documentation here:

  http://www.delorie.com/djgpp/doc/libc-2.02/

> And I know there's nothing to be done for it, but the fact that it
> does not have any way to escape wildcards is concerning.

Sorry, I don't follow: in what situation do you think the wildcards
cannot be escaped?  Are you still talking about MS-Windows?




reply via email to

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