Re: [Fedora-packaging] Re: Mangling shebangs in text files: How to detect them, bug in the current implementation and possible solutions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 29, 2021 at 1:53 PM Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:
>
> On 25. 09. 21 11:12, Fabio Valentini wrote:
> > So, if I understand correctly, the problem is that right now there's
> > no *existing* tool that reliably detects if a given "executable" (has
> > mode +x) is an actual executable "script" with a valid shebang?
>
> - We need to detect "scripts" that are executable but have no shebnag.
> - We need to detect "scripts" that are executable and have a shebnag to mangle.
> - We might want to detect binary files that are executable but shouldn't be
>    (such as images), but this was not the original purpose of the BRP script.

If I gave you a program /usr/bin/isexec that determines if a file is a
valid executable, i.e.
- ELF binary with ELF header / magic number,
- PE binary with MZ magic number,
- script with shebang line (whether in need of mangling or not),
would that help?

(I.e. something like this POC: https://github.com/ironthree/isexec ?)

Fabio
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux