On Tuesday, October 24, 2023, enh via austin-group-l at The Open Group <
austin-group-l@opengroup.org> wrote:

> netbsd checks that _PATH_BSHELL is exectuable with access(2)
> (but doesn't actually _execute_ anything). apple's copy of freebsd has
> a local change similar to the netbsd one. glibc seems to actually try
> to _run_ a shell:
> ```
> [pid 3612818] execve("/bin/sh", ["sh", "-c", "exit 0"], 0x7fff98502fe8
> ```
>

None of those guarantee that the shell is actually gonna work. I think they
all should just return 1.

but a
> POSIX system can have those kinds of features that could mean
> system(3) doesn't actually work _for this process_
>

Such a system should provide the means for testing if a process is in that
state, and the means shouldn't involve auditing the shell executable.


-- 
Oğuz
  • system(NULL) overly r... enh via austin-group-l at The Open Group
    • Re: system(NULL)... Oğuz via austin-group-l at The Open Group
      • Re: system(N... Jonathan Wakely via austin-group-l at The Open Group
        • Re: syst... Oğuz via austin-group-l at The Open Group
          • Re: ... Gabriel Ravier via austin-group-l at The Open Group
            • ... enh via austin-group-l at The Open Group
              • ... Gabriel Ravier via austin-group-l at The Open Group
            • ... Oğuz via austin-group-l at The Open Group
              • ... Gabriel Ravier via austin-group-l at The Open Group
                • ... Oğuz via austin-group-l at The Open Group
    • Re: system(NULL)... Robert Elz via austin-group-l at The Open Group

Reply via email to