diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_pw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c index 0d7ffe09e9..13349bad34 100644 --- a/source3/lib/util_pw.c +++ b/source3/lib/util_pw.c @@ -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; |