version 1.34, 2019/06/28 13:35:04 |
version 1.35, 2020/10/18 11:32:02 |
|
|
pos = (off_t)uid * sizeof(ll); |
pos = (off_t)uid * sizeof(ll); |
r = lseek(fd, pos, SEEK_SET); |
r = lseek(fd, pos, SEEK_SET); |
if (r == -1) { |
if (r == -1) { |
error("%s: lseek: %s", __func__, strerror(errno)); |
error_f("lseek: %s", strerror(errno)); |
close(fd); |
close(fd); |
return (0); |
return (0); |
} |
} |
if (r != pos) { |
if (r != pos) { |
debug("%s: truncated lastlog", __func__); |
debug_f("truncated lastlog"); |
close(fd); |
close(fd); |
return (0); |
return (0); |
} |
} |
|
|
r = sshbuf_putf(loginmsg, "Last login: %s from %s\r\n", |
r = sshbuf_putf(loginmsg, "Last login: %s from %s\r\n", |
time_string, hostname); |
time_string, hostname); |
if (r != 0) |
if (r != 0) |
fatal("%s: buffer error: %s", __func__, ssh_err(r)); |
fatal_fr(r, "sshbuf_putf"); |
} |
} |
} |
} |
|
|