HomeFreeBSD

libcasper: fix limitations in dns service

Description

libcasper: fix limitations in dns service

The getaddrinfo(3) and gethostbyname(3) are used to return the address for a
given hostname. The getnameinfo(3) and gethostbyaddr(3) are used to return
hostname for a given address. Right now in casper, we have two limitations:

  • NAME which allows resolving DNS names.
  • ADDR which allows to do revert DNS lookups.

Before this change the rights was mixed up:
NAME - getnameinfo(3) and gethostbyname(3)
ADDR - gethostbyaddr(3) and getaddrinfo(3)

Which no matters on limitation allowed us to resolve DNS names and do DNS
lookups basically by using a different set of functions.

Now the NAME type allows getaddrinfo(3) and gethostbyname (3)functions,
and the ADDR names allow to use gethostbyaddr(3) and getnameinfo(3) functions.

Reviewed by: pjd, bcr
MFC after: 3 weeks
Discussed with: hrs
Differential Revision: https://reviews.freebsd.org/D16930

Details

Committed
oshogboNov 4 2018, 7:38 PM
Reviewer
pjd
Differential Revision
D16930: Fix casper limitations
Parents
rS340140: libcasper: Update example in man page to use cap_getnameinfo function.
Branches
Unknown
Tags
Unknown