Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Feb 2015 20:27:56 +0300
From: Solar Designer <>
Subject: wordexp(3)


I found this curious and relevant to this list, off Twitter:

(x250) <%worr> RT @FioraAeterna: oh my gosh, Apple's libc literally implements "wordexp" by shelling out to perl:

<worr> So yesterday, @FioraAeterna tweeted this: I've decided to take a tour of wordexp(3) implementations
<@worr> They can't all be that bad
(x2) <@worr> NetBSD and FreeBSD both use a sh builtin to implement wordexp(3):
(x5) <@worr> OpenBSD wins the wordexp(3) contest, by refusing to implement it altogether.
<@worr> Correction: glibc implements a huge recursive descent parser, and only shells out when it needs to do subshell expansions.
<@worr> tbh, wordexp(3) is an antifeature. Maybe even a misfeature.
<@worr> Here's the implementation, btw:;a=blob;f=posix/wordexp.c;h=26f3a2653feba2b1a5904937d9d6b58c32109e24;hb=a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c#l872
<@worr> Continuing on my tour of wordexp(3) implementations, here's Illumos': It constructs a small shell script and runs it


Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.