mars_nwe-0.98.pl09

This commit is contained in:
Mario Fetka
2011-11-13 00:38:58 +01:00
parent 519bf6bfcd
commit 178789c7e4
35 changed files with 657 additions and 254 deletions

66
examples/kpatch2.0.28 Normal file
View File

@@ -0,0 +1,66 @@
diff -uwr linux-2.0.28/include/linux/ipx.h linux/include/linux/ipx.h
--- linux-2.0.28/include/linux/ipx.h Mon May 13 22:39:28 1996
+++ linux/include/linux/ipx.h Tue Jan 14 16:33:27 1997
@@ -75,5 +75,6 @@
#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE+1)
#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE+2)
+#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE+3)
#endif
diff -uwr linux-2.0.28/include/net/sock.h linux/include/net/sock.h
--- linux-2.0.28/include/net/sock.h Sun Dec 1 19:01:21 1996
+++ linux/include/net/sock.h Tue Jan 14 16:34:39 1997
@@ -112,6 +112,10 @@
* know the connection this socket belongs to.
*/
struct ncp_server *ncp_server;
+/*
+ * To handle special NCP-Sockets for mars_nwe
+ */
+ unsigned short ipx_ncp_conn;
};
#endif
diff -uwr linux-2.0.28/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
--- linux-2.0.28/net/ipx/af_ipx.c Wed Nov 27 08:44:21 1996
+++ linux/net/ipx/af_ipx.c Tue Jan 14 16:33:27 1997
@@ -468,6 +468,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);
/*
@@ -2242,6 +2256,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

@@ -2,8 +2,9 @@
# This is the configuration-file for "mars_nwe", a free netware-emulator
# for Linux.
#
# last changed: 29-Jan-97
# last changed: 10-Apr-97
# !! section 4 : automatic creation of ipx-interfaces changed in 0.98.pl9 !!
#
# This file specifies which Linux-resources (printers, users, directories)
# should be accessible to the DOS-clients via "mars_nwe". Furthermore
# some general parameters are configured here.
@@ -85,7 +86,7 @@
# See `doc/PIPE-FS'.
#
# additional Namespaces
# O + OS/2 namespace.
# O + OS/2 namespace (useful for Win95 clients, see doc/FAQS).
# N + NFS namespace.
# -------------------------------------------------------------------------
#
@@ -167,7 +168,7 @@
# -------------------------------------------------------------------------
#
# Example:
# 3 auto 1 # automatic setup
# 3 auto 1 # 'automatic' setup, use ip-number as internal net
3 auto
@@ -186,22 +187,21 @@
# - make sure your network-number is not already in use by another
# server (see the output of "slist" under Linux or DOS)
#
# Under Linux, it is possible to let the kernel detect all values
# Under Linux, it is possible to let the kernel creat all ipx-devices
# automatically for you. This is only possible (and only makes sense then)
# if there are other IXP/NCP servers on the same net which are setup
# correctly.
#
#
# correctly. It can be switched on in section '5'.
# -------------------------------------------------------------------------
# Syntax:
# 4 NET_NUMBER DEVICE FRAME TICKS
# 4 NET_NUMBER DEVICE FRAME [TICKS]
#
# NET_NUMBER: this number is determined by the router of the physical
# network you're attached to. Use "0x0" to let the
# linux-kernel determine your network number by listening
# on the local network
# network you're attached to. Use "0x0" to use the entry
# for all network number match.
#
# DEVICE: the network-interface associated with the NET_NUMBER. Use
# a "*" (star) to automatically setup all devices at once.
# a "*" (star) to use this entry for all devices match.
#
# FRAME: the frame-type of the data-packets on your local network.
# Possible values are:
# ethernet_ii
@@ -211,40 +211,49 @@
# token
# auto automatic detection of the frame-type used
# in your ipx-environment
#
# TICKS: the time data-packets need to get delivered over a
# certain interface. If your connection goes through several
# routers, the shortest path can be determined by summing up
# all ticks for every route and compare the results.
# (1 tick = 1/18th second)
# (1 tick = 1/18th second), default=1
# !! NOTE !!
# Automatic detection in this section means that ipx-interfaces which
# are created by other instances than the server/router,
# e.g. pppd or ipx_interface, will be detected and inserted/removed
# in internal device/routing table at runtime.
#
# Automatic kernel creation of interfaces can be switched on in section 5.
# -------------------------------------------------------------------------
#
# Examples:
# 4 0x0 * AUTO 1 # automatic setup
# 4 0x10 eth0 802.3 1 # manual setup
# 4 0xa20 arc0 802.3 1 # standard arcnet (TRXNET)
4 0x10 eth0 802.3 1
4 0x0 * AUTO 1
# 4 0x10 eth0 802.3 1 # setup ethernet with frame 802.3
# 4 0xa20 arc0 802.3 1 # standard arcnet (TRXNET)
#
# 4 0x0 * AUTO 1 # auto detection of all ipx-interfaces.
# 4 0x0 eth0 AUTO 1 # auto detection of eth0 frames.
# 4 0x0 eth0 802.2 1 # auto detection of eth0 frame 802.2.
4 0x22 eth0 ethernet_ii 1
4 0x0 * AUTO 1
# Section 5: special device flags
# =========================================================================
# Section 5: Saving of ipx-routes (required)
# Flags
# 0x1 do not remove routes and ipx-devices
# beyond the lifetime of the server or router.
# If this flag is not set then all ipx-devices/routes
# will be deleted when nwserv/nwrouted ends (default).
#
# This entry controls if the information regarding the ipx-routes and
# devices should be saved beyond the lifetime of the server.
#
# -------------------------------------------------------------------------
# Syntax:
# 5 SAVE_FLAG
#
# SAVE_FLAG:
# 0 don't save routes (default)
# 1 do save routes
# -------------------------------------------------------------------------
# 0x2 Switch on automatic kernel creation of ipx-interfaces.
# The automatic kernel creating of ipx-devices sometimes
# make trouble (Win95). It should only be used in the
# beginning or for testing.
#
# other flags may follow.
# value will be interpreted as hex value.
5 0
5 0x0
# =========================================================================
# Section 6: version-"spoofing"
@@ -434,12 +443,22 @@
# typo), the user will only have the minimal rights defined in
# sections 10/11.
#
# You may also map different mars_nwe user to the same unix user.
#
# See section 12 for a description of the syntax.
#
# Unlike in section 12, you can define users with no password.
# -------------------------------------------------------------------------
# Syntax:
# 13 NW_LOGIN LINUX_LOGIN [PASSWORD] [FLAGS]
#
# FLAGS must be a hex value begin with 0x
# the only FLAG value in the moment is 0x1 for 'fixed passwords'
# which cannot be changed by user.
# Example:
# 13 MARTIN martin
# 13 MARTIN martin
# 13 DAREK martin
# 13 COMMON common gast 0x1 # no password change by user.
# Section 14: currently not used