From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] profiles/default/linux: export cache variables for sed and friends
Date: Tue, 10 Dec 2024 17:03:03 -0500 [thread overview]
Message-ID: <Z1i6l95tW43g7aH7@mertle> (raw)
In-Reply-To: <9c178e9d-5f22-4e2f-952a-5bfb9eb87b65@gentoo.org>
On 2024-12-10 14:33:26, Eli Schwartz wrote:
> On 12/10/24 1:31 PM, Michael Orlitzky wrote:
> > On 2024-12-10 00:54:11, Eli Schwartz wrote:
> >>
> >> What circumstances other than a shebang might break without a full path?
> >
> > When PATH is not reliable, like inside a cron job. Or arguments to execve().
>
> execve doesn't make any sense to me as an argument. I don't think I've
> ever in my life either seen or heard of software that did a
> configure-time check for the full abspath of a file in order to solve
> the fact that execve doesn't search on PATH. They simply used execvpe
> instead.
>
> ...
>
> For the execve case it's possible to write a proof of concept
> demonstrating the issue, but writing a PoC to demonstrate that people
> can write incorrect code doesn't prove that people *do* write incorrect
> code so the logic is circular.
I think you think I'm making an argument that I'm not making. Here's
the scenario I imagine:
* I want to run sed from another program
* I put AC_PROG_SED in configure.ac
* I notice that $SED is an absolute path, so I use execve() to run
it
Or, maybe more realistically, suppose I don't know WTF I'm doing and
choose execve() from the list of exec* methods because I tried it and
works. I'm not using execve (as opposed to execvpe) to solve any
particular problem here, it's just what happened.
prev parent reply other threads:[~2024-12-10 22:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 22:55 [gentoo-dev] [PATCH] profiles/default/linux: export cache variables for sed and friends Sam James
2024-12-06 0:44 ` Michael Orlitzky
2024-12-10 5:46 ` Sam James
2024-12-10 8:02 ` Ionen Wolkens
2024-12-10 8:13 ` Sam James
2024-12-10 8:26 ` Eli Schwartz
2024-12-10 8:57 ` Ionen Wolkens
2024-12-10 9:22 ` Ionen Wolkens
2024-12-10 5:54 ` Eli Schwartz
2024-12-10 18:31 ` Michael Orlitzky
2024-12-10 19:33 ` Eli Schwartz
2024-12-10 22:03 ` Michael Orlitzky [this message]
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=Z1i6l95tW43g7aH7@mertle \
--to=mjo@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox