diff --git a/conman.c b/conman.c index c7661443..d3dbe7d7 100644 --- a/conman.c +++ b/conman.c @@ -1864,6 +1864,15 @@ static void writeToLogFiles(SConnection *self, char *buffer) } else { + /* response for monit check */ + if (strstr(pPtr,"How are you") == pPtr) + { + SCWrite(self,"I am fine",eError); + NetReadRemove(pServ->pReader,self->pSock); + self->iEnd = 1; + free(pPtr); + return 1; + } /* check for username and password */ pUser = strtok(pPtr," \t"); pPassword = strtok(NULL," \t\r\n"); @@ -1886,7 +1895,7 @@ static void writeToLogFiles(SConnection *self, char *buffer) { SCWrite(self,"ERROR: Bad login",eError); printf("Bad login string %s\n", pPtr); - } + } } free(pPtr); }