commit 7a86002db34d49472a7d75c1802ee99c2120ef3c from: Omar Polo date: Fri Feb 16 20:40:51 2024 UTC improve execv error message spotted using -portable on a system without openssh installed. Showing the program we've failed to exec can be handy. ok stsp@ commit - 51f4d4cb56fbe32cd3511fb8d301525ef79483e0 commit + 7a86002db34d49472a7d75c1802ee99c2120ef3c blob - 37f513651fb8783483a1bb2e446a59adf26cfda6 blob + a62a66955551cf4c7ffc2e812edd977b8570e344 --- lib/dial.c +++ lib/dial.c @@ -298,7 +298,7 @@ got_dial_ssh(pid_t *newpid, int *newfd, const char *ho if (strlcpy(cmd, command, sizeof(cmd)) >= sizeof(cmd)) err(1, "snprintf"); if (execv(GOT_DIAL_PATH_SSH, (char *const *)argv) == -1) - err(1, "execv"); + err(1, "execv %s", GOT_DIAL_PATH_SSH); abort(); /* not reached */ } else { if (close(pfd[0]) == -1) blob - a51d5610cd2c6be2596b758258e73b8c6ce621c4 blob + 6bc81f0d35b8cb0845c3b405676d88017dcbcabb --- lib/sigs.c +++ lib/sigs.c @@ -124,7 +124,7 @@ got_sigs_sign_tag_ssh(pid_t *newpid, int *in_fd, int * if (dup2(out_pfd[1], 1) == -1) err(1, "dup2"); if (execv(GOT_TAG_PATH_SSH_KEYGEN, (char **const)argv) == -1) - err(1, "execv"); + err(1, "execv %s", GOT_TAG_PATH_SSH_KEYGEN); abort(); /* not reached */ } if (close(in_pfd[0]) == -1) @@ -350,7 +350,7 @@ got_sigs_verify_tag_ssh(char **msg, struct got_tag_obj if (dup2(out_pfd[1], 1) == -1) err(1, "dup2"); if (execv(GOT_TAG_PATH_SSH_KEYGEN, (char **const)argv) == -1) - err(1, "execv"); + err(1, "execv %s", GOT_TAG_PATH_SSH_KEYGEN); abort(); /* not reached */ } if (close(in_pfd[0]) == -1) {