diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-01-30 19:22:13 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-01-30 19:22:13 +0100 |
commit | 9af7ca9fe68f21218259354776b19685583250c4 (patch) | |
tree | 1786cead2c272bed8f93f90a3b2c1305d3947105 /mempodipper.c | |
parent | Fix compilation someplaces. (diff) | |
download | CVE-2012-0056-9af7ca9fe68f21218259354776b19685583250c4.tar.xz CVE-2012-0056-9af7ca9fe68f21218259354776b19685583250c4.zip |
Some platforms don't support pipe2.
Diffstat (limited to 'mempodipper.c')
-rw-r--r-- | mempodipper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mempodipper.c b/mempodipper.c index 54dd26d..e17c069 100644 --- a/mempodipper.c +++ b/mempodipper.c @@ -102,7 +102,9 @@ unsigned long ptrace_address() { int fd[2]; printf("[+] Creating ptrace pipe.\n"); - pipe2(fd, O_NONBLOCK); + pipe(fd); + fcntl(fd[0], F_SETFL, O_NONBLOCK); + printf("[+] Forking ptrace child.\n"); int child = fork(); if (child) { |