summaryrefslogtreecommitdiff
path: root/netfs/daemon/daemonFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/daemon/daemonFile.cpp')
-rw-r--r--netfs/daemon/daemonFile.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/netfs/daemon/daemonFile.cpp b/netfs/daemon/daemonFile.cpp
index 0b94787..5c74fda 100644
--- a/netfs/daemon/daemonFile.cpp
+++ b/netfs/daemon/daemonFile.cpp
@@ -6,8 +6,10 @@
#include <sys/stat.h>
#include "daemonFile.h"
-FileServer::FileServer(int f) :
- fd(f)
+FileServer::FileServer(int f, UserEntCache * u, GroupEntCache * g) :
+ fd(f),
+ uentries(u),
+ gentries(g)
{
}
@@ -18,7 +20,7 @@ FileServer::~FileServer()
void
FileServer::ftruncate(const NetFS::ReqEnv & re, Ice::Long size, const Ice::Current&)
{
- TempPrivs tp(re, &uentries, &gentries);
+ TempPrivs tp(re, uentries, gentries);
errno = 0;
if (::ftruncate(fd, size) != 0) {
throw NetFS::SystemError(errno);
@@ -28,13 +30,13 @@ FileServer::ftruncate(const NetFS::ReqEnv & re, Ice::Long size, const Ice::Curre
NetFS::Attr
FileServer::fgetattr(const NetFS::ReqEnv & re, const Ice::Current &)
{
- TempPrivs tp(re, &uentries, &gentries);
+ TempPrivs tp(re, uentries, gentries);
struct stat s;
if (::fstat(fd, &s) != 0) {
throw NetFS::SystemError(errno);
}
NetFS::Attr a;
- a << StatSource { s, boost::bind(&UserEntCache::getName, &uentries, _1), boost::bind(&GroupEntCache::getName, &gentries, _1) };
+ a << StatSource { s, boost::bind(&UserEntCache::getName, uentries, _1), boost::bind(&GroupEntCache::getName, gentries, _1) };
return a;
}