summaryrefslogtreecommitdiff
path: root/ssh-sk-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-sk-client.c')
-rw-r--r--ssh-sk-client.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ssh-sk-client.c b/ssh-sk-client.c
index 9121570dc..359327b68 100644
--- a/ssh-sk-client.c
+++ b/ssh-sk-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-sk-client.c,v 1.5 2020/01/10 23:43:26 djm Exp $ */ 1/* $OpenBSD: ssh-sk-client.c,v 1.6 2020/01/21 07:07:31 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2019 Google LLC 3 * Copyright (c) 2019 Google LLC
4 * 4 *
@@ -21,6 +21,7 @@
21#include <sys/socket.h> 21#include <sys/socket.h>
22#include <sys/wait.h> 22#include <sys/wait.h>
23 23
24#include <fcntl.h>
24#include <limits.h> 25#include <limits.h>
25#include <errno.h> 26#include <errno.h>
26#include <signal.h> 27#include <signal.h>
@@ -56,6 +57,13 @@ start_helper(int *fdp, pid_t *pidp, void (**osigchldp)(int))
56 helper = getenv("SSH_SK_HELPER"); 57 helper = getenv("SSH_SK_HELPER");
57 if (helper == NULL || strlen(helper) == 0) 58 if (helper == NULL || strlen(helper) == 0)
58 helper = _PATH_SSH_SK_HELPER; 59 helper = _PATH_SSH_SK_HELPER;
60 if (access(helper, X_OK) != 0) {
61 oerrno = errno;
62 error("%s: helper \"%s\" unusable: %s", __func__, helper,
63 strerror(errno));
64 errno = oerrno;
65 return SSH_ERR_SYSTEM_ERROR;
66 }
59#ifdef DEBUG_SK 67#ifdef DEBUG_SK
60 verbosity = "-vvv"; 68 verbosity = "-vvv";
61#endif 69#endif