fd = open (FAILLOG_FILE, O_RDWR);
if (fd < 0) {
SYSLOG ((LOG_WARN,
- "Can't write faillog entry for UID %lu in %s.",
+ "Can't write faillog entry for UID %lu in %s: %m",
(unsigned long) uid, FAILLOG_FILE));
return;
}
|| (write_full(fd, fl, sizeof *fl) == -1)
|| (close (fd) != 0)) {
SYSLOG ((LOG_WARN,
- "Can't write faillog entry for UID %lu in %s.",
+ "Can't write faillog entry for UID %lu in %s: %m",
(unsigned long) uid, FAILLOG_FILE));
(void) close (fd);
}
fd = open (FAILLOG_FILE, failed?O_RDONLY:O_RDWR);
if (fd < 0) {
SYSLOG ((LOG_WARN,
- "Can't open the faillog file (%s) to check UID %lu. "
+ "Can't open the faillog file (%s) to check UID %lu: %m; "
"User access authorized.",
FAILLOG_FILE, (unsigned long) uid));
return 1;
|| (write_full(fd, &fail, sizeof fail) == -1)
|| (close (fd) != 0)) {
SYSLOG ((LOG_WARN,
- "Can't reset faillog entry for UID %lu in %s.",
+ "Can't reset faillog entry for UID %lu in %s: %m",
(unsigned long) uid, FAILLOG_FILE));
(void) close (fd);
}
if ( (write_full(fd, failent, sizeof *failent) == -1)
|| (close (fd) != 0)) {
SYSLOG ((LOG_WARN,
- "Can't append failure of user %s to %s.",
+ "Can't append failure of user %s to %s: %m",
username, ftmp));
(void) close (fd);
}