X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=mb+EgHIOwYu1QyY+M+oVO28R8QaUvkNKd1iDxQXSc0E=; b=lH0NkWMPC7Obrr0WSCMxDVLxZw8NNzjoTM9o692T/BMu8xiLWnuO/W6pzPxBIgfGJA jRGzE3Tw4wHZLji396HNfg/LUhiqj92DoLeB6L3MGletmcA+31kT5naP4JdoZjTOtkhz mh2Upu9FMj/x0e3SUX6nXIcF90+C0iLK9DzilAQ9sxfUz/AYNXJu2cuZHPPJSbLmFKX2 PsvmY4/UYTNO4wWHwHjUonEcSGZGSwGgF/GIqpUcE+uDhcGvtT9unZZEnJig8HZMAP7E aqYTEziaYFCzI+zlA5cixWy0Lt9SwDqcM5YXE3FySKHNwOPBFJv+v2M3LccawCu9vB0+ qNZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=mb+EgHIOwYu1QyY+M+oVO28R8QaUvkNKd1iDxQXSc0E=; b=WsUo1SrdXYAQzFuOeeQPhG9mEb+5vkoV0Oscd0k/oRsihCMGx2ECWRWn8oWOAHo8Uh 1Mft2noFP0ORyphX8OH5qPtYhkM262d9UZSop5FbEDfON7idReDj7YfqcsP4+q49Mh6f yRgpCc1rR37GCjzCUUTUV3fIF2x5CCN9QSS4/eN4n0NUc4JSm3L41aKg1BdH6ffrD7zP 2aiLwEAIuGGaltJ7iBw0oWLdNsWRtvETxGKs2G7IHRrUHwZ2JbKFX05x3KmTBbn7R0gp WCR+i2Baq2I0BezpwKDAQDWfFkI/0r/+Fknq757RcFwRlOquQAGuazrmW2x99Lu7gI3/ sYdA== X-Gm-Message-State: AOAM5326dFjIqG0Vu/ucXRdAdlgRHnM19TM19PzSm/g9Gpytmge0Bfh6 c3aKXzWQUGhlLkf36y2dWVdPHP9NOBpxdiuWFOmgQAVU X-Google-Smtp-Source: ABdhPJx/enrBuHfbmSLlxUJvcsY35Vg6yfnneN5lN59VbNBgqG+HbBIvoYCc3IS/u/CT8oaVTLOr0sK99vXDyBrO8Aw= X-Received: by 2002:a2e:8945:: with SMTP id b5mr5197739ljk.381.1597590735673; Sun, 16 Aug 2020 08:12:15 -0700 (PDT) MIME-Version: 1.0 References: <83wo1ziwex DOT fsf AT gnu DOT org> <83k0xyirpr DOT fsf AT gnu DOT org> In-Reply-To: <83k0xyirpr.fsf@gnu.org> From: "A. Wik (awik32 AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Sun, 16 Aug 2020 15:12:04 +0000 Message-ID: Subject: Re: Symlinks with executable extensions (suffixes) To: djgpp AT delorie DOT com, =?UTF-8?Q?J=C3=B6rg_Schilling?= Content-Type: text/plain; charset="UTF-8" Reply-To: djgpp AT delorie DOT com On Sun, 16 Aug 2020 at 14:43, Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com] wrote: > > > From: "A. Wik (awik32 AT gmail DOT com) [via djgpp AT delorie DOT com]" > > 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