We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f264269 commit f4dcda1Copy full SHA for f4dcda1
1 file changed
sdbd.c
@@ -4018,7 +4018,6 @@ main(int argc, char *const argv[])
4018
{
4019
unsigned long value;
4020
int arg, optidx, logfd;
4021
- struct stat stbuf;
4022
int retval;
4023
4024
logfd = -1;
@@ -4107,8 +4106,8 @@ main(int argc, char *const argv[])
4107
4106
if (!sdbd_shell)
4108
sdbd_shell = "/bin/sh";
4109
4110
- if (stat(sdbd_shell, &stbuf)) {
4111
- fprintf(stderr, "Shell interpreter not found: '%s'\n", sdbd_shell);
+ if (access(sdbd_shell, X_OK)) {
+ fprintf(stderr, "Shell interpreter error: '%s' (%m)\n", sdbd_shell);
4112
exit(1);
4113
}
4114
0 commit comments