pwcache_byname = rbcreate(cmp_pwnam);
}
-#ifdef notyet
+#ifdef PURIFY
static void pw_free __P((void *));
void
}
efree(pw);
}
-#endif
+#endif /* PURIFY */
void
sudo_endpwent()
{
endpwent();
sudo_endspent();
+#ifdef PURIFY
+ sudo_freepwcache();
+#endif
}
/*
grcache_byname = rbcreate(cmp_grnam);
}
-#if 0
+#ifdef PURIFY
void
sudo_freegrcache()
{
- if (free_cache && grcache_bygid != NULL) {
+ if (grcache_bygid != NULL) {
rbdestroy(grcache_bygid, free);
grcache_bygid = NULL;
}
- if (free_cache && grcache_byname != NULL) {
+ if (grcache_byname != NULL) {
rbdestroy(grcache_byname, NULL);
grcache_byname = NULL;
}
}
-#endif
+#endif /* PURIFY */
void
sudo_endgrent()
{
endgrent();
+#ifdef PURIFY
+ sudo_freegrcache();
+#endif
}