diff options
Diffstat (limited to 'netfs/daemonMisc.cpp')
-rw-r--r-- | netfs/daemonMisc.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/netfs/daemonMisc.cpp b/netfs/daemonMisc.cpp index 2228476..e584c4f 100644 --- a/netfs/daemonMisc.cpp +++ b/netfs/daemonMisc.cpp @@ -11,7 +11,7 @@ Ice::Int FileSystemServer::access(const NetFSComms::ReqEnv & re, const std::string & path, Ice::Int mode, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); return ::access((sess->exportCfg->root / path).string().c_str(), mode); } @@ -19,7 +19,7 @@ NetFSComms::Attr FileSystemServer::getattr(const NetFSComms::ReqEnv & re, const std::string & path, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); struct stat s; if (::lstat((sess->exportCfg->root / path).string().c_str(), &s) != 0) { throw NetFSComms::SystemError(errno); @@ -29,8 +29,8 @@ FileSystemServer::getattr(const NetFSComms::ReqEnv & re, const std::string & pat a.inode = s.st_ino; a.mode = s.st_mode; a.links = s.st_nlink; - a.uid = entries.getUName(s.st_uid); - a.gid = entries.getGName(s.st_gid); + a.uid = uentries.getName(s.st_uid); + a.gid = gentries.getName(s.st_gid); a.rdev = s.st_rdev; a.size = s.st_size; a.blockSize = s.st_blksize; @@ -45,7 +45,7 @@ void FileSystemServer::symlink(const NetFSComms::ReqEnv & re, const std::string & path1, const std::string & path2, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; if (::symlink((sess->exportCfg->root / path1).string().c_str(), (sess->exportCfg->root / path2).string().c_str()) != 0) { throw NetFSComms::SystemError(errno); @@ -57,7 +57,7 @@ void FileSystemServer::link(const NetFSComms::ReqEnv & re, const std::string & path1, const std::string & path2, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; if (::link((sess->exportCfg->root / path1).string().c_str(), (sess->exportCfg->root / path2).string().c_str()) != 0) { throw NetFSComms::SystemError(errno); @@ -69,7 +69,7 @@ void FileSystemServer::rename(const NetFSComms::ReqEnv & re, const std::string & from, const std::string & to, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; if (::rename((sess->exportCfg->root / from).string().c_str(), (sess->exportCfg->root / to).string().c_str()) != 0) { throw NetFSComms::SystemError(errno); @@ -81,7 +81,7 @@ std::string FileSystemServer::readlink(const NetFSComms::ReqEnv & re, const std::string & path, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; char buf[PATH_MAX]; ssize_t rc = ::readlink((sess->exportCfg->root / path).string().c_str(), buf, PATH_MAX); @@ -95,7 +95,7 @@ void FileSystemServer::chmod(const NetFSComms::ReqEnv & re, const std::string & path, Ice::Int mode, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; if (::chmod((sess->exportCfg->root / path).string().c_str(), mode) != 0) { throw NetFSComms::SystemError(errno); @@ -107,7 +107,7 @@ void FileSystemServer::chown(const NetFSComms::ReqEnv & re, const std::string & path, Ice::Int uid, Ice::Int gid, const Ice::Current &) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; if (::chown((sess->exportCfg->root / path).string().c_str(), uid, gid) != 0) { throw NetFSComms::SystemError(errno); @@ -120,7 +120,7 @@ FileSystemServer::utimens(const NetFSComms::ReqEnv & re, const std::string & pat Ice::Long s0, Ice::Long ns0, Ice::Long s1, Ice::Long ns1, const Ice::Current&) { SessionPtr sess(dgs->getSession(re.tok)); - TempPrivs tp(re, &entries); + TempPrivs tp(re, &uentries, &gentries); errno = 0; struct timespec times[2]; times[0].tv_sec = s0; |