mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

Changes: * change virtual to override where appropriate * analyzer triggered assert in debug mode because it did not call Done() on manually instantiated analyzers. * added a few length checks to methods * commented unused code and removed a few unused class members
29 lines
463 B
JavaScript
29 lines
463 B
JavaScript
|
|
refine connection SMB_Conn += {
|
|
%member{
|
|
analyzer::Analyzer *gssapi;
|
|
%}
|
|
|
|
%init{
|
|
gssapi = 0;
|
|
%}
|
|
|
|
%cleanup{
|
|
if ( gssapi )
|
|
{
|
|
gssapi->Done();
|
|
delete gssapi;
|
|
}
|
|
%}
|
|
|
|
function forward_gssapi(data: bytestring, is_orig: bool): bool
|
|
%{
|
|
if ( ! gssapi )
|
|
gssapi = analyzer_mgr->InstantiateAnalyzer("GSSAPI", bro_analyzer()->Conn());
|
|
|
|
if ( gssapi )
|
|
gssapi->DeliverStream(${data}.length(), ${data}.begin(), is_orig);
|
|
|
|
return true;
|
|
%}
|
|
};
|