diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2021-02-25 18:23:42 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2021-02-25 23:17:25 -0500 |
commit | f47223ff1258e1b6c5ea77f35c1ac3ecf16a8014 (patch) | |
tree | 03c01d275ab2b461df3e5e7ca1a8149f153f493a | |
parent | 7b1d0958b5e2db82fcc8a5da9de9df3c72b26975 (diff) | |
download | libfaketime-f47223ff1258e1b6c5ea77f35c1ac3ecf16a8014.tar.gz |
Include snippet for syscall() interception in library constructors
-rw-r--r-- | test/snippets/include_headers.h | 1 | ||||
-rw-r--r-- | test/snippets/syscall.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/test/snippets/include_headers.h b/test/snippets/include_headers.h index b9b8040..4ac8398 100644 --- a/test/snippets/include_headers.h +++ b/test/snippets/include_headers.h @@ -2,3 +2,4 @@ #include <sys/types.h> #include <unistd.h> #include <sys/random.h> +#include <sys/syscall.h> diff --git a/test/snippets/syscall.c b/test/snippets/syscall.c new file mode 100644 index 0000000..c475a83 --- /dev/null +++ b/test/snippets/syscall.c @@ -0,0 +1,2 @@ +long uid = syscall(__NR_getuid); +printf("[%s] syscall(__NR_getuid) -> %ld\n", where, uid); |