=== modified file 'plugins.d/mandos-client.c' --- plugins.d/mandos-client.c 2014-06-07 21:59:20 +0000 +++ plugins.d/mandos-client.c 2014-06-07 22:37:22 +0000 @@ -1346,21 +1346,13 @@ return 0; } - char *fullname = NULL; - ret = asprintf(&fullname, "%s/%s", hookdir, direntry->d_name); - if(ret < 0){ - perror_plus("asprintf"); - return 0; - } - - ret = stat(fullname, &st); + ret = fstatat(hookdir_fd, direntry->d_name, &st, 0); if(ret == -1){ if(debug){ perror_plus("Could not stat hook"); } return 0; } - free(fullname); if(not (S_ISREG(st.st_mode))){ /* Not a regular file */ if(debug){