HostProcControl is a CORBA service, which provides API for remote managing of an operating system. Using HostProcControl, you can create CORBA-objects able to do:
You can use HostProcControl with several ORB realizations such as TAO, omniORB, and ORBacus for UNIX and with ORBacus only for Windows NT.
http://www.gradsoft.com.ua/. The current release number of the project is HostProcControl-1.0.
Supplied package consist of next of principle components:
Installed software consist of:
|UNIX||libHostControl.a||stub, skeleton, servants|
|Windows NT||HostControl.lib||stub, skeleton, servants|
Next UFO :-) component are created automatically when server is installed as Windows NT service: the file hpcservice.ini in Windows directory. This file is used for unattended startup of HostControlServer.exe.
<project_root>\configdirectory and edit file
env_inc.nt.mak. You have to set follow nmake values:
|INSTALL_DIR||Directory of installation|
|ORB_DIR||ORB root directory|
|MSVC_DIR||Microsoft Visual Studio root directory|
|GEN_DIR||GradC++ToolBox root directory|
<project_root>and its subdirectories, go to
<project_root>and type "
We provide 6 test
/pattern applications disposed in 6 subdirectories 1,2,..,6
<project_root>/test catalogue and named step1,step6,..,step6 correspondingly.
Each application's description is placed to the same sub-directory and named readme<n>.txt,
where n is number of the test application.
/pattern applications - move out to the
<project_root>/testcatalogue and call command
<project_root>/srccatalogue and run HostControlServer with following options:
--userlist <project_root>/test/HostControlUserlist.ini -OAport 16001
(these options meaning is described in chapter Usage 4 of the present manual);
<project_root>/testand use "
A next outline of access permissions control is used:
John:Johnson nsh:gsh anoter name : another password
and exact description of the strings is that:
Here <first> and <second> are substrings not framed by space characters; whole string is no lengthy than 255 characters; and the <first> substring does not contain ':' character.
Pair <first> and <second> of a single string is considered as some "client ID" where <first> is "user name" and <second> - "password".
To obtain access to the server functionality, client application must transmit to server its own "client ID" which is checked then in user list. Access to server is permitted if ID correspondent is found, and is not permitted otherwise.
You must define a set of options (see Service options key below 4.2.2) and pass them to the programm by means of either a command line or a configuration file.
--config <filename>to point service options are not in command line (they must be present in the file instead);
--helpto print of help message instead of service start.
where <filename> is name of it.
C:\WINNTis frequently occurring), and catalogue
/etcfor UNIX. To change this settings it is necessary to save new path to configuration file in system variables
The name of user list must be NESCESSARILY defined when server starts (the name undefined or the file is not exist leads to starting break). To fix the name, the option
is provided. If the name spesified is NOT full name, it is supposed to be relative to the same "base" catalogue as the configuration file.
Publication of HostProcControl initial object reference is realized by means of module ServiceOptions derivable from package GradC++ToolBox. ServiceOptions provides facilities to use corbaloc style IOR to initial object and allows to publish IOR via next ways at user's option:
--with-namingoption used, then initial object of service is reflected in NamingService;
--ior-stdoutoption used, then IOR is transformed to srting and printed on standard output;
--ior-file-HostControlService <filename>option used, then IOR is transformed to srting and placed into file <filename>.
In order to client be able to use corbaloc IOR later, you must set at least one ORB parametr when server starts: you must fix the port to communications via common ORB option such as
-ORBconfig <filename>. For example, it is possible to use:
./HostControlServer --userlist HostControlUserlist.ini -ORBconfig orb.cfwhere orb.cf proide following settings:
There are two ways to run HostControlServer for Windows NT:
HostControlServer.exewith some options described. To install program in capacity of Windows NT service (and run it) dedicated application NtInstaller.exe may be used. The usage of
NtInstaller.exe( pop-up dialog box will be reflected )
Suppose the operation system is Windows NT and server must be started as a console application. The model start procedure is that:
<base>\HostControlConfig.iniconfiguration file with following contents (see http://www.gradsoft.kiev.ua/eng/Products/ToolBox/ProgOptions/ProgGuide/ProgrammingGuide_eng.html for more details):
@"ProgOptions config file" // [first string] This stuff must create the file # This is HostProcControl configuration file to use by executable: HostControlServer.exe /* in the fist significant word's capacity the name of program must be used */ # users list: --userlist HostControlUserlist.ini /* the name of user list relative to the base */ # options for ORB: -OAport 16001 /* ORB option spelling is the same as option spelling in the command line */: this is EXAMPLE, but it may be copied and used directly.
|1||error of StartServiceCtrlDispatcher||for Windows NT only: error of starting NT service||program termination|
|2||error of parsing of <filename>||erroneous format of configuration file specified||program termination|
|3||filename necessary is NULL||argument of either "
|4||file to read <filename> does not exist||full name of either configuration file or user list is erroneous||program termination|
|5||file to read <filename> does not exist in base directory <directory_name>||either configuration file or user list isn't found in base catalogue||program termination|
|6||CORBA System Exception||erroneour options of ORB||program termination|
|7||error while orb destroing||error of ORB destroing, be able when program terminating||no result to you|
|8||Server has been activated||normal start||starting server|
Client applications must be linked with next HostProcControl libraries:
Keep in mind options of server has been started!
Note, that running HostProcControl allows client applications to get full access to server operation system.
So, to minimize security risks, please, follow next rules:
C:\WinNT) and remove it if it's exist.
HPC_CONFIGif it is used;