limal-nfs-server
|
00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | _ _ _ _ __ _ | 00004 | | | | | | \_/ | / \ | | | 00005 | | | | | | |_| | / /\ \ | | | 00006 | | |__ | | | | | | / ____ \ | |__ | 00007 | |____||_| |_| |_|/ / \ \|____| | 00008 | | 00009 | nfs-server library | 00010 | | 00011 | (C) SUSE Linux Products GmbH | 00012 | (C) Novell, Inc. | 00013 \----------------------------------------------------------------------/ 00014 00015 File: KNfsIdmapdConf.hpp 00016 00017 Author: Marius Tomaschewski, Chakravarthi P 00018 Maintainer: Chakravarthi P 00019 00020 /-*/ 00025 #ifndef LIMAL_NFS_SERVER_KNFS_IDMAPD_CONF_HPP 00026 #define LIMAL_NFS_SERVER_KNFS_IDMAPD_CONF_HPP 00027 00028 #include <limal/nfs-server/config.h> 00029 #include <limal/nfs-server/NfsIdmapdConf.hpp> 00030 00031 #include <blocxx/String.hpp> 00032 #include <blocxx/Array.hpp> 00033 00034 00035 // ------------------------------------------------------------------- 00036 namespace LIMAL_NAMESPACE 00037 { 00038 namespace NFS_SERVER_NAMESPACE 00039 { 00040 00041 00042 class KNfsIdmapdRules; 00043 00044 00045 // ------------------------------------------------------------------- 00046 class KNfsIdmapdConf: public IdmapdConf 00047 { 00048 public: 00049 KNfsIdmapdConf(); 00050 KNfsIdmapdConf(const IdmapdConf &conf); 00051 ~KNfsIdmapdConf(); 00052 00053 bool 00054 validIdmapdEntry (const blocxx::String &name, 00055 const blocxx::String &value) const; 00056 00057 blocxx::String 00058 verifyIdmapdEntry (const IdmapdEntry &entry) const; 00059 00060 blocxx::Array<blocxx::String> 00061 verifyIdmapdSection (const IdmapdSection §ion) const; 00062 00068 const blocxx::Array<blocxx::String> 00069 verifyConf (); 00070 00075 void 00076 load(const blocxx::String &filename); 00077 00087 void 00088 save(const blocxx::String &idmapdFile, 00089 const blocxx::String &backupSuffix); 00090 00095 static IdmapdConf 00096 parseIdmapdConfFile(const blocxx::String &idmapdFile); 00097 00102 static IdmapdEntry 00103 parseIdmapdEntry(const blocxx::String &entry); 00104 00115 static void 00116 writeIdmapdConfFile(const IdmapdConf &idmapdConf, 00117 const blocxx::String &idmapdFile, 00118 const blocxx::String &backupSuffix); 00119 00120 private: 00121 KNfsIdmapdRules *rules; 00122 bool dirty; 00123 }; 00124 00125 00126 // ------------------------------------------------------------------- 00127 } // End of NFS_SERVER_NAMESPACE 00128 } // End of LIMAL_NAMESPACE 00129 00130 #endif // LIMAL_NFS_SERVER_KNFS_IDMAPD_CONF_HPP 00131 // vim: set ts=8 sts=8 sw=8 ai