mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "A. Wilcox" <awilfox@adelielinux.org>
To: musl@lists.openwall.com
Subject: Re: [musl] execvp() behaviour with unrecognized file header
Date: Wed, 12 Feb 2020 08:13:12 -0600	[thread overview]
Message-ID: <1286e416-808c-9795-f76d-d8efa7c0125f@adelielinux.org> (raw)
In-Reply-To: <6ead5f7b-d645-5df0-cb06-a99178471a96@bell-sw.com>


[-- Attachment #1.1: Type: text/plain, Size: 974 bytes --]

On 12/02/2020 07:54, Alexander Scherbatiy wrote:
> Hello,
> 
> execvp() works differently on Linux Alpine and Ubuntu if it is called
> with a file which does not contain a proper shebang line. The file is
> executed on Ubuntu. It results to  ENOEXEC error on Linux Alpine.
> 
> man execvp on Ubuntu has description: "If the header of a file isn't
> recognized (the attempted execve(2) failed with the error ENOEXEC),
> these functions will execute the shell (/bin/sh) with the path of the
> file as its first argument."
> 
> Does execvp() from musl behaves differently by purpose in this case?


This has been discussed before on this list:

https://www.openwall.com/lists/musl/2018/03/09/1

Since this is non-conformant to POSIX, Adélie integrated quinq's patch:
https://code.foxkit.us/adelie/musl/commit/16cbbea8e97d08e0fc6e9ccda0cf8b6e87ed6b82

Best,
--arw

-- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
https://www.adelielinux.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-02-12 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 13:54 Alexander Scherbatiy
2020-02-12 14:13 ` A. Wilcox [this message]
2020-02-12 14:27   ` Rich Felker
2020-02-12 20:01     ` A. Wilcox
2020-02-13 10:02     ` Micha Nelissen
2020-02-13 18:29       ` Rich Felker
2020-02-13 20:11 ` Markus Wichmann
2020-02-13 23:21   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286e416-808c-9795-f76d-d8efa7c0125f@adelielinux.org \
    --to=awilfox@adelielinux.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).