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:
committed by
Gerald (Jerry) Carter
parent
ce0dedea8d
commit
eb4ef94f24
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user