summaryrefslogtreecommitdiff
path: root/src/nu_lanman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nu_lanman.c')
-rw-r--r--src/nu_lanman.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nu_lanman.c b/src/nu_lanman.c
new file mode 100644
index 0000000..0ab935e
--- /dev/null
+++ b/src/nu_lanman.c
@@ -0,0 +1,27 @@
1#include "nu_lanman.h"
2
3BYTE LANMAN_NetShareGetInfo_1_bytes[] = { 20,0,'S','H','A','R','E',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
4
5SMB_STATUS handle_LANMAN( SMB_HEADER *header, SMB_DATA *data, SMB_TRANSACTION_BYTES *bytes ) {
6 switch( GETNWORD( bytes->params ) ) {
7 case 1: /* NetShareGetInfo */
8 {
9 BYTE *type = SKIPSTRING( 2 + bytes->params ); /* Input format string; should be "zWrLh" */
10 type = SKIPSTRING( type ); /* Ouput format string; should be "B13", "B13BWz" or "B13BWzWWWzB9B"*/
11 type = SKIPSTRING( type ); /* Name of the requested Share */
12
13 switch( GETNWORD(type)) {
14 case 1: /* Medium set of information */
15 memcpy( bytes->params, LANMAN_NetShareGetInfo_1_bytes, sizeof( LANMAN_NetShareGetInfo_1_bytes )); /* possible buffer overflow */
16 break;
17 default: /* Later */
18 return 0x00400002;
19 break;
20 }
21 break;
22 }
23 default:
24 return 0x00400002;
25 }
26 return 0;
27}