Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
void check_password(char \*user, char \*password) {
  if (strcmpy(password(user), password) \!= 0) {
    char \*msg = malloc(strlen(user) + 100);
    sprintf (msg, "Wrong password for user %s", user);
    syslog(LOG_INFO, msg);
    free(msg);
  }
}

...

Code Block
void check_password(char \*user, char \*password) {
  if (strcmpy(password(user), password) \!= 0) {
    fprintf (stderr, "Wrong password for user %s", user);
  }
}

...

Code Block
void check_password(char \*user, char \*password) {
  if (strcmpy(password(user), password) \!= 0) {
    char \*msg = malloc(strlen(user) + 100);
    sprintf (msg, "Wrong password for user %s", user);
    fprintf (stderr, "%s", user);
    syslog(LOG_INFO, "%s", msg);
    free(msg);
  }
}