1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-12 04:23:49 +03:00

r5647: Caches are good for performance, but you get a consistency problem.

Fix bug # 2401.

Volker
This commit is contained in:
Volker Lendecke
2005-03-03 16:52:44 +00:00
committed by Gerald (Jerry) Carter
parent ce0dedea8d
commit eb4ef94f24
4 changed files with 19 additions and 0 deletions

View File

@@ -70,6 +70,20 @@ static void init_pwnam_cache(void)
return;
}
void flush_pwnam_cache(void)
{
int i;
init_pwnam_cache();
for (i=0; i<PWNAMCACHE_SIZE; i++) {
if (pwnam_cache[i] == NULL)
continue;
passwd_free(&pwnam_cache[i]);
}
}
struct passwd *getpwnam_alloc(const char *name)
{
int i;