int
login_utmp_only(struct logininfo *li)
{
- li->type = LTYPE_LOGIN;
+ li->type = LTYPE_LOGIN;
login_set_current_time(li);
# ifdef USE_UTMP
utmp_write_entry(li);
static int
wtmpx_write(struct logininfo *li, struct utmpx *utx)
{
+#ifndef HAVE_UPDWTMPX
struct stat buf;
int fd, ret = 1;
(void)close(fd);
return ret;
+#else
+ updwtmpx(WTMPX_FILE, utx);
+ return 1;
+#endif
}
lastlog_populate_entry(li, &last);
return (1);
case -1:
- error("%s: Error reading from %s: %s", __func__,
+ error("%s: Error reading from %s: %s", __func__,
LASTLOG_FILE, strerror(errno));
return (0);
default: