David Cantrell wrote:
Someone tried it in F-10 and reported that it didn't work. The
startTelnetd() function in telnetd.c needed some changes.
[rawhide]
---
loader/telnetd.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
Looks good to me.
Regards,
Hans
diff --git a/loader/telnetd.c b/loader/telnetd.c
index 99c6feb..17935bf 100644
--- a/loader/telnetd.c
+++ b/loader/telnetd.c
@@ -230,7 +230,7 @@ int beTelnet(void) {
}
void startTelnetd(struct loaderData_s * loaderData) {
- char ret[INET_ADDRSTRLEN+1];
+ char *ipaddr = NULL;
iface_t iface;
iface_init_iface_t(&iface);
@@ -240,12 +240,16 @@ void startTelnetd(struct loaderData_s * loaderData) {
return;
}
- if (iface.ipaddr.s_addr) {
- inet_ntop(AF_INET, &iface.ipaddr, ret, INET_ADDRSTRLEN);
- logMessage(INFO, "going to beTelnet for %s", ret);
- if (!beTelnet())
- flags |= LOADER_FLAGS_TEXT | LOADER_FLAGS_NOSHELL;
+ ipaddr = iface_ip2str(iface.device, AF_INET);
+ if (ipaddr == NULL) {
+ logMessage(ERROR, "%s (%d): no IP address found for %s",
+ __func__, __LINE__, iface.device);
+ return;
}
+ logMessage(INFO, "going to beTelnet for %s", ipaddr);
+ if (!beTelnet())
+ flags |= LOADER_FLAGS_TEXT | LOADER_FLAGS_NOSHELL;
+
return;
}
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list