diff options
author | Christian Ambach <christian.ambach@de.ibm.com> | 2010-04-05 14:12:52 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-06 14:09:06 +0200 |
commit | 96ae3ee80391e69d2a2c75705a9374b27b2117c8 (patch) | |
tree | 72b357dd2692a23238dd2e8162913c9c7a3977b8 /source3/lib/util_tdb.c | |
parent | 449bdf35432230b060387856637759e2fe7022d6 (diff) | |
download | samba-96ae3ee80391e69d2a2c75705a9374b27b2117c8.tar.gz samba-96ae3ee80391e69d2a2c75705a9374b27b2117c8.tar.bz2 samba-96ae3ee80391e69d2a2c75705a9374b27b2117c8.zip |
fix a segfault in the notify subsystem
When the notify_array cannot be loaded correctly,
do not keep the half-baked parsing results in the global variable.
This can lead to segfaults next time notify_load is entered and
the seqnum has not changed. This has been seen in a case
where mixed smbd versions were running in a CTDB cluster
(versions with and w/o commit c216d1e6 that changed the
notify_entry structure).
There will be missed notifications until all smbds are at the
same software level, but this should be acceptable and is better
than crashing and interrupting client operations.
This fix cleans up the notify_array, removes the unparseable data
from the TDB and returns a fresh notify_array that can be worked
with.
The NDR_PRINT_DEBUG had to be moved to only be called when the
parsing succeeded, it was seen to cause additional segfaults.
The status variable is intentionally left to NT_STATUS_OK to not
make callers abort and report errors to the clients and make them
disconnect.
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
Diffstat (limited to 'source3/lib/util_tdb.c')
0 files changed, 0 insertions, 0 deletions