Skip to main content
Topic: /etc/pinentry/preexec lists unfunctional shebang (Read 235 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

/etc/pinentry/preexec lists unfunctional shebang

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

Re: /etc/pinentry/preexec lists unfunctional shebang

Reply #1
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.

Re: /etc/pinentry/preexec lists unfunctional shebang

Reply #2
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 …