mars_nwe-0.97.pl02

This commit is contained in:
Mario Fetka
2011-11-13 00:38:56 +01:00
parent a584c2191f
commit 55682d7171
24 changed files with 2252 additions and 1651 deletions

View File

@@ -0,0 +1,12 @@
The kernelpatch kpatch1.3.72 you can use directly for kernels 1.3.72 .. ???
but it should be easy to apply this patch to all kernels.
By older kernels 'sk->protinfo.af_ipx.' must become 'sk->' .
After applying this patch please rebuild mars_nwe (make clean)
for getting notice of new ioctl call 'SIOCIPXNCPCONN'.
This patch is only necessary to speed up mars_nwe. (ca. 30 .. 50 % )
Perhaps this patch will get a place in the kerneldistribution one day. :)
This kernelpatch was originally designed by Volker Lendecke.
Martin

72
examples/kpatch1.3.72 Normal file
View File

@@ -0,0 +1,72 @@
Index: include/linux/ipx.h
--- linux.org/include/linux/ipx.h Mon Dec 11 19:55:58 1995
+++ linux/include/linux/ipx.h Thu Mar 21 17:14:49 1996
@@ -74,5 +74,6 @@
#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE+1)
#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE+2)
+#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE+3)
#endif
Index: include/net/sock.h
Prereq: 1.0.4
--- linux.org/include/net/sock.h Mon Mar 11 02:08:59 1996
+++ linux/include/net/sock.h Thu Mar 21 02:36:23 1996
@@ -96,6 +96,7 @@
ipx_address dest_addr;
ipx_interface *intrfc;
unsigned short port;
+ unsigned short ipx_ncp_conn;
#ifdef CONFIG_IPX_INTERN
unsigned char node[IPX_NODE_LEN];
#endif
Index: net/ipx/af_ipx.c
--- linux.org/net/ipx/af_ipx.c Sun Mar 10 22:51:28 1996
+++ linux/net/ipx/af_ipx.c Thu Mar 21 17:26:54 1996
@@ -438,6 +438,20 @@
ipx_socket *sock1 = NULL, *sock2 = NULL;
struct sk_buff *skb1 = NULL, *skb2 = NULL;
+ if (intrfc == ipx_primary_net
+ && ntohs(ipx->ipx_dest.sock) == 0x451
+ && *((char*)(ipx+1)) == 0x22
+ && *((char*)(ipx+1)+1) == 0x22) {
+ int connection = (int) *((char*)(ipx+1)+3);
+ /* 255 connections are enough ;) */
+ if (connection) {
+ for (sock1=intrfc->if_sklist;
+ (sock1 != NULL) &&
+ (sock1->protinfo.af_ipx.ipx_ncp_conn != connection);
+ sock1=sock1->next);;
+ }
+ }
+ if (sock1 == NULL)
sock1 = ipxitf_find_socket(intrfc, ipx->ipx_dest.sock);
/*
@@ -1628,6 +1642,7 @@
sizeof(sk->protinfo.af_ipx.dest_addr));
sk->protinfo.af_ipx.port = 0;
sk->protinfo.af_ipx.ncp_server = 0;
+ sk->protinfo.af_ipx.ipx_ncp_conn = 0; /* no ncp socket yet */
sk->mtu=IPX_MTU;
if(sock!=NULL)
@@ -2128,6 +2143,17 @@
if(err) return err;
return(ipxcfg_get_config_data((void *)arg));
}
+
+ case SIOCIPXNCPCONN:
+ {
+ if (!suser()) return(-EPERM);
+ err = verify_area(VERIFY_READ, (void *)arg,
+ sizeof(unsigned short));
+ if (err) return err;
+ sk->protinfo.af_ipx.ipx_ncp_conn = get_fs_word(arg);
+ return 0;
+ }
+
case SIOCGSTAMP:
if (sk)
{

View File

@@ -50,21 +50,24 @@
# that it is a 3.11 Server, although many calls
# (namespace services) of a real 3.11 Server are missing yet.
# simple namespace services are implemented for testing
# since V 0.96pl8. To test them, this entry must be set to '1'.
# and config.h must be altered to allow namespace calls.
# since V 0.96pl8. To test them, this entry must be set to > 0.
# and config.h must be altered to compile in namespace calls.
6 0 # tells server version: 0=2.15, 1=3.11, 2=3.12
######################################
# Password handling
7 0 # 0 = use only encrypted passwords stuff (default)
# 1 = allow the unencrypted change password routine.
# 8 = allow all unencrypted stuff.
# 7 = allow all unencrypted stuff, no empty nwe passwords.
# 8 = allow all unencrypted stuff, allow empty nwe passwords.
# 9 = use all unencryted calls + get crypt key will allways fail
# so the login program will use the old unencryted calls.
# this will *not* work with all clients !! (OS2/client)
######################################
# GID and UID for _minimal_ rights
# will be used for not logins or not assigned mars_nwe users.
10 200 # GID
11 201 # UID
#############################
######################################
# the following passwords should be removed after the first
# start, because these entries will be inserted (crypted) into
# the bindery. If you specify a password here, then this password
@@ -81,7 +84,7 @@
# Read UnixUsers automaticly from passwd into bindery
# switch password
15 0 secure11
# ^^^ 0=off (default), 1=on, 99=overwrite existing users.
# ^^^ 0=off (default), 1=on, 99=overwrite existing mars_nwe users.
# !!! IMPORTANT !!!
# If you enable this feature you should chose a secure
# password for the users, because all not existent
@@ -102,6 +105,7 @@
102 0 # debug NCPSERV
103 0 # debug NWCONN
104 0 # debug (start) NWCLIENT
105 0 # debug NWBIND
#############################
200 1 # 0 = no logfile and dont daemonize nwserv
# # 1 = daemonize nwserv and use logfile