summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
authorHibby <d@vehibberd.com>2020-03-24 20:55:41 +0000
committerHibby <d@vehibberd.com>2020-03-24 20:55:41 +0000
commit93a75b098cfd7eef8dc24f9eb98c278b726cba59 (patch)
treeeef66061d0d1d92b5088244ab078e015ea4509a2 /system.c
parente194582206323fee5cbdf62b1c0dca13499fafb1 (diff)
parentef4822cca2ffcc86c9d5da3a11033e33480df50e (diff)
Update upstream source from tag 'upstream/2.11'
Update to upstream version '2.11' with Debian dir a307fbe04ee061f870829d2e65cdb55a78ae0550
Diffstat (limited to 'system.c')
-rw-r--r--system.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/system.c b/system.c
index f1079d5..0b20ed0 100644
--- a/system.c
+++ b/system.c
@@ -458,6 +458,7 @@ void lastlog(void)
int UserId=0;
char tty[LAST_DATA_SIZE];
char hostname[LAST_DATA_SIZE];
+ char hostname6[LAST_DATA_SIZE];
char usercall[10];
char *cp;
int escape;
@@ -494,7 +495,13 @@ void lastlog(void)
}
break;
#endif
- case AF_INET: strcpy(hostname, User.ul_name);
+ case AF_INET: strcpy(hostname, User.call);
+ strcat(hostname, " from ip ");
+ strcat(hostname, User.ul_name);
+ break;
+ case AF_INET6: strcpy(hostname6, User.ul_name);
+ strcat(hostname, User.call);
+ strcat(hostname, " on IPv6");
break;
case AF_UNSPEC: strcpy(hostname, User.call);
strcat(hostname, " on local");