From b06cfc54201b3bec882ccc596391854a41c52680 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 21 Feb 2014 14:15:12 +0100 Subject: [PATCH] Rename VfsAuthn to VfsAuthnSimple. --- src/CMakeLists.txt | 2 +- src/Vfs.cpp | 4 +-- src/{VfsAuthn.cpp => VfsAuthnSimple.cpp} | 58 ++++++++++++++++---------------- src/{VfsAuthn.h => VfsAuthnSimple.h} | 6 ++-- 4 files changed, 35 insertions(+), 35 deletions(-) rename src/{VfsAuthn.cpp => VfsAuthnSimple.cpp} (66%) rename src/{VfsAuthn.h => VfsAuthnSimple.h} (93%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 18dac15..fdb1cba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.6) add_library (vfs MODULE Vfs.cpp - VfsAuthn.cpp + VfsAuthnSimple.cpp VfsDriver.cpp VfsIO.cpp VfsNs.cpp diff --git a/src/Vfs.cpp b/src/Vfs.cpp index 65f8ea9..d3d9244 100644 --- a/src/Vfs.cpp +++ b/src/Vfs.cpp @@ -8,7 +8,7 @@ #include #include "Vfs.h" -#include "VfsAuthn.h" +#include "VfsAuthnSimple.h" #include "VfsDriver.h" #include "VfsIO.h" #include "VfsNs.h" @@ -134,7 +134,7 @@ IODriver* VfsFactory::createIODriver(PluginManager*) throw (DmException) Authn* VfsFactory::createAuthn(PluginManager*) throw (DmException) { debug(""); - return new VfsAuthn(); + return new VfsAuthnSimple(); } diff --git a/src/VfsAuthn.cpp b/src/VfsAuthnSimple.cpp similarity index 66% rename from src/VfsAuthn.cpp rename to src/VfsAuthnSimple.cpp index 725eda7..81d5013 100644 --- a/src/VfsAuthn.cpp +++ b/src/VfsAuthnSimple.cpp @@ -4,13 +4,13 @@ #include #include #include "Vfs.h" -#include "VfsAuthn.h" +#include "VfsAuthnSimple.h" using namespace dmlite; -VfsAuthn::VfsAuthn() throw (DmException) +VfsAuthnSimple::VfsAuthnSimple() throw (DmException) { char buffer[1024]; struct passwd pwd; @@ -28,20 +28,20 @@ VfsAuthn::VfsAuthn() throw (DmException) -VfsAuthn::~VfsAuthn() +VfsAuthnSimple::~VfsAuthnSimple() { } -std::string VfsAuthn::getImplId() const throw () +std::string VfsAuthnSimple::getImplId() const throw () { - return "VfsAuthn"; + return "VfsAuthnSimple"; } -SecurityContext *VfsAuthn::createSecurityContext(const SecurityCredentials &cred) throw (DmException) +SecurityContext *VfsAuthnSimple::createSecurityContext(const SecurityCredentials &cred) throw (DmException) { UserInfo user; std::vector groups; @@ -54,7 +54,7 @@ SecurityContext *VfsAuthn::createSecurityContext(const SecurityCredentials &cred -void VfsAuthn::getIdMap(const std::string &userName, const std::vector &groupNames, UserInfo *user, std::vector *groups) throw (DmException) +void VfsAuthnSimple::getIdMap(const std::string &userName, const std::vector &groupNames, UserInfo *user, std::vector *groups) throw (DmException) { gid_t gid; gid_t gids[20]; @@ -85,14 +85,14 @@ void VfsAuthn::getIdMap(const std::string &userName, const std::vectorgetGroup(gid); @@ -149,7 +149,7 @@ GroupInfo VfsAuthn::getGroup(const std::string& key, -std::vector VfsAuthn::getGroups(void) throw (DmException) +std::vector VfsAuthnSimple::getGroups(void) throw (DmException) { std::vector groups; GroupInfo group; @@ -169,28 +169,28 @@ std::vector VfsAuthn::getGroups(void) throw (DmException) -void VfsAuthn::updateGroup(const GroupInfo&) throw (DmException) +void VfsAuthnSimple::updateGroup(const GroupInfo&) throw (DmException) { - vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthn"); + vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthnSimple"); } -void VfsAuthn::deleteGroup(const std::string&) throw (DmException) +void VfsAuthnSimple::deleteGroup(const std::string&) throw (DmException) { - vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthn"); + vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthnSimple"); } -UserInfo VfsAuthn::newUser(const std::string&) throw (DmException) +UserInfo VfsAuthnSimple::newUser(const std::string&) throw (DmException) { - vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthn"); + vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthnSimple"); } -UserInfo VfsAuthn::getUser(const std::string& userName, gid_t* group) throw (DmException) +UserInfo VfsAuthnSimple::getUser(const std::string& userName, gid_t* group) throw (DmException) { struct passwd pwd; struct passwd *result; @@ -217,7 +217,7 @@ UserInfo VfsAuthn::getUser(const std::string& userName, gid_t* group) throw (DmE -UserInfo VfsAuthn::getUser(const std::string& userName) throw (DmException) +UserInfo VfsAuthnSimple::getUser(const std::string& userName) throw (DmException) { gid_t ignore; return this->getUser(userName, &ignore); @@ -225,7 +225,7 @@ UserInfo VfsAuthn::getUser(const std::string& userName) throw (DmException) -UserInfo VfsAuthn::getUser(const std::string& key, +UserInfo VfsAuthnSimple::getUser(const std::string& key, const boost::any& value) throw (DmException) { uid_t uid; @@ -236,7 +236,7 @@ UserInfo VfsAuthn::getUser(const std::string& key, if (key != "uid") vfsThrow(DMLITE_SYSERR(DMLITE_UNKNOWN_KEY), - "VfsAuthn does not support querying by " + key); + "VfsAuthnSimple does not support querying by " + key); uid = Extensible::anyToUnsigned(value); if (uid != this->currentUid) @@ -253,7 +253,7 @@ UserInfo VfsAuthn::getUser(const std::string& key, -std::vector VfsAuthn::getUsers(void) throw (DmException) +std::vector VfsAuthnSimple::getUsers(void) throw (DmException) { std::vector users; UserInfo user; @@ -267,14 +267,14 @@ std::vector VfsAuthn::getUsers(void) throw (DmException) -void VfsAuthn::updateUser(const UserInfo&) throw (DmException) +void VfsAuthnSimple::updateUser(const UserInfo&) throw (DmException) { - vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthn"); + vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthnSimple"); } -void VfsAuthn::deleteUser(const std::string&) throw (DmException) +void VfsAuthnSimple::deleteUser(const std::string&) throw (DmException) { - vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthn"); + vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthnSimple"); } diff --git a/src/VfsAuthn.h b/src/VfsAuthnSimple.h similarity index 93% rename from src/VfsAuthn.h rename to src/VfsAuthnSimple.h index 6effb5d..ff0ecb2 100644 --- a/src/VfsAuthn.h +++ b/src/VfsAuthnSimple.h @@ -7,11 +7,11 @@ namespace dmlite { - class VfsAuthn: public Authn + class VfsAuthnSimple: public Authn { public: - VfsAuthn() throw (DmException); - ~VfsAuthn(); + VfsAuthnSimple() throw (DmException); + ~VfsAuthnSimple(); std::string getImplId(void) const throw (); SecurityContext *createSecurityContext(const SecurityCredentials &cred) throw (DmException); -- 1.8.2.3