diff --git a/plugins/dlsym b/plugins/dlsym index 7b9f48c5..819b25a2 100755 Binary files a/plugins/dlsym and b/plugins/dlsym differ diff --git a/plugins/dlsym.c b/plugins/dlsym.c index d827b768..2958b02e 100755 --- a/plugins/dlsym.c +++ b/plugins/dlsym.c @@ -5,26 +5,29 @@ #include #include #include +#include int main(int argc, char **argv) { char *file=NULL; void *dl= NULL; FILE *fp = NULL; + char path[PATH_MAX]; if (argc != 2) { printf("Usage: dlsym \n"); exit(0); } file = argv[1]; - fp = fopen(file, "rb"); + realpath(file, path); + fp = fopen(path, "rb"); if (!fp) { - printf("File not found."); + printf("File not found.\n"); exit(0); } - dl = dlopen(file, RTLD_NOW); + dl = dlopen(path, RTLD_NOW); if (dl) {