METHOD AND APPARATUS FOR PROVIDING SIMPLE, SECURE MANAGEMENT OF REMOTE SERVERS

Abstract: A set of secure remote procedure calls are implemented in a network using the terms of the native communications protocol of the local and remote computers. The remote procedure calls allow a system administrator working from a client computer to directly interact and to manage the network operating system. One or more remote procedure calls are incorporated into the network client computer operating system and corresponding remote procedure calls are incorporated into the server computer operating system. As a result, developers may develop client software with the ability to load, unload or otherwise configure remote server applications using a network client computer to instruct the server computer operating system that supports the calls.

Description: METHOD & APPARATUS FOR PROVIDING SIMPLE, SECURE MANAGEMENT OF REMOTE SERVERS Cross-Reference to Related Application This is a continuation application of United States Patent Application Serial No. 08/355,369 filed December 13, 1994 entitled "Method and Apparatus for Providing Simple Secure Management of Remote Servers". Background Art and Technical Problems The present invention relates, generally, to methods and apparatus for controlling the configuration of a file server from a remote computer and, more particularly, to a method for reconfiguring a file server from a client computer in a client-server network operating environment. Technological advances in microelectronics and digital computing systems have enabled the distribution of networking services across a wide range of computers participating in the network and over various communications media. Advances in distributing applications have also resulted in a client-server architecture for applications. Under a typical client-server architecture, the portions of an application which interact with the user are typically separated from the portions of the application that fulfill client process requests. Typically, the portions of an application that interact with the user are called a client or client software, whereas the portions of the application which service requests made by the client software are called a "server" or server software. However, a server could be running as a client to another server. In a network environment, the client and server are generally executed on different computers. The management of server software running on a host computer, often referred to as a file server, poses several problems. Historically, if the server software needed to be unloaded, configured (or reloaded, the system administrator or other person responsible for administering network applications) or the user of the client software was required to physically go to the server computer and use the server computer's input and display devices (e.g., a keyboard and monitor) to reload, configure or unload the server software. If client software needed to have access to a server that was not loaded or was otherwise improperly configured, the system administrator or user of the client software had TO physically go to the server computer and load the desired software. If the client needed to interrogate the server computer to determine what server software was available, or interrogate the server computer to determine the devices supported by the server computer, the system administrator or user had to physically go to the server and inspect the processes running on the server or physically inspect the devices attached to the remote computer. Previously, the management of remote computers has typically been based on one of two schemes. One scheme, known as the remote console or log in scheme, employs client software that uses a simple network protocol, such as a protocol that provides for the creation, distribution and delivery of digital packets. The client software runs at the "Network" level of the Open Systems Interconnect or "OSI" model. Corresponding server software interacts directly with the client software. Through this scheme, the client software accepts input from the local computer (e.g., the client), sends the input to the remote server software which in turn passes the keystrokes directly to the server computer operating system. Given the nature of the scheme, that keystrokes entered on the local computer are passed over the network through the remote server software directly to the remote operating system, the only security that was employed was for access to the remote server application. The second commonly used scheme uses the Simple Network Management Protocol ("SNMP"), and the Simple Management Protocol ("SMP"). Both are related and have the same historical roots. The scheme essentially defines two protocols for use in a heterogenous environment. The major focus of the scheme does not concentrate on how remote computers are managed but on how to handle the communication and interaction ot heterogenous systems for management purposes. To date, the specification for this scheme consists of over 400 pages of documentation. Although this second scheme is useful in large heterogenous networks, the scheme fails to provide an elegant mechanism for client- server development of functionality to manage a specific remote network server over existing network protocols operating at the native session level, i.e., at the "Session" level of the OSI model. Generally, all remote computers communicate in a network with other client computers by means of a network operating system that implements network communication using a native connection-based protocol running at the "transport" level of the OSI model ("native communications protocol"), such as Transmission Control Procedure ("TCP"), Server Message Block ("SMB"), or NetWare Core Protocol ("NCP"). The developer of the network operating system provides a client that implements the native communications protocol on the local computer ("network client"), and an operating system that implements the native communications protocol on the remote computer. Developers writing client-server software for such network operating systems presently may either employ a remote console system and rely on the user of the client software to know how to interact with the remote computer, or employ a heterogenous network management protocol and develop the associate client- server applications to manage not only the local computer but various remote heterogeneous computers as well. Neither is satisfactory. The remote console approach requires the user to know too much and lacks robust security. The heterogenous protocol requires the developer to do too much. The developer must implement the protocol, write the client and server applications and have access to the system internals of one or more of the remote operating systems in order to implement the necessary functionality. Thus, network administrators have needed a simple means of implementing remote management of networked computers, particularly for remote management of network servers in a client-server computing environment. Summary of the Invention In accordance with one aspect of the present invention, a network operating system comprises a client software module resident in a client computer and a server software module resident on the server computer, which together permit the user to dynamically reconfigure the server computer from a remote, client computer terminal, thereby avoiding the need for the user to physically go to the server computer to perform server control and reconfiguration functions. In accordance with a preferred embodiment of the present invention, a set of secure remote procedure calls are implemented in the network using the terms of the native communications protocol of the local (e.g., client) and remote (e.g., server) computers. The remote procedure calls allow client software to directly interact with the operating system of the remote computer so as to avoid the inherent problems of the currently available schemes. One or more remote procedure calls are incorporated into the network client and corresponding remote procedure calls are incorporated into the server operating system Developers who then wish to develop client software with the ability to load, unload or otherwise configure their remote server applications may do so using a network client and server operating system supporting the calls. Brief Description of the Drawing Figures The present invention will hereinafter be described in conjunction with the appended drawings figures, wherein like numerals denote like elements, and: Figure 1 is a schematic block diagram of an exemplary network in accordance with the present invention, showing a server computer and a plurality of client computers; Figure 2 is a schematic diagram of an exemplary message packet constructed and transmitted in accordance with the present invention; and Figures 3-6 are flow diagrams illustrating the operation an exemplary method in accordance with one aspect of the present invention. Detailed Description of Preferred Exemplary Embodiments Referring now to Figure 1, an exemplary network 10 suitably comprises a plurality of computers, each having a unique "network address" associated therewith to facilitate communication among the various hardware nodes (e.g., computers) on the network. Although a typical network may include PCs, printers, servers, CD ROM drivers and various other appropriate hardware nodes, for simplicity only client and server computers are illustrated in Figure 1. Network 10 suitably comprises one or more client computers 20 and one or more server computers 40 suitably interconnected in an appropriate network configuration by a network communications BUS 54. In accordance with a preferred exemplary embodiment, at least one of the client computers 20 comprises a keyboard 24 and monitor (e.g., screen) 22 to permit user interaction with the client computer. Client computer 20 further comprises a disk drive 26, a client computer processor 28, RAM 30, and ROM 32, for example a conventional hard drive. User access to a particular client computer 20 may be suitably controlled by various known security schemes, including the use of a user password having a level of security associated therewith which permits the user to access the various files stored in hard drive 32, and to also interface with server computer 40 in much the same way that the users of the various other client stations interact with server 40. In contrast, access to server computer 40 is suitably controlled through the use of a super-user password, which typically has associated therewith a level of security higher than that associated with each user password. With continued reference to Figure 1, server computer 40 suitably comprises a keyboard 42, a monitor 44, a server disk drive 52, a server processor 46, a RAM 48, and one or more hard drives 50. As depicted in the drawings, a preferred embodiment of the present invention may be suitably implemented in terms of several remote procedure calls, each designed to implement control functions at the server computer. Different remote procedure calls may be implemented to perform different tasks. Thus, a system administrator may easily perform the specified tasks from a remote location. In one embodiment of the invention, remote procedure calls have been implemented for loading a remote process, unloading a remote process, mounting a remote volume, dismounting a remote volume, adding a name space to a volume, issuing set procedures to the remote operating system and executing a remote batch file. In the network client, code is implemented that creates packets conforming with the structure of the remote procedure calls in the server and in the form required by the underlying network communications protocol. For example, in a client-server environment supporting the NCP protocol, the client and server remote procedure calls advantageously comply with the general NCP packet structure. Each veer of the NCP protocol suitably comprises a fixed packet header and a variable data block. Each verb has three fields and is known by a name and number. The name, such as "RPC Load an NLM" (which stands for "Remote Procedure Call to Load a NetWare Loadable Module") by itself is useful only for describing the task that the verb performs. The numbers associated with the three fields for the RPC Load an NM are suitably 0x2222, 131 and 01. The verb number (e.g., all three fields) acts as a unique identifier for the verb. The initial field of the number identifies the service category. For example service oriented NCPs typically use 0x2222. The fixed packet header contains the type of request and other parameters necessary for the client and server to continue to communicate about a request, such as transaction sequence number, service connection number and task number. NCP Protocol Environment Because an understanding of the underlying network communications protocol is helpful to implementing the invention, and given that various embodiments of the invention discussed herein implement the invention as a set of remote procedure calls in an NCP environment, a typical client - server request session for the invention is described. It will be understood, however, that the invention may also be implemented in other operating environments. The session tracks the sequence of events from when the client software first requests the remote server operating system to load a remote process. Prior to making the request, the client must be connected and authenticated to the remote computer and the user making the request must have the appropriate level of security. The basic steps in one embodiment of the invention, called "RPC Load an NLM" in the NetWare Core Protocol environment, for remotely loading a server process (called an NLM or NetWare Loadable Module) may be generally described as follows: 1. The client software needing the services of a remote server software process issues a request to network client that also must be running in the local computer. The request is intercepted in the NetWare environment through a module in the local network client known as the NetWare shell. 2. The NetWare shell interprets the request as an NCP request and passes the request to another module of the network client capable of creating an NCP packet. The NCP packet creation module, namely NCP.VLM in the NetWare environment, creates the RPC Load an NLM verb and places it on the underlying transport. 3. The RPC Load an NLM request is then sent in the form of an NCP packet. The structure for the RPC Load an NLM verb is as provided in Table 1. 4. Each NCP packet begins with a small message header that carries general status information about the current state of the connection between the client and the server. The client request header is seven bytes long, while a server's reply header is eight bytes long. As shown in Table 1 , the RequestType variable defines the type of network request. A type of 0x1111 is reserved for connection allocation services; a type of 0x2222 is reserved tor server request services; a type of 3333 is reserved for server responses; a type of 0x5555 is reserved for destroying connections; and a type of 0x9999 is reserved for work in progress responses. 5. The sequence number maintains a numeric counter for all incoming reαuests to provide reply prioritization. The ConnectionNumberLow and the ConnectionNumberHigh numbers identify a particular service connection between the client and the server. The TaskNumber distinguishes which client process or thread is making the request to the server. 6. In the NetWare environment the SubFuncStrucLen will be 21 plus the size of the PathAndName (ASCII) including the terminating null. The NLMLoadOptions include options to load the server process in a processor ring such as ring 0, 1 , 2 or 3. The PathAndName variable of the structure includes the path and file name in ASCII of the location of the server software to be executed in the format of {volume name:}{path \...}file name\0. 7. The server operating system responds to the "RPC Load an NLM" verb through the reply format provided in Table 2. In addition to the general message header information contained in the packet, the response packet includes the Completion Code, which will be 0 if the request was completed successfully or 251 if the server received an invalid subfunction request, namely one not matching the "RPC Load an NLM" verb structure. 8. The RPCcode contains information about the request to load the server process. If the server process was successfully loaded and executed, the RPCcode will contain a 0. If the server software module to be loaded in response to the request was not found or the name was not provided with the request, the server will return an RPCcode value of 158. Referring now to Figures 2-6, an exemplary method for dynamically reconfiguring the server computer file server from a remote client terminal will now be described. A user first establishes a session (step 302) by logging on to a client computer 20 associated with network 10 (sss Figure 1). In this regard, a "session" on the network typically requires the user to enter a user password which enables the user to utilize client computer 20 and to access server computer 40 for those server functions resident on computer 40. When a user desires to reconfigure the server operating system, for example by loading a software module onto the operating system from the client computer, the client application begins a series of steps designed to reconfigure the server operating system, as desired. In the context of the illustrated embodiment, the user may wish to add a software module to the server computer file server. In a NetWare environment employing NetWare protocols, the user may desire to add a NetWare loadable module (NLM) to the server hard drive. In a more general context, the user may desire to add a server operating system module (SOSM) to the server hard drive. As a first step in implementing such a function, the client application retrieves an SOSM to be loaded onto the server (step 304). In this regard, the SOSM may be loaded from disk drive 26, retrieved from ROM 32, or any other suitable mechanism for allowing the client application to retrieve the SOSM. With continued reference to Figures 2 and 3, the client software then begins constructing a message packet to be transmitted by the client computer to the server. When the server computer retrieves the message packet, the server computer loads the SOSM it received from the client computer onto the server computer's hard drive, as discussed in greater detail below. A first step in building such a message packet involves building the data portion 202 (step 306) of an exemplary message packet 200 (see Figure 2). The server software then adds a function header 204 to the message packet (step 308). The function header suitably comprises indicia of instructions to the server computer regarding the function or functions to be performed by the server computer on the data portion 202 of the message packet (in this example, the SOSM being transmitted from the client computer to the server computer). In accordance with a preferred embodiment of the present invention, the function header 204 may be selected by the client software from a function library resident in the client software, i.e., a library of NCP headers each representing a predetermined processing function. The client software thereafter issues a request to load the SOSM; in the context of the illustrated embodiment, however, this request is suitably "intercepted" by the NetWare shell or other suitable IPX interface (step 310), whereupon the client software adds an appropriate IPX header 206 (step 312) to message packet 200. In the illustrated embodiment, the IPX header may comprise indicia of the network address of the server computer to which the request is being directed by the client software. Before placing the message on the network BUS, it may be desirable to add a wire frame header 208 to the message (step 314) to facilitate the transmission of the message packet from client to the server. In accordance with one aspect of the present invention, suitable wire frame header types may include IEEE 802.2, 802.3, and the like. Referring now to Figure 4, once message packet 200 is fully constructed, client computer 20 suitably applies the message packet to network BUS 54 (step 316). Upon receipt of message packet 200 by server computer 40 (step 318), the physical driver interface (not shown) associated with server computer 40 strips off wire frame header 208 (step 320). Server computer 40 then interrogates IPX header 206 to confirm that the message has properly reached its intended destination (e.g., server computer 40) and strips off IPX header 206 (step 322). Server software resident in server computer 40 then interrogates NCP header field 204 to ascertain the task to be performed by server computer 40 on data 202 (step 324). In a typical server computer operating in a NetWare environment, function header 204 is suitably accessed and interpreted by the NCP interface associated with server computer 40. Upon determining the requested function, server computer 40 implements the desired function on data 202. In the context of the illustrated example, the requested function is to "load SOSM"; hence, server computer 40 suitably loads SOSM onto hard drive 50 in accordance with the server's operating system protocols (step 326). Referring now to Figure 5, it may be desirable for server computer 40 to construct a response message to be transmitted back to client computer 20, for example to confirm that the SOSM was properly loaded, to inform the client software of the file name and/or address assigned to the SOSM by the server computer, and the like. As a first step in this process, the server software resident in server computer 40 begins building a response message (step 328); in the illustrated embodiment, the "data" portion 202 of such response message may included, for example, a message to the effect that the SOSM was properly loaded SOSM, the address on the server's hard drive or the like. The server software may then append a function header 204 to the message (step 330), for example a function header which identifies the nature of data 202; in this context, the function header may simply indicate that data portion 202 corresponds to a reply message. The server software thereafter appends an IPX header, for example indicative of the network address associated with client computer 20 (step 332), and thereafter adds an appropriate wire frame header 208 to the message (step 334). The server computer then suitably transmits the message packet on to the network wire (step 336). When the response message is received by the client computer (step 338) the physical driver interfaces (not shown) associated with the client computer receives the message packet and strips off wire frame header 208 (step 340). The redirector IPX interface associated with the client computer then receives the response message and strips off the IPX header (step 342), thus confirming that the response message has been received by the appropriate node on the network (e.g. client computer 20). The NCP interface associated with the client computer then receives the function request and strips off function header 204 (step 344), whereupon the client software interprets the data. In the present case, data portion 202 of reply message 200 may comprise virtually any appropriate information in the context of the user amplication, for example a message to the user indicating that the SOSM has been properly loaded, the SOSM address on the server computer's hard drive, and the like. In this regard, it may also be desirable to utilize a function library such that the client software may interpret data field 202 and execute predetermined functions in accordance therewith, for example by displaying a message to the user, or facilitating access to the SOSM now resident on the server's hard drive by the client software (step 346). Although the methodology set forth in Figures 3-6 describes the loading of an SOSM (e.g. an NLM) in the construction of a corresponding response message, it will be appreciated that the general scheme set forth in the attached drawing figures may be employed to control, reconfigure, manipulate, or otherwise access the server hard drive, operating system, or associated hardware devices from a remote client computer. Indeed, this may be accomplished without requiring the user at a client computer to utilize or even have knowledge of the system administrator's super password typically needed to gain access to the server computer operating system. Client Software Implementing the Invention Developers may use the present invention to develop client software that interacts with the network client to issue the appropriate remote procedure calls, depending on the desired function of the client software. The following exemplary software programs exercise each of the remote procedure calls identified in the current embodiment. RPC Load an NLM #include <stdio.h> ..include <stdlib.h> ..include .string.h> #include "n calls.h" iinclude <tiπ.e.h> WORD connectionID = 0; NW_FRAGMENT n Frag[10] = {0) ; typedef struct { WORD sflen; BYTE sfcode; LONG parmO LONG parml LONG parm2 LONG par 3 BYTE flagO BYTE flagl BYTE flag2 BYTE flag3 ) rpcreq; typedef struct { LONG rpcCompletionCode; LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; ) rpcrep; rpcreq req; rpcrep rep; void main (int argc, int *argl[]) { WORD ccode; if (argc < 2) { printf ("\nUsage: LOAD {volumename: } {pathW)filename" ) ; ) ccode - NWGetDef aultConnectionID ( -.connectionID) ; i f ( ccode) { printf ( failed, err = 0x%0x" , ccodei ; exit(l) ; } /* convert to the name space path */ nwFrag[0] . fragAddress = &req; nwFrag[0] .fragSize = sizeof (rpcreq) ; nwFrag[2] . fragAddress = _rep; nwFrag[2] . f ragSize = sizeof (rpcrep) ; req.sflen = NWWordSwap (sizeof (rpcreq) + strlen((char *)argl[l]) + 1); req.sfcode = 1; nwFrag[l] . f ragAddress = arglfl]; nwFrag[l] . f ragSize = strlen((char *)argl[l]) + 1; ccode = NWRequest (connectionID, 131, 2, &nwFrag[0], 1, &nwFrag[2]); if (ccode) { printf ("\nNWRequest rtn ccode = %u(0x%x) M , ccode, ccode); exit(0); ) if (rep.rpcCompletionCode == 0) { printf ("\nThe select file has been loaded."); ) else { printf ( "\nThe select file was unable to be loaded (%ld) .", rep.rpcCompletionCode) ; } RPC Unload an NLM #include <stdio.h> ♦include <stdlib.h> ♦include <strιng.h> ♦include "nwcalls.h" ♦include <time.h> WORD connectionID = 0; NW_FRAGMENT nwFrag[10] = (0); typedef struct { WORD sflen; BYTE sfcode; LONG parmO; LONG parml; LONG parm2; LONG parm3; BYTE flagO; BYTE flagl; BYTE flag2; BYTE flag3; } rpcreq; typedef struct { LONG rpcCompletionCode; LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; ) rpcrep; rpcreq req; rpcrep rep; void main (int argc, int *argl[]) { WORD ccode; if (argc < 2) f printf ("\nUsage: UNLOAD filename"); exit (0) ; } ccode = NWGetDef aultConnectionID ( -.connectionID) ; i f ( ccode ) { printf ( failed, err = 0x%0x" , ccode) exit(l) ; } /* convert to the name space path */ nwFrag[0] .fragAddress = &req; nwFrag[0]. fi.gSize = sizeof (rpcreq) ; nwFrag[2] . fragAddress = ϋrep; nwFrag[2] . fragSize = sizeof (rpcrep) ; req.sflen = NWWordSwap(sizeof (rpcreq) + strlen((char *ιargl[l]) + 1); req.sfcode = 2; nwFrag[1] . fragAddress = argl [1] ; nwFrag[1] . fragSize = strlen((char *)argl[l]) + 1; ccode = NWRequest (connectionID, 131, 2, &nwFrag[0], 1, &nwFrag[2] ) ; if (ccode) { printf ( "\nNWRequest rtn ccode = %u(0x%x)", ccode, ccode); exit(0) ; ) if (rep.rpcCompletionCode == 0) { printf ("\nThe select file has been unloaded."); } else { printf ( "\nThe select file was unable to be unloaded (lid).", rep.rpcCompletionCode) ; RPC Mount Volume ♦include <stdio.h> ♦include <stdlib.h> ♦include .string.h> ♦include "nwcalls.h" ♦include <time.h> WORD connectionID = 0; NW_FRAGMENT nwFrag[10] = {0) ; typedef struct { WORD sflen; BYTE sfcode; LONG parmO; LONG parml; LONG parm2; LONG parm3; BYTE flagO; BYTE flagl; BYTE flag2; BYTE flag3; ) rpcreq; typedef struct { LONG rpcCompLetionCode; LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; LONG mountedVolumeNumber; ) rpcrep; rpcreq req; rpcrep rep; void main (int argc, int *argl[]) { WORD ccode; if (argc < 2) { printf ( "\nUsage: MOUNT volumename") ; exit(O) ; } ccode = NWGetDefaultConnectionID( &connectionID) ; if (ccode) { printf ("\nNWGetDef ultConnectionID failed, err = 0x%0x" , ccode); exit(l) ; ) /* convert to the name space path */ nwFrag[0] . fragAddress = &req; nwFrag[0] .fragSize = sizeof (rpcreq) ; nwFrag[2] .fragAddress = &rep; nwFrag[2] . ragSize = sizeof (rpcrep) ; req.sflen = NWWordSwap(sizeof (rpcreq) + strlen((char *)argl[l]) + 1) ; req.sfcode = 3; nwFrag[1] . ragAddress = argl[l]; nwFra [1] . fragSize = strlen((char *)argl[l]) + 1; ccode = NWRequest (connectionID, 131, 2, &nwFrag[0], 1, _.nwFrag[2] ) ; if (ccode) { printf ( "\nNWRequest rtn ccode = %u(0x%x)", ccode, ccode); exit (0) ; ) if (rep.rpcCompletionCode == Oi t print ( "\nThe select volume was mounted."); ) else { printf ( "\nThe select volume was unable to be mounted (%ld) .", rep.rpcCompletionCode) ; ) ) RPC Dismount Volume ♦include <stdio.h> ♦include <stdlib.h> ♦include <string.h> ♦include "nwcalls.h" ♦include <time.h> WORD connectionID = 0; NW_FRAGMENT nwFrag[10] = (0); typedef struct { WORD sflen; BYTE sfcode; LONG par O; LONG parml; LONG parm2; LONG parm3; BYTE flagO; BYTE flagl; BYTE flag2; BYTE flag3; ) rpcreq; typedef struct { LONG rpcCompletionCode; LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; ) rpcrep; rpcreq req; rpcrep rep; void main (int argc, int *argl [ ] ) { WORD ccode; if (argc < 2) { printf ( "\nUsage: DISMOUNT volumename"); exit(0) ; } ccode = NWGetDefaultConnectionID! ϋconnectionlD) ; if (ccode) { printf ( "SnNWGetDefaultConnectionID failed, err = 0x%0x" , ccodej exit(l); ) /* convert to the name space path */ nwFrag[0] .fragAddress = &req; nwFrag[0] .fragSize = sizeof (rpcreq) ; nwFrag[2] . fragAddress = S_rep; nwFrag[2] . fragSize = sizeof (rpcrep) ; req.sflen = NWWordSwap(sizeof (rpcreq) + strlen((char *)argl[l]) + 1) ; req.sfcode = 4; nwFrag [ 1 ] . f ragAddress = argl [ 1 ] ; nwFra [1 ] . f ragSize = strlen ( (char * ) argl [l ] ) + 1 ; ccode = NWRequest ( connectionID, 131 , 2 , &_nwFrag [0 ] , 1 , fcnwFrag [ 2 ] ) ; if (ccode) { printf ( "\nNWRequest rtn ccode = %u(0x%x)", ccode, ccode); exit(0) ; ) if (rep.rpcCompletionCode == 0) { printf ( "\nThe select volume was dismounted."); ) else { printf ( "\nThe select volume was unable to be dismounted (%ld).", rep.rpcCompletionCode) ; ) RPC Set Set Command Value ♦include <stdio.h> ♦include <stdlib.h> ♦include -string.h> ♦include "nwcalls.h" ♦include <time.h> WORD connectionID = 0; NW_FRAGMENT nwFrag[10] = {0) ; typedef struct { WORD sflen; BYTE sfcode; LONG parmO; LONG parml; LONG parm2; LONG parm3; BYTE flagO; BYTE flagl BYTE flag2 BYTE flag3 ) rpcreq; typedef struct { LONG rpcCompletionCode; LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; ) rpcrep; rpcreq req; rpcrep rep; void main (int argc, int *argl[]) { WORD ccode, len, vlen; BYTE *bp; if (argc < 3) { printf ( "\nUsage: SETCMD <special> value"); exit(0); } ccode = NWGetDefaultConnectionID! -connectionID); if (ccode) { printf I "XnNWGetDefaultConnectionID failed, err = 0x%0x" , ccode) exit (1) ; ) /* convert to the name space path */ nwFrag[0] . fragAddress _ &req; nwFrag[0] . fragSize = sizeof (rpcreq) ; nwFrag[5] . fragAddress = &rep; nwFrag[5] . fragSize - sizeof (rpcrep) ; len = strlen((char *)argl[l]> + 1; vlen = strlen((char *)argl[2]l + 1; bp = (BYTE *) argl[l]; while (*bp) \ if (*bp == '_' ) *bp = 0x20; bp++; ) req.sflen = NWWordSwap(sizeof (rpcreq) + len + vlen) ; req. sfcode = 6; nwFrag[1] .fragAddress = argl[1] ; nwFrag[1] .fragSize = len; nwFrag[2] .f agAddress = argl [2] ; nwFrag[2] .fragSize = vlen; ccode = NWRequest(connectionID, 131, 3, &nwFrag[0], 1, fcnwFrag[5] ) ; if (ccode) { printf( "\nNWRequest rtn ccode = %u(0x%x)", ccode, ccode); exit(0) ; ) if (rep.rpcCompletionCode == 0) { printf("\nThe set command was changed."); ) else { printf ("\nThe set command was not set (%ld).", rep.rpcCompletionCode) ; ) ) RPC Execute NCF File ♦include <stdio.h> ♦include <stdlib.h> ♦include .string.h> ♦include "nwcalls.h" ♦include <tιme.h> WORD connectionID = 0; NW_FRAGMENT nwFrag[10] = {0} ; typedef struct { WORD sflen; BYTE sfcode; LONG parmO; LONG parml; LONG parm2; LONG parm3; BYTE flagO; BYTE flagl; BYTE flag2; BYTE flag3; } rpcreq; typedef struct { LONG rpcCompletionCode,- LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; ) rpcrep; rpcreq req; rpcrep rep; void main (int argc, int *argl[]) { WORD ccode; if (argc < 2) { printf ( "XnUsage: NCF (volumename: ) (pathXX) ilename" ) ; exit (0) ; } ccode = NWGetDef aultConnectionID ( {.connectionID) ; i f ( ccode ) { printf ( "XnNWGetDefaultConnectionID failed, err = 0x%0x" , ccode); exit(l); ) /* convert to the name space path */ nwFrag[0] . fragAddress = &req; nwFrag[0] . fragSize = sizeof (rpcreq) ; nwFrag[2] . fragAddress = &rep; nwFrag[2] . fragSize = sizeof (rpcrep) ; req.sflen = NWWordSwap(sizeof (rpcreq) + strlen((char *)argl[l]ι ■>■ 1) ; req.sfcode = 1 ; nwFrag[1] . fragAddress = argl[l]; nwFrag[1] . fragSize = strlen((char *)argl[l]) + 1; ccode = NWRequest (connectionID, 131, 2, _.nwFrag[0], 1, &nwFrag[2] ) ,- if (ccode) { printf ("XnNWRequest rtn ccode = %u(0x%x)", ccode, ccode); exit(0); } if (rep.rpcCompletionCode == 0) { printf ( "XnThe select NCF file has been executed."); ) else { printf ( " XnThe select file was unable to be executed ( %ld) . rep . rpcCompletionCode) ; RPC Ad Name Space to Volume ♦include <stdio.h> ♦include <stdlib.h> ♦include .string.h> ♦include "nwcalls.h" ♦include <time.h> WORD connectionID = 0; NW_FRAGMENT nwFrag[10] = (0); typedef struct { WORD sflen; BYTE sfcode; LONG par O; LONG parml; LONG parm2; LONG parm3; BYTE flagO; BYTE flagl; BYTE flag2; BYTE flag3; ) rpcreq; typedef struct { LONG rpcCompletionCode; LONG rpcFailureCode; LONG rpc2; LONG rpc3; LONG rpc4; ) rpcrep; rpcreq req; rpcrep rep; char spaceChar[] = " \0"; void main (int argc, int *argl[]) ( WORD ccode , len ; i f ( argc < 3 ) { printf ( " XnUsage : ADDNS NameSpaceName volumename " ) ; exit ( O ) ; ) ccode = NWGetDef aultConnectionID ( -.connectionID) ; i f ( ccode ) { printf ( "XnNWGetDefaultConnectionID failed, err = 0x%0x" , ccode); exit(l) ; ) /* convert to the name space path */ nwFrag[0] .fragAddress = &req; nwFrag[0] . fragSize = sizeof (rpcreq) ; nwFrag[5] . fragAddress = &rep; nwFrag[5] . fragSize = sizeof (rpcrep) ; len = sizeof (rpcreq) + strlen((char *)argl[l]) + 2; len += (strlen( (char *)argl[2]) + 1) ; req.sflen = NWWordSwap(len) ; req.sfcode = 5; req.parmO = 0L; req.parml = 0L; nwFrag[1] . fragAddress = argl [1] ; nwFrag[1] . fragSize = strlen((char *)argl[l]); nwFrag[2] . fragAddress = spaceChar; nwFrag[2] . fragSize = 1; nwFrag[3] . fragAddress = argl [2]; nwFrag[3] .fragSize = strlen((char *)argl[2]); nwFrag[4] . fragAddress = kspaceChar[1] ; nwFrag[4] . fragSize = 1; ccode = NWRequest (connectionID, 131, 5, &nwFrag[0], 1, knwFrag[5] ) ; if (ccode) { printf ("XnNWRequest rtn ccode = %u(0x%x)", ccode, ccode); } if (rep.rpcCompletionCode == 0) { printf ("XnThe select was added to the selected volume."); } else { Remote Services Although many remote services are possible, seven are implemented in the current embodiment, including "RPC Load an NLM," "RPC Unload an NLM," "RPC Mount a Volume," RPC Dismount a Volume," RPC Add Name Space to Volume," "RPC Set Set Command Value," and "RPC Execute NCF File." "RPC Load and NLM" is disucussed above. The remainder are discussed below.RPC Unload an NLM This aspect of the present invention handles client requests to unload a running process in the remote computer. A suitable request/reply format for this remote procedure call may be implemented as follows: Request Format Offset Content Type 7 ConnStatusFlags (variable) BYTE 8 RPCccode (see below)LONG 12 reserved (O)LONG CompletionCode 0 Successful 251 Invalid Subfunction Request RPCccode 0 Successful completion of the request RPC 158 Bad File Name or No File Name given SubFuncStrucLen Sub function length is suitably 21 plus the size of the PathAndName (ASCllZ) including the terminating null. PathAndName ASCII path and file name to load. FORMAT: {volume name:}{path\...}file name\0 RPC Mount Volume This aspect of the invention permits the client software to mount a remote storage volume. The request/reply format is as follows: Request Format Offset Content Type 0 RequestType (0x2222)WORD 2 SequenceNumber (LastSeq+1) BYTE 3 ConnectionHigh (ServiceConn)BYTE 4 TaskNumber (CurrentTaskNum)BYTE Invalid Volume Name Voume Already Mounted SubFuncStrucLen Sub function length will be 21 plus the size of the VolumeName (ASCIIZ) including the terminating null. VolumeName Volume Name (in ASCIIZ format) to be mounted. FORMAT: volume name ) RPC Dismount Volume This aspect of the invention dismounts a volume on the remote computer. The request/reply format is as follows: ReplyFormat Offset Content Type 0 ReplyType (0x3333)WORD (ReqSeqNum)BYTE (ServiceConn)BYTE (CurrentTaskNum)BYTE (ServiceConn)BYTE (variable) BYTE (variable) BYTE (see below)LONG (O)LONG RPCccode 0 Successful completion of the request RPC Invalid Volume Name VolumeName Volume Name (in ASCIIZ format) to be dismounted FORMAT: volume name ) RPC Add Name Space To Volume This aspect of the present invention permits a user to dynamically add a specified name space to a mounted volume on the remote computer. A name space supports specific attributes for a particular client, such as file name length, file characters, case sensitivity, multiple files (such as a resource file containing formating information), vector graphics, and other such functions. The request/reply format in the NetWare Core Protocol is .-Request Format Offset Content Type 0 RequestType (0x2222)WORD 2 SequenceNumber (LastSeq+1) BYTE 3 ConnectionHigh (ServiceConn)BYTE RPCccode 0 Successful completion of the request RPC SubFuncStrucLen Sub function length will be 21 plus the size of the AddNameSpace string (ASCIIZ) including the terminating null. Add Name Space AddNameSpace string (in ASCIIZ form) to add the name space to a selected volume name. FORMAT: "NameSpaceName {TO} {VOLUME} VolumeNameW" RPC Set Set Command Value This aspect of the present invention allows the client to change the current value of a set command on the remote computer. In the NetWare environment, the set command determines such things as communications parameters, memory allocations, file caching, directory caching, file system parameters, file locking parameters, transaction tracking, and disk management. The request/reply format is .'Request Format Offset Content Type CompletionCode 0 Successful 251 Invalid Subfunction Request RPCccode 0 Successful completion of the request RPC SubFuncStrucLen Sub function length will be 21 plus the size of the SetCmdName including the terminating nulL IftypeFlag is zero, then the optional string size including the null will must be included in the Sub Func Struc Len field. typeFlag If zero, then the optional string, which follows the SetCmdName, is the new value of the set command. If one, the the Value field contains the new value of the set command. Value New value of the set command parameter (if typeFlag is equal to one). Set Cmd Name Set parameter command name in ASCIIZ format. {optional string} IftypeFlag is zero, this string used for the new set command parameter value. The set command parameter types (SP_TYPE_STRING & SP_TYPE_TIME_OFFSET) require a string instead of a numerical value. RPC Execute NCF File This aspect of the present invention allows the execution of a selected batch file on the remote computer. Thus the client software can copy a batch file to the server and then request the server to execute the batch file. The batch file must comply with the underlying server operating systement requirments. In the present embodiment as implemented in the NetWare Core Protocol environment, the request reply format is.Request Format Offset Content Type RPCccode 0 Successful completion of the request RPC 158 Bad File Name or No File Name given SubFuncStrucLen Sub function length will be 21 plus the size of the PathAndName (ASCIIZ) including the terminating null. PathAndName ASCIIZ path and file name to execute. FORMAT: {volume name: } {path . }file nameNO Security One aspect of the present invention is the reliance on the security inherent in the network communication protocoL In the NetWare environment, the security in the NCP protocol is provided through digital packet signing. The method and apparatus used in the NCP network communications protocol is described in greater detail in U.S. Patent No. 5,349,642 issued September 20, 1994, the disclosure of which is incorporated herein by this reference. Server Implementation The implementation of the remote procedure calls within the server maps the calls to the appropriate server opening system functions. In this fashion, the server implementation avoids the remote console login approach where each keystroke from the client is captured, packaged and sent to the server and then entered through the system console. In one embodiment, this aspect of the present invention is implemented in the NetWare server environment as follows.void casern ( struct RequestPacketStructure 'Request, struct ReplyProceduresStructure *RP, LONG reserved, LONG PacketSize) t LONG ccode, subFunctionLen, rcode, scode, len, cmdLen, station, flags; LONG onginalSystemConsoleOwner, AnswerLength; struct ConnectionStructure "connection; BYTE Answer[536] ; if (reserved == 0 1 subFunctionLen = (LONG) InvertShort ( ( (ncpl23 *)Request) -.-SubFuncLen) ; rcode = Request->RData[2] ; station = Request->RConnectιonNumbeι . if (NCPBoundaryChec (PacketSize, subFunctionLen ■. ncpPkHdSize) ) i NCPBoundCheckFailed_+: if (NCPBoundCheckFlag) { if (NCPBoundWarningFlag) ( StationAttemptedToUseBadPacket.n argetStation = station, NetWareAler ( OSHandle, -StationAttemptedToUseBadPacke , 3, station, 131, rcode), ) (*RP->ReplyKeepNoFragments) (Request, ERR_NCP_BOUNDARY_CHECK_FAILEr) return; ) if (NCPBoundWarningFlag) NetWareAlert! OSHandle, -StationUsedBadPacket, 3, station, 131, rcode); /* make sure they are authenticated and are supervisor or better */ ccode = GetConnectionAuthenticationState(station) ; scode = IsSupervisor(station) ; if ((ccode != PERMANENT_AUTHENTICATED) I I (!scode)) ( connection = (*connectionTable) [station] ; NetWareAlert! OSHandle, __StaWithoutRight_ConsoleRPC, 1, station, connection-. objectName) ; (*RP-_ReplyKeepNoFragments) (Request, ERR_CONNECTION_NOT_AUTHENTICATED) return; } connection = CconnectionTable) [station] ; /* check access from Allow Remote Command Line Processing = 0 - Always, 1 - Yes if Console not Secure, 2 - Never Default is 1 */ if (AllowRemoteCmdLineProcessing == 2) ( NetWareAlert! OSHandle, &StaWithoutRightsConsoleRPC, 1, station, connectιon->ob3ectName) ; (*RP->ReplyKeepNoFragments) IRequest, ERR_IC_LOCKED) ; return; if (AllowRemoteCmdLineProcessing == 1) if IconsoleSecured == TRUE; NetWareAlert) OSHandle, S-StaWi houtRightsConsoleRPC, i, station, connec ιon--»objectName) ; (*RP->ReplyKeepNoFragments) (Request, ERR_IG_LOCKED) ; return; * Now become the owner of the syste ConsoleScreen * / originalSystemConsoleOwner = Re oveScreenKeyboardOwner (systemConsoleScreen) ; if ( ! originalSystemConsoleOwner ) i / * wait for a second * ' DelayMyself ( 18 , OSTi erResourceTag ) ; originalSystemConsoleOwner = RemoveScreenKeyboardOwner ( systemConsoleScreen) if ( ! originalSystemConsoleOwne ) ( (*RP-_ ReplyKeepNoFragments) (Request, ERR_ACCESS_DENIED) ; return; /* RPC errors codes are always returned in the reply packet */ ccode = 0; AnswerLength = 5*4; /* always room for the ccode + reserved fields */ CSetDIO, &Answer, 5*4); cmdLen = CStrLen( (BYTE *)_((ncpl31 *)Request) ->rpcCmdLιne) ; /* don't count null yet switch (rcode ( case 7: /* RPC Execute NCF File */ if (NCPSubFunctionChec (subFunctionLen, 21 + cmdLen + 1)) ( NCPCompCheckFailed++; if (NCPCompCheckFlag) ( if (NCPCo pWainingFlag) NCPHasBadSubFunctionLength .nwTargetStation = station; NetWareAlert ( OSHandle , {.NCPHasBadSubFunctionLength, 3, station, 13ι, rcode) uutputToΞci een t sy sterr r 'onsol _Scι _en " v n.s consolePrompt ) , Set InputToOutputCurs- -Posit ion ( systemConsoleScreen) ; Res oreScreenKeyboardOwner (sys emConsoleΞcieen, originalSystemConsoleOwner) , (*RF->ReplyKeepNoFragments, (Request, ERR_NCP_BOUNDARY_CHECK_FAILED) ; return, » _.f (NCPCompWarmngFlag) N e t W a . e A ± e i t i ϋ S h α n d l , ..NCPUsedBadSubFunctionLength, 3, station, 131, rcode. ; if ( ( (ncpl31 *)Request) - rpcCmdLιne == NULL) ccode = ERR_BAD_FILE_NAME, break, Convei-tToUpperCase( 'BYTE *l£_'(ncpl31 *)Reques ' ---rpcCmdLine) , ccodf = ExecuteCommandFιle( (BYTE *)_((ncpι3I *)Request t - -ip'-Cmd in. * if (ccode) •((LONG * ) & Answer ( ] ) = ccode; /* return the reason */ ) break; ccode = ERR_INVALID_NAME_SPACE; switch (((ncpl31 *) Request) ->rpcParms [0] ) case 1 : rcode = (LONG) _((ncpl31 *) equest) ->rpcParms[ i len = 0; ccode = 0; case 0: rcode - ((LONG) _((ncpl31 *)Request) ->rpcCmdLine) cmdLen + i; '* skip null */ len = CStrLen! (BYTE *) rcode) + 1; /* count null ccode = 0; break; defaul : ccode = ERR_NO_SET_PRIVILEGE; break; ) if ( (ccode) I ! ( ( (ncpl31 *) Request } ->rpcCmdLine == NULL)) break; if (NCPSubFunctionCheck(subFunctionLen, 21 -. cmdLen . I + lenP 1 NCPCompCheckFailed++; if (NCPCompCneckFlagi if (NCPCompWarningFlag) NCPHasBadSubFunctionLength.nwTargetStation = station; NetWa eAlert ! OSHandj.<- ScNCPHasBadSubFunctionLength, 3, station, 131, rcode); Ou putToSc een I systemConsoleScreen , " \ %s " , consolePrompt ) ; SetlnputToOutputCursorPosition (systemConsoleScreen) ; RestoreScreenKeyboardOwner (systemConsoleGcreeri originalSystemConsoleϋwnei ; ; ( *RP->ReplyKeepNoFragments ) (Reques , ERR_NCP_BOUNDARY_CHECK_FAILED ) ; return; ) if (NCPCompWarningFlag) e t W a r e A l e r t ! O S H a n d l e , StNCPUsedBadSubFunctionLength, , station, 131, rcode); ) /* make sure this is setable */ ccode = ScanSetableParameters (-2, _scode, NULL, &flags, NULL, NULL, NULL, NULL, NULL); if ( !ccode) ( if (flags & SP_RPC_LOCKOUT) ( CCOde = ERR_HARD_IO_ERROR; } else < ccode = ΞetSetableParameterValue(station, (void *) rcode); /* pointer to the new value */ } if (ccode) < * ( (LONG *)^Answer[4] ) = ccode; * return the reason *, ccode = ERR_UNABLE_TG_SET_PARAMETER_VALUE; break; '* For now do sub func. check here *' if (NCPSubFunctionCheck (subFunctionLen, 21 + cmdLen _ 1) / NCPCompCheckFailed-- : if (NCPCompCheckFlag) if (NCPCompWarningFlag) NCPHasBadSubFunctionLength.nwTargetStatior. = station; NetWareAlert ! OSHandle, ScNCPHasBadSubFunctionLength, 3, station, 131, rcode) Outpu tToScreen I systemConsoleScreen " \ nl consolePrompt ) SetlnputToOutputCursorPoΞition (systemConsoleScreen) ; RestoreScreenKeyboardOwner I systemConsoieCereen . originalSystemConsoleOwner) ,- ( *RP->ReplyKeepNoFragments) (Request, ERR_NCP_BOUNDARY_CHECK_FAILED) ; return; } if (NCPCompWarningFlag) N e t W a r e A l e r t ! O S H a n d l e &NCPUsedBadSubFunctionLength, 3, station, 131, rcode); if ( ( (ncpl31 *)Request)->rpcCmdLine == NULL) I ccode = ERR_INVALID_NAME_SPACE; break; } ConvertToUpperCase( (BYTE *)_((ncpl31 *)Request)->rpcCmdLine) ; ccode = AddNameSpaceToVolu e(systemConsoleScreen, & ( (ncpl31 *)Request) - rpcCmdLine, ( (ncpl31 *)Request) ->rpcParms[0] , !(ncpl31 *)Request) ->rpcParmsi1] ) ; if (ccode) ! * ( (LONG *)-(Answer[ ] ) = ccode; /* return the reason */ ccode = ERR JNABLE TO_ADD_NAME_SPACE; ) break; if (NCPSubFunctionChec (subFunctionLen, 21 + cmdLen + 1)) ( NCPCompCheckFaιled_+; if (NCPCompCneckFlag! I if (NCPCompWarningFlag) NCPHasBadSubFunctionLength.nwTargetStation - station; NetWareAlert ! OSHandle, -NCPHasBadSubFunctionLength, 3, station, 131, -r-ode) ; } Ou putToScreen ( sys emConsoleScreen , " \n%s " , consolePrompt) ; SetlnputToOutputCursorPosition (systemConsoleScreen) ; RestoreScreenKeyboardOwner (systemConsoleScreen, originalSystemConsoleOwner) ; ! *RP->ReplyKeepNoFragments ) ! Reques , ERR_NCP_B0UNDARY_CHECK_FA1LED) ; return; } if (NCPCompWarningFlag) N e t W a r e A l e r t ! O S H a n d l e , -NCPUsedBadSubFunctionLength, 3, station, 131, rcode); ) ConvertToUpperCase! (BYTE *)&((ncpl31 *) Request ) ->rpcCmdLιne) ; ccode = ProcessDismountVolu e (& ( (ncpl31 *) Request) ->rpcCmdLιne, TRUE); if (ccode) ! *((LONG *)&AnswerI4) ) = ccode; /* return the reason *' ccode - ERR_UNABLE_TO_DISMOUNT_V0LUME; ) break; if (NCPSubFunctionCheck (subFunctionLen, 21 + cmdLen + 1)) ! NCPCompCheckFaιled++; if (NCPCompCheckFlagi ( if (NCPCompWarningFlag) ! NCPHasBadSubFunctionj-ength.nwTargetStation = station; NetWareAlert f OSHandle, -NCPHasBadSubFunctionLength, 3, station, 131, rcode) υutputToScreen I systemConsoleScreen , " \n -∑ consolePrompt ) ; SetlnputToOutputCursorPosition (systemConsoleScreen) ; RestoreScreenKeyboardOwner (sys emConsoleScreen, originalSystemConsoleOwner) , l *RP->ReplyKeepNoFragments ) (Request ERR_NCP_BOUNDARY_CHECK_FAILED) ; return, if (NCPCompWarningFlagi N e t W a A l e i t ' O S H a n l e -.NCPUsedBadSubFunctionLength, 3, station. 131, rcode); if ( ( (ncpl31 *)Request ι -vrpcCmdLine == NULL) { ccode = ERR_INVA ID_VOLUME; break; i ConvertToUpperCase! (BYTE *)St ( (ncpl31 *)Reques i ->rpcCmdLιne> ; ccode = MountVolume(St ( (ncρl31 *)Request*- rpcCmdLιne NULL, (LONC *)S,Answer!5*4] P if tccodei * ( (LONG *)5tAnswer[4] ) = ccode; /* return the reason */ ccode = ERR_UNABLE_TO MOUNT_VOLUME; else { AnswerLength += 4; break; if (NCPSubFunctionCheck (subFunctionLen, 21 + cmdLen + 1)) < NCPCompCheckFailed++ ; if (NCPCompCheckFlag) ( if (NCPCompWarningFlag) NCPHasBadSubFunctionLength.nwTargetStation = station; Ne WareAl er t ( OSHandle -NCPHasBadSubFunctionLength, 3, station, 131, rcode) ) Ou putToΞcreen (sys emConsoleScreen, " \n %s ' consolePrompt) SetlnputToOutputCurs^rPositiαn (systemConsoleScreen) ; RestoreScreenKeyboardOwner (systemConsoleScreen, originalSystemConsoleOwner) ; ι *RP->ReplyKeepNoFragments ) (Request , ERR_NCP_BOUNDARY_CHECK_FAILED) ; return; if (NCPCompWarningFlag) N e t W a r e A l e r t l O S H a n d 1 StNCPUsedBadSubFunctionLength, 3, station, 131, rcode } if ( ( (ncpl31 *)Request)->rpcCmdLine == NULL) ccode = ERR_BAD_FILE_NAME; break; ConvertToUpperCase! (BYTE *)_(lncpl3l *)Request)->rpcCmdLιne) ; ccode = UnloadModulelNUL , _t((ncpl31 *)Request) ->rpcCmάLιnei ; if (ccodei * ( (LONG *)StAnswer[4] 1 = ccode; /* return the reason */ break; if (NCPSubFunctionChec (subFunctionLen, 21 + cmdLen + 1)! ( NCPCompCheckFailed++; if (NCPCompCheckFlag) ( if (NCPCompWarningFlag) ( NCPHasBadSubFunctionLength.nwTargetStation = station; NetWareAlert ! OSHandle, StNCPHasBadSubFunctionLength, 3, station, 131, rcode); } Outpu ToScreen ( systemConsoleScreen , " \n%s " , consolePrompt) ,- SetlnputToOutputCursorPos it ion (systemConsoleScreen) ; RestoreScreenKeyboardOwner (systemConsoleScreen, originalSystemConsoleOwner) ; ( *RP->ReplyKeepNoFragments ) (Request, ERR_NCP_BOUNDARY_CHECK_FAILED) ; return; ) if (NCPCompWarningFlag i N e t W a r e A l e r t ' O S H a n d e . -NCPUsedBadSubFunctionLength, 3, station, 131, rcode); ) if ( I (ncpl31 *)Request ι ->rpcCmdLιne == NULL) I ccode = ERR_BAD_FILE_NAME; break; ) ConvertToUpperCas ( (BYTE *i_( ιncpl31 *) Reques ) -_>rpcCmdLine) ; rcode _ i ιncpl3) *) Reques i -;-rpcParms ( 0 ) _ LOAD_OPTIONS_VALID_BIT_MASK ; rcode I- LOAD_REQUIRED_FLAGS; ccode = Load odule (systemConsoleScreen, St ( (ncpl31 * ) Request i ---rpcCmdLine, rcode ι ; if (ccode) i •((LONG * ) StAnswer [ 4 ] i = ccode; /* return the reason * ) break; default: RestoreScreenKeyboardOwner(systemConsoleScreen, originalSystemConsoleOwner) ; Se InputToOutputCursorPosition(systemConsoleScreen) ; ErrCase(Request, RP) ; return; ) /* put back the owner of the screen */ OutputToScreen(systemConsoleScreen, "\n%s" , consolePrompt) ; SetlnputToOutputCursorPosition(systemConsoleScreen) ; RestoreScreenKeyboardOwner(systemConsoleScreen, originalSystemConsoleOwner) ; /* return RPC errors in the repy packet */ * ( (LONG *)StAnswer) = ccode; if (AnswerLength > 100) ( (*RP->ReplyDisgard) (Request, 0, 1, Answer, AnswerLength); ) else ( (*RP->ReplyKeep) (Reques , 0, 1, Answer, AnswerLength); As a result of implementing this procedure, developers who wish to develop client software with the ability to load, unload or otherwise configure their remote server applications may do so using a network client and server operating system supporting the calls. Although one embodiment of the invention has been illustrated and described, various modifications and changes may be made by those skilled in the art without departing from the spirit and scope of the invention.

Claims: Claims 1 In a computer netwoik that includes (a) a network client computer comprising a device having at least one processor for executing computer programs, a means to permit users of the device to provide input and receive output from the device, and a means of requesting and receiving netwoik services by means of digital packets, (b) at least one network server computer having a device with at least one processor for executing computei programs and a means of requesting and receiving network services by means of digital packets, and (c) a network operating system that uses a native communications protocol, a method of remotely managing each of the server computers from one of the client computers comprising a causing a network client application to interact with the client-based programs provided by the network operating system so that the network management calls of the the network client appliction are passed to the client-based piogtams provided by the netwoik operating system, b transmitting the netwoik management calls of the netwoik client application to the network server by means of a native communcations protocol, and c causing the network server directly to execute the network management calls as operating system calls 2 A method in a computer netwoik that includes (a) a network client computer configured to request and receive network services through the use of digital message packets comprising a first processor fo executing computer programs, and user input and output hardware, said client computei being characterized by a unique user access password having a first level of security associated therewith, (b) a network server computer configured to request and receive network services through the use of digital message packets, comprising a processoi for executing computer programs, a hard drive for storing a plurality of software modules, and a RAM, said server computer being characterized by an administratoi access password having a second level of security associated therewith, which second level of security is greatei than said first level of secuiity, ana (c) a server operating system, including _ native communications protocol, resident in said server computer, the method of remotely reconfiguring said server operating system from said client computer comprising the steps of entering said user access password into said user input hardware t th by establish a usei session at said client computer, transmitting a server operating system module ISOSM) from said client computer t said server computer storing said SOSM at a first address on said haid drive of said server computer transmitting from said server computer tι_ said client computei indicia of saiu first address, constructing by said client computer a first digital message packet comprising a first field indicative of a request tu load a software module and a second field indicative of said first address, transmitting said first packet from said client computer to said server computer processing said first and second fields by said server operating system, retrieving said SOSM from said first address on said hard drive loading said SOSM into said RAM to thereny dynamically reconfrgure said serve, operating system without using said administrator access passwoid and constructing a response messaαe, by said server computer , and transmitting saiα response message to said client computer aftei said loadinα step, said response message indicating that said SOSM is loaded into said RAM 3 The method of Claim 2, further comprising the step of loading a client application onto said client computer 4 The method of Claim 3, further comprising the step of running said client application on said client computer interactively with said SOSM 5. The method of Claim 4, further comprising the step of transmitting f a packets between said client computer and said server computer using said reconfigured server operating system. 6. The method of Claim 2, wherein said constructing step comprises building a message packet including an IPX header together with said first and second fields 7 The method of Claim 2, wherein said constructing step comprises the steps of retrieving a partially constructed digital message packet from a look-up table in said client computer; and manipulating said first and second fields in accordance with user requests received from said input hardware. 8 The method of Claim 2, wherein said SOSM comprises a NetWare Loadable Module 9 The method of Claim 2, wherein said first field comprises indicia of a predetermined remote procedure call. 10. The method of Claim 9, wherein said remote procedure call comprises one of RPC load and NLM; RPC unload and NLM, RPC mount a volume, RPC dismount a volume, RPC add name space to volume, RPC set command value, and RPC execute NCF file 11 The method of Claim 2, wherein said second field comprises indicia of a logical address 12 The method of Claim 2, wherein said second field comprises indicia of a filename 13 The method of Claim 2, wherein said constructing step further comprises adding a plurality of navigational fields to said first digital message packet in addition to said first and second fields, and wherein said processing step comprises stripping off said plurality of fields such that said server operating system processes only said first and second fields 14 The method of Claim 2, further comprising the steps of loading a client application onto said client computer and running said application, and accessing, by said application program, said SOSM during operation or saio application program

Inventors: NICOLET JIM, NICOLET, JIM
Applicants: NICOLET JIM, NOVELL INC, NICOLET, JIM, NOVELL, INC.
Application year: 1995
Main classification: G06F9
IPC codes: G06F9, G06F13, G06F15