svn commit: samba r16196 - branches/SAMBA_3_0/source/nsswitch
trunk/source/nsswitch
vlendec at samba.org
vlendec at samba.org
Tue Jun 13 17:55:40 GMT 2006
Author: vlendec
Date: 2006-06-13 17:55:39 +0000 (Tue, 13 Jun 2006)
New Revision: 16196
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16196
Log:
A bit of defensive programming:
Klocwork ID 1773 complained about oldest being dereferenced in line 2275 where
it could be NULL. I think you can construct extreme racy conditions where this
actually could happen.
Volker
Modified:
branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
trunk/source/nsswitch/winbindd_cache.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-06-13 15:57:00 UTC (rev 16195)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-06-13 17:55:39 UTC (rev 16196)
@@ -2232,7 +2232,7 @@
ret = tdb_traverse(cache->tdb, traverse_fn_get_credlist, NULL);
if (ret == 0) {
return NT_STATUS_OK;
- } else if (ret == -1) {
+ } else if ((ret == -1) || (wcache_cred_list == NULL)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c 2006-06-13 15:57:00 UTC (rev 16195)
+++ trunk/source/nsswitch/winbindd_cache.c 2006-06-13 17:55:39 UTC (rev 16196)
@@ -2354,7 +2354,7 @@
ret = tdb_traverse(cache->tdb, traverse_fn_get_credlist, NULL);
if (ret == 0) {
return NT_STATUS_OK;
- } else if (ret == -1) {
+ } else if ((ret == -1) || (wcache_cred_list == NULL)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
More information about the samba-cvs
mailing list