diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd.c | 2 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_idmap.c | 7 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_proto.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 25b69cee6d..ee373c7101 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -154,6 +154,8 @@ static void flush_caches(void) static void terminate(void) { pstring path; + + winbindd_idmap_close(); /* Remove socket file */ snprintf(path, sizeof(path), "%s/%s", diff --git a/source3/nsswitch/winbindd_idmap.c b/source3/nsswitch/winbindd_idmap.c index a96111a608..06d442c565 100644 --- a/source3/nsswitch/winbindd_idmap.c +++ b/source3/nsswitch/winbindd_idmap.c @@ -240,6 +240,13 @@ BOOL winbindd_idmap_init(void) return True; } +BOOL winbindd_idmap_close(void) +{ + if (idmap_tdb) + return (tdb_close(idmap_tdb) == 0); + return True; +} + /* Dump status information to log file. Display different stuff based on the debug level: diff --git a/source3/nsswitch/winbindd_proto.h b/source3/nsswitch/winbindd_proto.h index 565c08f549..cc936642ed 100644 --- a/source3/nsswitch/winbindd_proto.h +++ b/source3/nsswitch/winbindd_proto.h @@ -61,6 +61,7 @@ BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid, BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, struct winbindd_domain **domain); BOOL winbindd_idmap_init(void); +BOOL winbindd_idmap_close(void); void winbindd_idmap_status(void); /* The following definitions come from nsswitch/winbindd_misc.c */ |