summaryrefslogtreecommitdiff
path: root/netfs/daemonMisc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/daemonMisc.cpp')
-rw-r--r--netfs/daemonMisc.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/netfs/daemonMisc.cpp b/netfs/daemonMisc.cpp
index 4fa6eaf..dfcf8bf 100644
--- a/netfs/daemonMisc.cpp
+++ b/netfs/daemonMisc.cpp
@@ -13,16 +13,16 @@ MiscServer::MiscServer(DaemonGlobalStatePtr dgs) :
}
Ice::Int
-MiscServer::access(Ice::Long tok, const std::string & path, Ice::Int mode, const Ice::Current &)
+MiscServer::access(const NetFSComms::ReqEnv & re, const std::string & path, Ice::Int mode, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
return ::access((sess->exportCfg->root / path).string().c_str(), mode);
}
NetFSComms::Attr
-MiscServer::getattr(Ice::Long tok, const std::string & path, const Ice::Current &)
+MiscServer::getattr(const NetFSComms::ReqEnv & re, const std::string & path, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
struct stat s;
if (::stat((sess->exportCfg->root / path).string().c_str(), &s) != 0) {
throw NetFSComms::SystemError(errno);
@@ -45,9 +45,9 @@ MiscServer::getattr(Ice::Long tok, const std::string & path, const Ice::Current
}
void
-MiscServer::symlink(Ice::Long tok, const std::string & path1, const std::string & path2, const Ice::Current &)
+MiscServer::symlink(const NetFSComms::ReqEnv & re, const std::string & path1, const std::string & path2, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
errno = 0;
if (::symlink(path1.c_str(), path2.c_str()) != 0) {
throw NetFSComms::SystemError(errno);
@@ -56,9 +56,9 @@ MiscServer::symlink(Ice::Long tok, const std::string & path1, const std::string
}
void
-MiscServer::link(Ice::Long tok, const std::string & path1, const std::string & path2, const Ice::Current &)
+MiscServer::link(const NetFSComms::ReqEnv & re, const std::string & path1, const std::string & path2, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
errno = 0;
if (::link(path1.c_str(), path2.c_str()) != 0) {
throw NetFSComms::SystemError(errno);
@@ -67,9 +67,9 @@ MiscServer::link(Ice::Long tok, const std::string & path1, const std::string & p
}
void
-MiscServer::rename(Ice::Long tok, const std::string & from, const std::string & to, const Ice::Current &)
+MiscServer::rename(const NetFSComms::ReqEnv & re, const std::string & from, const std::string & to, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
errno = 0;
if (::rename(from.c_str(), to.c_str()) != 0) {
throw NetFSComms::SystemError(errno);
@@ -78,9 +78,9 @@ MiscServer::rename(Ice::Long tok, const std::string & from, const std::string &
}
std::string
-MiscServer::readlink(Ice::Long tok, const std::string & path, const Ice::Current &)
+MiscServer::readlink(const NetFSComms::ReqEnv & re, const std::string & path, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
errno = 0;
char buf[PATH_MAX];
ssize_t rc = ::readlink((sess->exportCfg->root / path).string().c_str(), buf, PATH_MAX);
@@ -91,9 +91,9 @@ MiscServer::readlink(Ice::Long tok, const std::string & path, const Ice::Current
}
void
-MiscServer::chmod(Ice::Long tok, const std::string & path, Ice::Int mode, const Ice::Current &)
+MiscServer::chmod(const NetFSComms::ReqEnv & re, const std::string & path, Ice::Int mode, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
errno = 0;
if (::chmod((sess->exportCfg->root / path).string().c_str(), mode) != 0) {
throw NetFSComms::SystemError(errno);
@@ -102,9 +102,9 @@ MiscServer::chmod(Ice::Long tok, const std::string & path, Ice::Int mode, const
}
void
-MiscServer::chown(Ice::Long tok, const std::string & path, Ice::Int uid, Ice::Int gid, const Ice::Current &)
+MiscServer::chown(const NetFSComms::ReqEnv & re, const std::string & path, Ice::Int uid, Ice::Int gid, const Ice::Current &)
{
- SessionPtr sess(dgs->getSession(tok));
+ SessionPtr sess(dgs->getSession(re.tok));
errno = 0;
if (::chown((sess->exportCfg->root / path).string().c_str(), uid, gid) != 0) {
throw NetFSComms::SystemError(errno);