From 0fe72492f14d484e7c761c50269d6e0db376b3c3 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 27 Feb 2004 03:58:04 +0000 Subject: Seems, like we don't really need LANMAN until now --- src/nu_server.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'src/nu_server.c') diff --git a/src/nu_server.c b/src/nu_server.c index 186c2d7..5112f1e 100755 --- a/src/nu_server.c +++ b/src/nu_server.c @@ -91,30 +91,35 @@ static SMB_STATUS handle_SMB_COM_TREE_CONNECT_ANDX( SMB_HEADER *header, SMB_DATA return STATUS_SUCCESS; } -static SMB_STATUS handle_SMB_COM_TRANSACTION( SMB_HEADER *header, SMB_DATA *data ) { - if( !strcmp( (char*)&data->bytes[1], "\\PIPE\\LANMAN")) - { - /* TODO: Sanity Check on DataCount vs. ByteCount */ - SMB_PARAMS_TRANSACTION *params = (SMB_PARAMS_TRANSACTION *)data->params; - SMB_TRANSACTION_BYTES bytes; - - bytes.params = ((BYTE*)&header->Protocol) + GETNWORD( params->ParameterOffset ); - bytes.paramc = GETNWORD( params->ParameterCount ); - bytes.data = ((BYTE*)&header->Protocol) + GETNWORD( params->DataOffset ); - bytes.datac = GETNWORD( params->DataCount ); - - return handle_LANMAN( header, data, &bytes ); - } - else - return 0x00400002; -} +//static SMB_STATUS handle_SMB_COM_TRANSACTION( SMB_HEADER *header, SMB_DATA *data ) { +// if( !strcmp( (char*)&data->bytes[1], "\\PIPE\\LANMAN")) +// { +// /* TODO: Sanity Check on DataCount vs. ByteCount */ +// SMB_PARAMS_TRANSACTION *params = (SMB_PARAMS_TRANSACTION *)data->params; +// SMB_TRANSACTION_BYTES bytes; +// +// bytes.params = ((BYTE*)&header->Protocol) + GETNWORD( params->ParameterOffset ); +// bytes.paramc = GETNWORD( params->ParameterCount ); +// bytes.data = ((BYTE*)&header->Protocol) + GETNWORD( params->DataOffset ); +// bytes.datac = GETNWORD( params->DataCount ); +// +// return handle_LANMAN( header, data, &bytes ); +// } +// else +// return 0x00400002; +//} + +//static SMB_STATUS handle_SMB_COM_TRANSACTION2( SMB_HEADER *header, SMB_DATA *data ) { +// return 0x00400002; /* No handler yet */ +//} static int command_handler_match(const void *a, const void *b ) { return *(BYTE*)a - *(BYTE*)b; } /* If you add command handlers, please insert them in the right position, this list is sorted by command, for later bsearch*/ static SMB_COMMAND_HANDLER command_handler[] = { - { SMB_COM_TRANSACTION, 0x00, handle_SMB_COM_TRANSACTION }, +// { SMB_COM_TRANSACTION, 0x00, handle_SMB_COM_TRANSACTION }, +// { SMB_COM_TRANSACTION2, 0x00, handle_SMB_COM_TRANSACTION2 }, { SMB_COM_NEGOTIATE, 0x00, handle_SMB_COM_NEGOTIATE }, { SMB_COM_SESSION_SETUP_ANDX, 0x01, handle_SMB_COM_SESSION_SETUP_ANDX }, { SMB_COM_TREE_CONNECT_ANDX, 0x01, handle_SMB_COM_TREE_CONNECT_ANDX } -- cgit v1.2.3