From nobody@FreeBSD.org  Fri Jan 27 09:42:04 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 23D4116A420
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Jan 2006 09:42:04 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E739A43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Jan 2006 09:42:03 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0R9g3pl094859
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Jan 2006 09:42:03 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0R9g3Rw094856;
	Fri, 27 Jan 2006 09:42:03 GMT
	(envelope-from nobody)
Message-Id: <200601270942.k0R9g3Rw094856@www.freebsd.org>
Date: Fri, 27 Jan 2006 09:42:03 GMT
From: Akihiro KAYAMA <kayama@personal-media.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] net/vnc Xvnc server doesn't run with XDMCP options
X-Send-Pr-Version: www-2.3

>Number:         92414
>Category:       ports
>Synopsis:       [patch] net/vnc Xvnc server doesn't run with XDMCP options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 27 09:50:01 GMT 2006
>Closed-Date:    Thu May 18 16:12:58 GMT 2006
>Last-Modified:  Thu May 18 16:12:58 GMT 2006
>Originator:     Akihiro KAYAMA
>Release:        FreeBSD 6.0-RELEASE-p2
>Organization:
PERSONAL-MEDIA Corp.
>Environment:
FreeBSD net2.personal-media.co.jp 6.0-RELEASE-p2 FreeBSD 6.0-RELEASE-p2 #0: Thu Jan 19 19:45:59 JST 2006     kayama@pc137.personal-media.co.jp:/usr/obj/home/src/sys/GENERIC  i386
vnc-4.1.1
xorg-clients-6.8.2
xorg-server-6.9.0

>Description:
Xvnc, which is modified X server to draw desktop remotely with vnc
protocol, can be managed with X Display Manager via XDMCP when
combined with option -query. 

But FreeBSD port version of Xvnc seemed to fail to create a session
with xdm, due to xdm error "Decline No valid address".

>How-To-Repeat:
execute xdm:
% /usr/X11R6/bin/xdm -debug 1

execute Xvnc server:
% /usr/local/bin/Xvnc :59 -query localhost -once  securitytypes=none Log='*:stderr:9'

Xvnc fails to start and outputs following error messages:
Fatal server error:
XDMCP fatal error: Session declined No valid address

>Fix:
This is because of an uninitialized variable bug of XFree 4.3.0 source
tree which current vnc port use. Simply apply the following patch, or
perhaps it is better choice to use fixed X source tree like X.org
6.9.0.

--- xc/programs/Xserver/os/access.c.orig	Fri Jan 27 16:23:17 2006
+++ xc/programs/Xserver/os/access.c	Fri Jan 27 16:22:32 2006
@@ -730,6 +730,7 @@
 	if (ifr->ifa_addr.sa_family == AF_DECnet) 
 	    continue;
 #endif /* DNETCONN */
+	len = sizeof(*(ifr->ifa_addr));
 	family = ConvertAddr(ifr->ifa_addr, &len, (pointer *)&addr);
 	if (family == -1 || family == FamilyLocal) 
 	    continue;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Jan 27 09:56:41 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92414 

From: Joerg Wunsch <j@uriah.heep.sax.de>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: ports/92414 [patch] net/vnc Xvnc server doesn't run with XDMCP options
Date: Thu, 18 May 2006 09:39:30 +0200

 I've got the same problem, and found the patch submitted in the PR in
 a mailing list entry (on the RealVNC list) via Google.  Tried it, and
 it solved my problem as well.
 
 Environment: FreeBSD 6.0
 Xvnc started from inetd, as in the configuration example about
 inetd mode that can be found in the RealVNC documentation.
 
 I rebuilt the port with Akihiro-san's patch as a locally-added
 patch file, and the problem went away.
 -- 
 cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL
 
 http://www.sax.de/~joerg/                        NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
 
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Thu May 18 16:12:46 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92414 
>Unformatted:
