Explorar el Código

log unsuccessful login attempts even when user doesn't exist

Serghey Rodin hace 11 años
padre
commit
cf3ed3e9f5
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      src/v-check-user-password.c

+ 6 - 0
src/v-check-user-password.c

@@ -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);
     };