Skip to content

Commit cf3ed3e

Browse files
committed
log unsuccessful login attempts even when user doesn't exist
1 parent 7549ba6 commit cf3ed3e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/v-check-user-password.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ int main (int argc, char** argv) {
7878
}
7979
} else {
8080
printf("Error: no such user\n",argv[1]);
81+
strcat(str, argv[1]);
82+
strcat(str, " ");
83+
strcat(str, ip);
84+
strcat(str, " failed to login \n");
85+
fputs (str,pFile); /* write */
86+
fclose (pFile); /* close */
8187
exit(3);
8288
};
8389

0 commit comments

Comments
 (0)