]> granicus.if.org Git - sudo/commitdiff
FreeBSD wordexp() returns WRDE_SYNTAX if it can't write to the shell
authorTodd C. Miller <Todd.Miller@sudo.ws>
Tue, 5 Jun 2018 21:37:16 +0000 (15:37 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Tue, 5 Jun 2018 21:37:16 +0000 (15:37 -0600)
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

index ad726dc2c9c2e651ef6b447537e3f59a75685973..e83f42095e3541c336298812272830c4b9417661 100644 (file)
@@ -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;