Nm -> Fn getnameinfo; grammar improvements; markup improvement;
all from jmc@openbsd, thanks.
This commit is contained in:
parent
8fcc4625a4
commit
a24c4806d6
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getnameinfo.3,v 1.28 2003/08/28 09:39:11 wiz Exp $
|
||||
.\" $NetBSD: getnameinfo.3,v 1.29 2003/08/28 12:03:08 wiz Exp $
|
||||
.\" $KAME: getnameinfo.3,v 1.27 2003/04/30 06:06:42 itojun Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1987, 1991, 1993
|
||||
@ -289,7 +289,7 @@ and documented in
|
||||
The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
|
||||
.\"
|
||||
.Sh CAVEATS
|
||||
.Nm
|
||||
.Fn getnameinfo
|
||||
returns both numeric and FQDN notation of the address specified in
|
||||
.Fa sa .
|
||||
There is no return value that indicates if the string returned in
|
||||
@ -297,14 +297,14 @@ There is no return value that indicates if the string returned in
|
||||
is a result of binary to numeric-text translation (like
|
||||
.Xr inet_ntop 3 ) ,
|
||||
or the result of DNS reverse lookup.
|
||||
Therefore, malicious parties could set up PTR record like below:
|
||||
Therefore, malicious parties could set up a PTR record like below:
|
||||
.Bd -literal -offset indent
|
||||
1.0.0.127.in-addr.arpa. IN PTR 10.1.1.1
|
||||
.Ed
|
||||
.Pp
|
||||
and trick the caller of
|
||||
.Nm
|
||||
to believe that
|
||||
.Fn getnameinfo
|
||||
into believing that
|
||||
.Fa sa
|
||||
is
|
||||
.Li 10.1.1.1
|
||||
@ -312,10 +312,10 @@ when it actually is
|
||||
.Li 127.0.0.1 .
|
||||
.Pp
|
||||
To prevent such attacks, the use of
|
||||
.Li NI_NAMEREQD
|
||||
like below is recommended when you use the result of
|
||||
.Nm
|
||||
for access control purposes.
|
||||
.Dv NI_NAMEREQD
|
||||
is recommended when you use the result of
|
||||
.Fn getnameinfo
|
||||
for access control purposes:
|
||||
.Bd -literal -offset indent
|
||||
struct sockaddr *sa;
|
||||
socklen_t salen;
|
||||
|
Loading…
Reference in New Issue
Block a user