diff options
author | randomdan <randomdan@localhost> | 2010-11-29 21:22:49 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-11-29 21:22:49 +0000 |
commit | 97c7046ac0cd9f7cd73c34e659ecd157f3f32b90 (patch) | |
tree | 24f2a912f9b94a3d065306de734d2b1d59d55c33 | |
parent | Tidy up jam stuff (diff) | |
download | netfs-97c7046ac0cd9f7cd73c34e659ecd157f3f32b90.tar.bz2 netfs-97c7046ac0cd9f7cd73c34e659ecd157f3f32b90.tar.xz netfs-97c7046ac0cd9f7cd73c34e659ecd157f3f32b90.zip |
Fix no follow symlink in utimens
-rw-r--r-- | netfs/daemonMisc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/netfs/daemonMisc.cpp b/netfs/daemonMisc.cpp index e584c4f..d5ccbba 100644 --- a/netfs/daemonMisc.cpp +++ b/netfs/daemonMisc.cpp @@ -3,6 +3,7 @@ #include <unistd.h> #include <sys/stat.h> #include <limits.h> +#include <fcntl.h> #include "daemonFileSystem.h" extern std::map<Ice::Int, int> files; @@ -127,7 +128,7 @@ FileSystemServer::utimens(const NetFSComms::ReqEnv & re, const std::string & pat times[0].tv_nsec = ns0; times[1].tv_sec = s1; times[1].tv_nsec = ns1; - if (::utimensat(0, (sess->exportCfg->root / path).string().c_str(), times, 0) != 0) { + if (::utimensat(0, (sess->exportCfg->root / path).string().c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { throw NetFSComms::SystemError(errno); } // s.replicatedRequest = true; |