summaryrefslogtreecommitdiff
path: root/netfs/lib/entCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/lib/entCache.cpp')
-rw-r--r--netfs/lib/entCache.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/netfs/lib/entCache.cpp b/netfs/lib/entCache.cpp
index c16678f..411202f 100644
--- a/netfs/lib/entCache.cpp
+++ b/netfs/lib/entCache.cpp
@@ -105,11 +105,12 @@ EntCache<Group>::fillCache() const
char buf[BUFLEN];
idcache.clear();
struct group grpbuf, * grp;
+ EntCache<User> instance;
while (getgrent_r(&grpbuf, buf, BUFLEN, &grp) == 0) {
auto g = new Group(grp->gr_gid, grp->gr_name);
for (auto member = grp->gr_mem; *member; member++) {
try {
- g->members.insert(EntCache<User>::instance.getEntry((const name_t &)*member)->id);
+ g->members.insert(instance.getEntry((const name_t &)*member)->id);
}
catch (const NetFS::SystemError &) {
}
@@ -126,11 +127,17 @@ Group::hasMember(uid_t u) const
return (members.find(u) != members.end());
}
-template<class T> const EntCache<T> EntCache<T>::instance;
-template class EntCache<User>;
+template EntCache<User>::EntCache();
+template EntCache<User>::~EntCache();
template IceUtil::Handle<User> EntCache<User>::getEntry<std::string>(const std::string &) const;
template IceUtil::Handle<User> EntCache<User>::getEntry<uid_t>(const uid_t &) const;
-template class EntCache<Group>;
+template void EntCache<User>::getName(const gid_t &, std::string *) const;
+template void EntCache<User>::getID(const std::string &, gid_t *) const;
+
+template EntCache<Group>::EntCache();
+template EntCache<Group>::~EntCache();
template IceUtil::Handle<Group> EntCache<Group>::getEntry<std::string>(const std::string &) const;
template IceUtil::Handle<Group> EntCache<Group>::getEntry<gid_t>(const gid_t &) const;
+template void EntCache<Group>::getName(const gid_t &, std::string *) const;
+template void EntCache<Group>::getID(const std::string &, gid_t *) const;