Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: l3u on 10 March 2024, 09:37:02

Title: /etc/pinentry/preexec lists unfunctional shebang
Post by: l3u on 10 March 2024, 09:37:02
Hi all,

I just found Artix's pinentry concept, having /usr/bin/pinentry as a script, and /etc/pinentry/preexec for additional tweaks.

The problem is that /etc/pinentry/preexec lists an invalid shebang as the interpreter:
Code: [Select]
#!/hint/sh
which of course leads to
Code: [Select]
bash: ./preexec: cannot execute: required file not found
when the script is actually started. Should be "#!/bin/sh" or such imo.

Maybe, you want to fix this?

Cheers, Tobias
Title: Re: /etc/pinentry/preexec lists unfunctional shebang
Post by: nous on 11 March 2024, 21:31:13
The #!/hint/sh shebang doesn't work the way you think it does and is not invoked by /usr/bin/pinentry the way you described. You may want to grep pinentry for details.
Title: Re: /etc/pinentry/preexec lists unfunctional shebang
Post by: l3u on 12 March 2024, 09:51:34
Okay … so /usr/bin/pinentry includes
Code: [Select]
# site-defined pre-exec hook
test -r /etc/pinentry/preexec &&
    . /etc/pinentry/preexec
which evaluates the content of /etc/pinentry/preexec …

But for doing so, /etc/pinentry/preexec doesn't have to have a shebang at all, and it also doesn't need an executable bit …

Well, at least, I think this is confusing … I would, in this case, rather expect it to be non-executable (as it's not meant to be started itself and doesn't need to be) and a comment like "This is a shell script evaluated by /usr/bin/pinentry" or such, to make clear what it is …