log unsuccessful login attempts even when user doesn't exist

This commit is contained in:
Serghey Rodin 2014-10-06 21:41:13 +03:00
commit cf3ed3e9f5

View file

@ -78,6 +78,12 @@ int main (int argc, char** argv) {
}
} else {
printf("Error: no such user\n",argv[1]);
strcat(str, argv[1]);
strcat(str, " ");
strcat(str, ip);
strcat(str, " failed to login \n");
fputs (str,pFile); /* write */
fclose (pFile); /* close */
exit(3);
};