public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* Wrong exit code on failed SSH signing
@ 2024-02-06 16:24 Sergey Kosukhin
  2024-02-06 21:25 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Kosukhin @ 2024-02-06 16:24 UTC (permalink / raw)
  To: git

Hello!

There seems to be a bug in the sign_buffer_ssh function in
gpg-interface.c: a possible exit code of ssh-keygen is 255, which is
returned as-is by sign_buffer_ssh. The problem is that, for example,
the function build_tag_object in builtin/tag.c considers only negative
values as a failure. Since 255 >= 0, the error message "unable to sign
the tag" is not emitted and git exits normally with zero exit code. It
might be enough to return -1 in sign_buffer_ssh if ret is not zero.

I am sorry if this has already been reported or taken care of. Thank you.

Best regards,
Sergey

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-06 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 16:24 Wrong exit code on failed SSH signing Sergey Kosukhin
2024-02-06 21:25 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox