Whamcloud - gitweb
LU-17186 utils: replace gethostby*() with get*info() 32/52632/10
authorJian Yu <yujian@whamcloud.com>
Tue, 17 Oct 2023 18:06:39 +0000 (11:06 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Jan 2024 03:02:22 +0000 (03:02 +0000)
commitde82fd88a7e9300f9558f1d30fe1ed744be11aa2
treed7ff3cddbf9a91edaae51180da3bfbbf17a0466b
parente10bf68d7c3eb71a7e84986089c020aa4c9f98f7
LU-17186 utils: replace gethostby*() with get*info()

This patch replaces the deprecated gethostbyname() and
gethostbyaddr() functions with getaddrinfo() and getnameinfo()
functions respectively.

The getaddrinfo() function combines the functionality provided by the
gethostbyname() and getservbyname() functions into a single interface,
but unlike the latter functions, getaddrinfo() is reentrant and allows
programs to eliminate IPv4-versus-IPv6 dependencies.

The getnameinfo() function is the inverse of getaddrinfo(): it
converts a socket address to a corresponding host and service, in a
protocol-independent manner. It combines the functionality of
gethostbyaddr() and getservbyport(), but unlike those functions,
getnameinfo() is reentrant and allows programs to eliminate
IPv4-versus-IPv6 dependencies.

Test-Parameters: kerberos=true testlist=sanity-krb5
Test-Parameters: testgroup=review-dne-selinux-ssk-part-2
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iacb5583826cd2f7329455bc6cbb4477f9087f15a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52632
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/autoconf/lustre-libcfs.m4
libcfs/libcfs/util/nidstrings.c
lnet/autoconf/lustre-lnet.m4
lustre/autoconf/lustre-core.m4
lustre/utils/gss/lgss_krb5_utils.c
lustre/utils/gss/lsupport.c
lustre/utils/gss/lsupport.h
lustre/utils/nidlist.c
lustre/utils/portals.c