[BACK]Return to oxmain.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kxx

Diff for /OpenXM/src/kxx/oxmain.c between version 1.17 and 1.18

version 1.17, 2004/03/03 02:31:50 version 1.18, 2004/09/17 07:27:28
Line 1 
Line 1 
 /*  $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.16 2004/02/25 23:14:36 takayama Exp $  */  /*  $OpenXM: OpenXM/src/kxx/oxmain.c,v 1.17 2004/03/03 02:31:50 takayama Exp $  */
 /* nullserver01 */  /* nullserver01 */
 #include <stdio.h>  #include <stdio.h>
 #include <fcntl.h>  #include <fcntl.h>
Line 55  main(int argc, char *argv[]) {
Line 55  main(int argc, char *argv[]) {
   extern int OpenedSocket;    extern int OpenedSocket;
   char portfile[1024];    char portfile[1024];
   char *pass = NULL;    char *pass = NULL;
     char *passControl = NULL;
     char *passData = NULL;
   int result;    int result;
   int sleepingTime = 0;    int sleepingTime = 0;
   extern int OxTerminateMode;    extern int OxTerminateMode;
Line 101  main(int argc, char *argv[]) {
Line 103  main(int argc, char *argv[]) {
       if (i<argc) {        if (i<argc) {
         pass = argv[i];          pass = argv[i];
       }        }
       }else if (strcmp(argv[i],"-passData") == 0) {
         i++;
         if (i<argc) {
           passData = argv[i];
         }
       }else if (strcmp(argv[i],"-passControl") == 0) {
         i++;
         if (i<argc) {
           passControl = argv[i];
         }
     }else if (strcmp(argv[i],"-wait") == 0) {      }else if (strcmp(argv[i],"-wait") == 0) {
       i++;        i++;
       if (i<argc) {        if (i<argc) {
Line 127  main(int argc, char *argv[]) {
Line 139  main(int argc, char *argv[]) {
     fprintf(stderr,"\nTrying to connect\n");      fprintf(stderr,"\nTrying to connect\n");
   }    }
   
     if ((pass != NULL) && (passData == NULL)) {
           passData = pass;
     }
     if ((pass != NULL) && (passControl == NULL)) {
       passControl = pass;
     }
   
   if (reverse) {    if (reverse) {
     /* The order is very important. */      /* The order is very important. */
     fdControl = socketConnectWithPass(sname,portControl,pass);      fdControl = socketConnectWithPass(sname,portControl,passControl);
     fdStream = socketConnectWithPass(sname,portStream,pass);      fdStream = socketConnectWithPass(sname,portStream,passData);
   
     fprintf(stderr,"Connected: control = %d, data = %d.\n",fdControl,fdStream);      fprintf(stderr,"Connected: control = %d, data = %d.\n",fdControl,fdStream);
     result = 0;      result = 0;
Line 224  static void errorToStartEngine(void) {
Line 243  static void errorToStartEngine(void) {
 oxmainUsage() {  oxmainUsage() {
   fprintf(stderr,"Usage: \n");    fprintf(stderr,"Usage: \n");
   fprintf(stderr,"  ox [-ox serverprogram -host name -data portnum -control portnum -monitor]\n");    fprintf(stderr,"  ox [-ox serverprogram -host name -data portnum -control portnum -monitor]\n");
   fprintf(stderr," [-insecure -portfile fname -reverse -pass xxxyyyzzz]");    fprintf(stderr," [-insecure -portfile fname -reverse -passControl xxxyyyzzz -passData pppqqqrrr]");
   fprintf(stderr," [-finish]");    fprintf(stderr," [-finish]");
   fprintf(stderr,"\n");    fprintf(stderr,"\n");
   fprintf(stderr,"-reverse: ox server connects to the client.\n");    fprintf(stderr,"-reverse: ox server connects to the client.\n");
   fprintf(stderr,"          The client must give a one time password to ox server to connect to the client with -pass option.\n");    fprintf(stderr,"          The client must give a one time password to ox server to connect to the client with -pass* option.\n");
   fprintf(stderr,"          The one time password can be seen by ps command, so you must not use this one time password system on an untrustful host.\n");    fprintf(stderr,"          The one time password can be seen by ps command, so you must not use this one time password system on an untrustful host.\n");
   fprintf(stderr,"          The one time password should be sent by a safe communication line like ssh and the ox server should be started by ssh. Do not use rsh\n");    fprintf(stderr,"          The one time password should be sent by a safe communication line like ssh and the ox server should be started by ssh. Do not use rsh\n");
     fprintf(stderr,"          (The option -pass is obsolete.)\n");
   fprintf(stderr,"          If -reverse is not given, the client connect to the ox server\n");    fprintf(stderr,"          If -reverse is not given, the client connect to the ox server\n");
   fprintf(stderr,"          See OpenXM/src/SSkan/Doc/ox.sm1, /sm1connectr\n");    fprintf(stderr,"          See OpenXM/src/SSkan/Doc/ox.sm1, /sm1connectr\n");
   fprintf(stderr,"-insecure : \n");    fprintf(stderr,"-insecure : \n");

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>