From 97c7046ac0cd9f7cd73c34e659ecd157f3f32b90 Mon Sep 17 00:00:00 2001 From: randomdan Date: Mon, 29 Nov 2010 21:22:49 +0000 Subject: Fix no follow symlink in utimens --- netfs/daemonMisc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #include #include +#include #include "daemonFileSystem.h" extern std::map 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; -- cgit v1.2.3