summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
authortony mancill <tmancill@debian.org>2021-01-10 13:12:57 -0800
committertony mancill <tmancill@debian.org>2021-01-10 13:12:57 -0800
commit27ce6520b91cb43772eb50bed02ea770bec7714e (patch)
tree2ea48c1f0be93688eca3b2e8cd1b13c4b1c5ae26 /system.c
parentd2b74b1d3f315da06d99a39eb282176c5b0ae8b3 (diff)
New upstream version 2.12
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..2e69ef4 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, " on IPv4 ");
+ 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");