]> andersk Git - openssh.git/blobdiff - loginrec.c
- (tim) [contrib/cygwin/README] add minires-devel requirement. Patch from
[openssh.git] / loginrec.c
index 8a7092b29d33ef63b38645f18467a6d96e05e540..897921c633d5c00e45a764a427189cffde8ac913 100644 (file)
@@ -442,7 +442,7 @@ login_write (struct logininfo *li)
 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);
@@ -1183,6 +1183,7 @@ wtmp_get_entry(struct logininfo *li)
 static int
 wtmpx_write(struct logininfo *li, struct utmpx *utx)
 {
+#ifndef HAVE_UPDWTMPX
        struct stat buf;
        int fd, ret = 1;
 
@@ -1202,6 +1203,10 @@ wtmpx_write(struct logininfo *li, struct utmpx *utx)
        (void)close(fd);
 
        return ret;
+#else
+       updwtmpx(WTMPX_FILE, utx);
+       return 1;
+#endif
 }
 
 
@@ -1349,7 +1354,7 @@ static int
 syslogin_perform_logout(struct logininfo *li)
 {
 # ifdef HAVE_LOGOUT
-       char line[8];
+       char line[UT_LINESIZE];
 
        (void)line_stripname(line, li->line, sizeof(line));
 
@@ -1534,7 +1539,7 @@ lastlog_get_entry(struct logininfo *li)
                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:
This page took 0.037658 seconds and 4 git commands to generate.