Browse Source

replace nonstandard eaccess with POSIX.1-2008 faccessat

pull/293/head
Antonio SJ Musumeci 8 years ago
parent
commit
7634eb1440
  1. 5
      src/access.cpp

5
src/access.cpp

@ -17,8 +17,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <unistd.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include "config.hpp" #include "config.hpp"
#include "fs_path.hpp" #include "fs_path.hpp"
@ -48,7 +49,7 @@ _access(Policy::Func::Search searchFunc,
fs::path::make(basepaths[0],fusepath,fullpath); fs::path::make(basepaths[0],fusepath,fullpath);
rv = ::eaccess(fullpath.c_str(),mask);
rv = ::faccessat(AT_FDCWD,fullpath.c_str(),mask,AT_EACCESS);
return ((rv == -1) ? -errno : 0); return ((rv == -1) ? -errno : 0);
} }

Loading…
Cancel
Save