Mine
public text v1 · immutable#define _GNU_SOURCE
#include <stdio.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/stat.h>
int (*ropen)(const char *pathname, int flags, mode_t mode);
int open_shlib(void){
ropen = dlsym(RTLD_NEXT,"open");
return 0;
}
int open(const char *pathname, int flags, mode_t mode){
printf("%s\n",pathname);
return ropen(pathname, flags, mode);
}