summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readconf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/readconf.c b/readconf.c
index 27b535e1f..d1b7871ec 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.307 2019/06/28 13:35:04 deraadt Exp $ */ 1/* $OpenBSD: readconf.c,v 1.308 2019/08/09 05:05:54 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -486,6 +486,11 @@ execute_in_shell(const char *cmd)
486 if ((shell = getenv("SHELL")) == NULL) 486 if ((shell = getenv("SHELL")) == NULL)
487 shell = _PATH_BSHELL; 487 shell = _PATH_BSHELL;
488 488
489 if (access(shell, X_OK) == -1) {
490 fatal("Shell \"%s\" is not executable: %s",
491 shell, strerror(errno));
492 }
493
489 /* Need this to redirect subprocess stdin/out */ 494 /* Need this to redirect subprocess stdin/out */
490 if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) 495 if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
491 fatal("open(/dev/null): %s", strerror(errno)); 496 fatal("open(/dev/null): %s", strerror(errno));