-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a few missing files to the last commit.
- Loading branch information
rsundahl
committed
Mar 8, 2018
1 parent
c864a76
commit a6c77eb
Showing
4 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define _GNU_SOURCE | ||
#include <dlfcn.h> // For dlsym() | ||
#include <stdio.h> // For i/o | ||
|
||
// NOOP read function for testing if LD_PRELOAD can be injected quietly. | ||
typedef | ||
ssize_t Read(int fd, void *buf, size_t count); | ||
ssize_t read(int fd, void *buf, size_t count) { | ||
Read *libc_read = (Read *) dlsym(RTLD_NEXT, "read"); | ||
ssize_t result = libc_read(fd, buf, count); | ||
|
||
return result; | ||
} // read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#define _GNU_SOURCE | ||
#include <stdlib.h> | ||
|
||
ssize_t dummy(int fd, void *buf, size_t count) { | ||
return 0; | ||
} // dummy() |