RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1956479 - [RFE] remove usage of gethostbyname/inet_ntoa
Summary: [RFE] remove usage of gethostbyname/inet_ntoa
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: krb5
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Julien Rische
QA Contact: Filip Dvorak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 18:40 UTC by Robbie Harwood
Modified: 2023-05-03 07:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 07:28:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7367 0 None None None 2021-11-25 11:38:47 UTC

Description Robbie Harwood 2021-05-03 18:40:25 UTC
Various less important parts of the codebase use gethostbyname() and inet_ntoa().  These should be modernized and the rpminspect test re-enabled.

Comment 7 RHEL Program Management 2022-11-03 07:27:45 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 8 Julien Rische 2022-11-03 08:49:19 UTC
Reopening. There are still gethostbyname() and inet_ntoa() calls to remove.

Comment 13 Julien Rische 2023-04-03 12:00:55 UTC
Here are all the occurrences of gethostbyname and inet_ntoa on the krb5 master branch (stripped from all the comment mentions):

$ grep -ERIn '(gethostbyname[^_]|inet_ntoa)' --include '*.c' --include '*.h'
src/windows/leashdll/timesync.c:229:    if ((host = gethostbyname(hostname)) == NULL)
src/appl/gss-sample/gss-client.c:127:    if ((hp = gethostbyname(host)) == NULL) {
src/appl/simple/server/sim_server.c:227:    printf("&c_sock.sin_addr is %s\n", inet_ntoa(c_sock.sin_addr));
src/appl/simple/client/sim_client.c:143:    if ((host = gethostbyname(hostname)) == (struct hostent *) 0) {
src/appl/simple/client/sim_client.c:153:    printf("s_sock.sin_addr is %s\n", inet_ntoa(s_sock.sin_addr));
src/appl/simple/client/sim_client.c:182:    if ((host = gethostbyname(my_hostname)) == (struct hostent *)0) {
src/appl/user_user/client.c:76:    if ((host = gethostbyname (argv[1])) == NULL) {
src/appl/user_user/client.c:122:                 hname, inet_ntoa(serv_net_addr.sin_addr));
src/util/support/fake-addrinfo.c:178:    { TMP = gethostbyname (NAME); (ERR) = h_errno; (HP) = TMP; }
src/util/support/fake-addrinfo.c:956:            p = inet_ntoa (sinp->sin_addr);
src/tests/gss-threads/gss-client.c:106:    hp = gethostbyname(host);
src/tests/misc/test_getsockname.c:69:    if ((host = gethostbyname(hostname)) == (struct hostent *) 0) {
src/tests/misc/test_getsockname.c:79:    printf("s_sock.sin_addr is %s\n", inet_ntoa(s_sock.sin_addr));
src/tests/misc/test_getsockname.c:114:    printf("My interface address is: %s\n", inet_ntoa(c_sock.sin_addr));
src/lib/krb5/os/localaddr.c:1480:        hostrec = gethostbyname (host);
src/lib/krb5/os/t_std_conf.c:101:            printf(" inet:%s/%d", inet_ntoa(s_sin->sin_addr),
src/lib/rpc/clnt_generic.c:65:  h = gethostbyname(hostname);
src/lib/rpc/getrpcport.c:53:    if ((hp = gethostbyname(host)) == NULL)
src/lib/rpc/clnt_simple.c:103:          if ((hp = gethostbyname(host)) == NULL)
src/lib/rpc/unit-test/client.c:127:     h = gethostbyname(host);
src/lib/rpc/unit-test/server.c:178:         inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr),
src/lib/rpc/unit-test/server.c:211:     a = inet_ntoa(addr->sin_addr);
src/lib/rpc/unit-test/server.c:224:     a = inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr);

Comment 15 RHEL Program Management 2023-05-03 07:28:33 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.