Code question (canohost.c)

Ben Lindstrom mouring at etoh.eviladmin.org
Fri Apr 30 11:45:10 EST 2004




On Thu, 29 Apr 2004, John Devitofranceschi wrote:

>
> So, I looked at some older versions of the code and found that, indeed, a
> NULL was sent as the second parameter in previous releases.
>

The code never existed before this patch was added.

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/canohost.c.diff?r1=1.36&r2=1.37

> So, why the change? What does "0" buy you (besides a useless and costly call
> to getservbyname()) that NULL does not?
>
+	/*
+	 * if reverse lookup result looks like a numeric hostname,
+	 * someone is trying to trick us by PTR record like following:
+	 *	1.1.1.10.in-addr.arpa.	IN PTR	2.3.4.5
+	 */

Does that not answer your question?

- Ben





More information about the openssh-unix-dev mailing list