Rename VfsAuthn to VfsAuthnSimple.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 21 Feb 2014 13:15:12 +0000 (14:15 +0100)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 21 Feb 2014 13:17:07 +0000 (14:17 +0100)
src/CMakeLists.txt
src/Vfs.cpp
src/VfsAuthnSimple.cpp [moved from src/VfsAuthn.cpp with 66% similarity]
src/VfsAuthnSimple.h [moved from src/VfsAuthn.h with 93% similarity]

index 18dac15..fdb1cba 100644 (file)
@@ -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
index 65f8ea9..d3d9244 100644 (file)
@@ -8,7 +8,7 @@
 #include <sys/utsname.h>
 
 #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();
 }
 
 
similarity index 66%
rename from src/VfsAuthn.cpp
rename to src/VfsAuthnSimple.cpp
index 725eda7..81d5013 100644 (file)
@@ -4,13 +4,13 @@
 #include <unistd.h>
 #include <dmlite/cpp/dmlite.h>
 #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<GroupInfo> groups;
@@ -54,7 +54,7 @@ SecurityContext *VfsAuthn::createSecurityContext(const SecurityCredentials &cred
 
 
 
-void VfsAuthn::getIdMap(const std::string &userName, const std::vector<std::string> &groupNames, UserInfo *user, std::vector<GroupInfo> *groups) throw (DmException)
+void VfsAuthnSimple::getIdMap(const std::string &userName, const std::vector<std::string> &groupNames, UserInfo *user, std::vector<GroupInfo> *groups) throw (DmException)
 {
   gid_t gid;
   gid_t gids[20];
@@ -85,14 +85,14 @@ void VfsAuthn::getIdMap(const std::string &userName, const std::vector<std::stri
 
 
 
-GroupInfo VfsAuthn::newGroup(const std::string&) throw (DmException)
+GroupInfo VfsAuthnSimple::newGroup(const std::string&) throw (DmException)
 {
-  vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthn");
+  vfsThrow(DMLITE_SYSERR(ENOSYS), "not supported in VfsAuthnSimple");
 }
 
 
 
-GroupInfo VfsAuthn::getGroup(gid_t gid) throw (DmException)
+GroupInfo VfsAuthnSimple::getGroup(gid_t gid) throw (DmException)
 {
   struct group  grp;
   struct group *result;
@@ -114,7 +114,7 @@ GroupInfo VfsAuthn::getGroup(gid_t gid) throw (DmException)
 
 
 
-GroupInfo VfsAuthn::getGroup(const std::string &groupName) throw (DmException)
+GroupInfo VfsAuthnSimple::getGroup(const std::string &groupName) throw (DmException)
 {
   struct group  grp;
   struct group *result;
@@ -136,12 +136,12 @@ GroupInfo VfsAuthn::getGroup(const std::string &groupName) throw (DmException)
 
 
 
-GroupInfo VfsAuthn::getGroup(const std::string& key,
+GroupInfo VfsAuthnSimple::getGroup(const std::string& key,
                              const boost::any& value) throw (DmException)
 {
   if (key != "gid")
     vfsThrow(DMLITE_SYSERR(DMLITE_UNKNOWN_KEY),
-                      "VfsAuthn does not support querying by " + key);
+                      "VfsAuthnSimple does not support querying by " + key);
 
   gid_t gid = Extensible::anyToUnsigned(value);
   return this->getGroup(gid);
@@ -149,7 +149,7 @@ GroupInfo VfsAuthn::getGroup(const std::string& key,
 
 
 
-std::vector<GroupInfo> VfsAuthn::getGroups(void) throw (DmException)
+std::vector<GroupInfo> VfsAuthnSimple::getGroups(void) throw (DmException)
 {
   std::vector<GroupInfo> groups;
   GroupInfo group;
@@ -169,28 +169,28 @@ std::vector<GroupInfo> 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<UserInfo> VfsAuthn::getUsers(void) throw (DmException)
+std::vector<UserInfo> VfsAuthnSimple::getUsers(void) throw (DmException)
 {
   std::vector<UserInfo> users;
   UserInfo user;
@@ -267,14 +267,14 @@ std::vector<UserInfo> 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");
 }
similarity index 93%
rename from src/VfsAuthn.h
rename to src/VfsAuthnSimple.h
index 6effb5d..ff0ecb2 100644 (file)
@@ -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);