forked from lf-edge/eve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christoph Ostarek <christoph@zededa.com> (cherry picked from commit 9253ceb)
- Loading branch information
1 parent
56b2d60
commit 6a0ccfe
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From: Christoph Ostarek <christoph@zededa.com> | ||
Date: Tue, 2 Jul 2024 12:53:13 +0000 | ||
Subject: [PATCH] fix ipv6 utmpx | ||
|
||
see also https://git.alpinelinux.org/aports/tree/main/openssh/fix-utmp.patch | ||
--- | ||
loginrec.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/loginrec.c b/loginrec.c | ||
index 4f21499..9d45670 100644 | ||
--- a/loginrec.c | ||
+++ b/loginrec.c | ||
@@ -741,7 +741,7 @@ set_utmpx_time(struct logininfo *li, struct utmpx *utx) | ||
void | ||
construct_utmpx(struct logininfo *li, struct utmpx *utx) | ||
{ | ||
-# ifdef HAVE_ADDR_V6_IN_UTMP | ||
+# ifdef HAVE_ADDR_V6_IN_UTMPX | ||
struct sockaddr_in6 *sa6; | ||
# endif | ||
memset(utx, '\0', sizeof(*utx)); | ||
@@ -787,7 +787,7 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx) | ||
if (li->hostaddr.sa.sa_family == AF_INET) | ||
utx->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr; | ||
# endif | ||
-# ifdef HAVE_ADDR_V6_IN_UTMP | ||
+# ifdef HAVE_ADDR_V6_IN_UTMPX | ||
/* this is just a 128-bit IPv6 address */ | ||
if (li->hostaddr.sa.sa_family == AF_INET6) { | ||
sa6 = ((struct sockaddr_in6 *)&li->hostaddr.sa); | ||
-- | ||
2.36.2 |