summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorerdgeist <>2004-02-26 04:59:25 +0000
committererdgeist <>2004-02-26 04:59:25 +0000
commit96027bb8637c00799a25391fd9804e7e030fed20 (patch)
treec291cf20c6b70c565c7843585fcea78f7e46123b /src
parent78011b55064b08b0628914e5d32972e23c94b5af (diff)
Introducing LANMAN functionality
Diffstat (limited to 'src')
-rw-r--r--src/nu_lanman.c27
-rw-r--r--src/nu_lanman.h8
2 files changed, 35 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}
diff --git a/src/nu_lanman.h b/src/nu_lanman.h
new file mode 100644
index 0000000..f15c37a
--- /dev/null
+++ b/src/nu_lanman.h
@@ -0,0 +1,8 @@
1#ifndef _NU_LANMAN_H_
2#define _NU_LANMAN_H_
3
4#include "nu_server.h"
5
6SMB_STATUS handle_LANMAN( SMB_HEADER *header, SMB_DATA *data, SMB_TRANSACTION_BYTES *bytes );
7
8#endif