| version 1.9, 2001/05/04 01:06:30 |
version 1.10, 2001/08/10 13:48:39 |
|
|
| /* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc.c,v 1.8 2000/12/03 07:29:39 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc.c,v 1.9 2001/05/04 01:06:30 takayama Exp $ */ |
| #include <stdio.h> |
#include <stdio.h> |
| #include <sys/types.h> |
#include <sys/types.h> |
| #include <sys/stat.h> |
#include <sys/stat.h> |
| Line 931 oxclientp oxCreateClient2(int fdstream,int portStream, |
|
| Line 931 oxclientp oxCreateClient2(int fdstream,int portStream, |
|
| |
|
| /* Authentication by password. */ |
/* Authentication by password. */ |
| m = strlen(pass); |
m = strlen(pass); |
| s = (char *)mymalloc(sizeof(char)*(m+1)); |
if (m > 0) { |
| read(fdControl,s,m+1); s[m] = '\0'; |
s = (char *)mymalloc(sizeof(char)*(m+1)); |
| if (strcmp(s,pass) != 0) { |
read(fdControl,s,m+1); s[m] = '\0'; |
| fprintf(stderr,"oxCreateClient2(): password authentication failed for control channel.\n"); |
if (strcmp(s,pass) != 0) { |
| close(fdControl); |
fprintf(stderr,"oxCreateClient2(): password authentication failed for control channel.\n"); |
| return(NULL); |
close(fdControl); |
| } |
return(NULL); |
| read(fdStream,s,m+1); s[m] = '\0'; |
} |
| if (strcmp(s,pass) != 0) { |
read(fdStream,s,m+1); s[m] = '\0'; |
| fprintf(stderr,"oxCreateClient2(): password authentication failed for data channel.\n"); |
if (strcmp(s,pass) != 0) { |
| close(fdStream); |
fprintf(stderr,"oxCreateClient2(): password authentication failed for data channel.\n"); |
| return(NULL); |
close(fdStream); |
| |
return(NULL); |
| |
} |
| } |
} |
| signal(SIGALRM,SIG_IGN); |
signal(SIGALRM,SIG_IGN); |
| |
|