comparing against buf and not hostname; openbsd tree has this
problem also.
diff --git a/session.c b/session.c
index e968e41..a12e2a0 100644
--- a/session.c
+++ b/session.c
@@ -749,7 +749,7 @@
 		time_string = ctime(&last_login_time);
 		if (strchr(time_string, '\n'))
 			*strchr(time_string, '\n') = 0;
-		if (strcmp(buf, "") == 0)
+		if (strcmp(hostname, "") == 0)
 			printf("Last login: %s\r\n", time_string);
 		else
 			printf("Last login: %s from %s\r\n", time_string, hostname);