From 8b63ec654a1a82b14536673d1477658a1bc881ae Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 5 Jun 2018 15:37:16 -0600 Subject: [PATCH] FreeBSD wordexp() returns WRDE_SYNTAX if it can't write to the shell process. Since we've prevented execve() from succeeding this is the error we get back from wordexp() on FreeBSD. --- src/regress/noexec/check_noexec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/regress/noexec/check_noexec.c b/src/regress/noexec/check_noexec.c index ad726dc2c..e83f42095 100644 --- a/src/regress/noexec/check_noexec.c +++ b/src/regress/noexec/check_noexec.c @@ -143,6 +143,11 @@ try_wordexp(void) printf("%s: OK (wordexp) [%d]\n", getprogname(), rc); ret = 0; break; + case WRDE_SYNTAX: + /* FreeBSD returns WRDE_SYNTAX if it can't write to the shell process */ + printf("%s: OK (wordexp) [WRDE_SYNTAX]\n", getprogname()); + ret = 0; + break; case WRDE_CMDSUB: printf("%s: OK (wordexp) [WRDE_CMDSUB]\n", getprogname()); ret = 0; -- 2.40.0