res=cnv_getb64(line);
(void) snprintf(answer,sizeof(answer),"%s",res);
res=rou_freestr(res);
- (void) rou_alert(0,"%s JMPDBG challenge answer=<%s>",OPEP,answer);
line=rou_freestr(line);
}
if (strlen(answer)==0)
ptr++;
(void) strncpy(name,answer,sizeof(name));
(void) memmove(answer,ptr,strlen(ptr)+1);
- (void) rou_alert(0,"%s JMPDBG user name=<%s> answer=<%s>",
- OPEP,name,answer);
}
if (strlen(name)==0)
phase=999; //no need to go further
(void) rou_alert(0,"%s passwd=<%s>",OPEP,passwd);
local=cnv_hashmd5(passwd,(unsigned char *)challenge);
hexa=cnv_tohexa(local);
- (void) rou_alert(0,"%s anwr=<%s>",OPEP,answer);
- (void) rou_alert(0,"%s hexa=<%s>",OPEP,hexa);
- if (strcmp(hexa,answer)==0) {
+ //(void) rou_alert(0,"%s anwr=<%s>",OPEP,answer);
+ //(void) rou_alert(0,"%s hexa=<%s>",OPEP,hexa);
+ if (strcmp(hexa,answer)==0)
(void) rou_asprintf(&decoded,"%s%s%s%s",
IOBNULL,name,IOBNULL,passwd);
- (void) rou_alert(0,"JMPDBG decoded=<%s>",decoded);
- }
hexa=rou_freestr(hexa);
local=rou_freestr(local);
}
usr=(USRTYP *)0;
if (sql_mngusr(sqlptr,sql_select,data[1],&usr)==true) {
char *crypted;
-
- crypted=crypt(data[2],usr->passwd);
+
+ crypted=usr->passwd;
+ if (usr->passwd[0]=='$')
+ crypted=crypt(data[2],usr->passwd);
if ((crypted!=(char *)0)&&(strcmp(crypted,usr->passwd)==0))
isok=true; //Passord match
usr=sql_freeusr(usr);
break;
case 5 : //we have a decoded sequence, check password
isok=checklogin(contact->sqlptr,decoded);
+ (void) rou_alert(0,"%s checklogin='%d'",OPEP,isok);
break;
case 6 : //we have login status
if (strlen(decoded)>0) { //always