To:
[email protected] (=?UTF-8?Q?J=C3=B6rg_Schilling?=)
On Sun, 16 Aug 2020 at 14:43, Eli Zaretskii (
[email protected]) [via
[email protected]] <
[email protected]> wrote:
From: "A. Wik ([email protected]) [via [email protected]]" <[email protected]>
Date: Sun, 16 Aug 2020 08:01:13 +0000
What can I do about DJGPP-symlinks getting accidentally executed (eg. by COMMAND.COM) as binary executables because they have .exe or .com extensions? It can easily hang the machine.
Don't create symlinks with those extensions?
I don't do it deliberately. They are created by eg. "make install".
I guess some porting is required of those Makefiles.
I will look into that.
DJGPP already has an alternative mechanism for "links" to its
executables (via 'stubedit'), which avoids this problem. Would it
solve the problem to use that alternative for links to executables?
Partially. But then "ls" won't list them as links, right?
It won't, correct.
I actually found that you can create these symlinks *without* an
executable .extension, but making them point to an executable.
lrw-r--r-- 1 root dos 510 Aug 16 12:18 delmebsh -> bin/bsh.exe
"./delmebsh" will work in bash to invoke the executable, but it cannot
be executed by COMMAND.COM, which is good because the link file won't
be executed as a binary, but the sacrifice is that these links can't
be executed *at all* by the DOS shell (which of course is still better
than hanging the machine). One workaround is to always use bash, or
to copy the files instead of linking.
-aw
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)