1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

r15632: Remove length limitation from the winbind cache cleanup traversal.

Guenther
(This used to be commit 181fa02497)
This commit is contained in:
Günther Deschner 2006-05-16 11:23:29 +00:00 committed by Gerald (Jerry) Carter
parent 0ed76af63d
commit 651797b41e

View File

@ -2101,19 +2101,14 @@ static int traverse_fn_cleanup(TDB_CONTEXT *the_tdb, TDB_DATA kbuf,
TDB_DATA dbuf, void *state) TDB_DATA dbuf, void *state)
{ {
struct cache_entry *centry; struct cache_entry *centry;
char buf[1024];
if (!snprintf(buf, kbuf.dsize + 1, "%s", kbuf.dptr)) { centry = wcache_fetch_raw(kbuf.dptr);
return 1;
}
centry = wcache_fetch_raw(buf);
if (!centry) { if (!centry) {
return 0; return 0;
} }
if (!NT_STATUS_IS_OK(centry->status)) { if (!NT_STATUS_IS_OK(centry->status)) {
DEBUG(10,("deleting centry %s\n", buf)); DEBUG(10,("deleting centry %s\n", kbuf.dptr));
tdb_delete(the_tdb, kbuf); tdb_delete(the_tdb, kbuf);
} }