Hi everybody, please see attached a patch for wincvs_src 1.2.1. It gives a new parameter (only via registry settable) called AllowHTTP, which switches HTTP-socket-generation off. Defaults to the current mode - socket enabled.
It works, tested. But there's one problem I have. I run cygwin sshd to tunnel the connections. This gives (using a "command=" shell script in authorized_keys) a kind of menu for some management options, where one is vnc. As the user sitting in front of the machine MUST be able to stop the connection at will it is required to use winvnc as an application, not as a service - thus if the user locks the workstation, the connection is canceled. BUT: sshd runs as a service using localsystem. if it is interactive, it shows some dos-boxes - which is neither pretty nor good. if it isn't installed as interactive, it cancels the incomming connections with "failed to close input desktop" - IIRC in the getuserobjectinfo call, as it has no rights to deal with the users desktop. Is there some patch (or can somebody tell me in short) what there is to do to enable this priviledge in winvnc? as it runs as localsystem it should be possible to switch this permission on in the application - so every other call would be invisible. Thanks for all help! Regards, Phil ######## DIFF diff -u -2 -w -r1.1 -r1.2 --- vncProperties.cpp 2001/10/17 08:43:48 1.1 +++ vncProperties.cpp 2001/10/17 08:55:07 1.2 @@ -789,4 +789,5 @@ else m_server->SetLoopbackOk(LoadInt(hkLocal, "AllowLoopback", false)); + m_server->SetHTTPOk(LoadInt(hkLocal, "AllowHTTP", true)); m_server->SetAuthRequired(LoadInt(hkLocal, "AuthRequired", true)); m_server->SetConnectPriority(LoadInt(hkLocal, "ConnectPriority", 2)); Index: vncServer.cpp =================================================================== RCS file: /cvsroot/ntclone/cprogs/winvnc/winvnc/vncServer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -w -r1.1 -r1.2 --- vncServer.cpp 2001/10/17 08:43:48 1.1 +++ vncServer.cpp 2001/10/17 08:55:07 1.2 @@ -84,4 +84,5 @@ m_disableTrayIcon = FALSE; m_loopback_allowed = FALSE; + m_http_allowed = TRUE; m_lock_on_exit = 0; m_connect_pri = 0; @@ -970,5 +971,5 @@ // Now let's start the HTTP connection stuff - if (m_httpConn == NULL) + if (m_httpConn == NULL && m_http_allowed) { m_httpConn = new vncHTTPConnect; @@ -1019,4 +1020,17 @@ { return m_socketConn != NULL; +} + +BOOL +vncServer::SetHTTPOk(BOOL http_allowed) +{ + if (http_allowed != m_http_allowed) + { + m_http_allowed = http_allowed; + BOOL socketConn = SockConnected(); + SockConnect(FALSE); + SockConnect(socketConn); + } + return TRUE; } Index: vncServer.h =================================================================== RCS file: /cvsroot/ntclone/cprogs/winvnc/winvnc/vncServer.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -w -r1.1 -r1.2 --- vncServer.h 2001/10/17 08:43:48 1.1 +++ vncServer.h 2001/10/17 08:55:07 1.2 @@ -259,4 +259,5 @@ char m_password[MAXPWLEN]; BOOL m_passwd_required; + BOOL m_http_allowed; BOOL m_loopback_allowed; BOOL m_loopbackOnly; Index: vncServer.h =================================================================== RCS file: /cvsroot/ntclone/cprogs/winvnc/winvnc/vncServer.h,v retrieving revision 1.2 diff -u -2 -w -r1.2 vncServer.h --- vncServer.h 2001/10/17 08:55:07 1.2 +++ vncServer.h 2001/10/17 10:29:13 @@ -185,4 +185,5 @@ virtual BOOL SockConnected(); virtual BOOL SetLoopbackOnly(BOOL loopbackOnly); + virtual BOOL SetHTTPOk(BOOL loopbackOnly); virtual BOOL LoopbackOnly(); - This message is RSA-encrypted: n=33389, e=257 --------------------------------------------------------------------- To unsubscribe, mail [EMAIL PROTECTED] with the line: 'unsubscribe vnc-list' in the message BODY See also: http://www.uk.research.att.com/vnc/intouch.html ---------------------------------------------------------------------