Created
January 31, 2011 07:28
-
-
Save rodjek/803738 to your computer and use it in GitHub Desktop.
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
#include <dlfcn.h> | |
#include <stdio.h> | |
#include <syslog.h> | |
int unlink(const char * path) { | |
openlog("unlink-logger", LOG_PID, LOG_USER); | |
syslog(LOG_INFO, path); | |
closelog(); | |
typedef int (*FP_unlink)(const char*); | |
FP_unlink org_unlink = dlsym(((void *) -1l), "unlink"); | |
return org_unlink(path); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment