summaryrefslogtreecommitdiffstats
path: root/win/winvnc/STrayIcon.cxx
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2014-02-07 14:53:24 +0000
committerSamuel Mannehed <samuel@cendio.se>2014-02-07 14:53:24 +0000
commit60c419320d2229ace017d1f599b6ab0a7b9e2927 (patch)
tree55eeba27730e7845b324ce748985712b2ae91070 /win/winvnc/STrayIcon.cxx
parentdc6af3740c36ec18e1c409096d6943951982d7ec (diff)
downloadtigervnc-60c419320d2229ace017d1f599b6ab0a7b9e2927.tar.gz
tigervnc-60c419320d2229ace017d1f599b6ab0a7b9e2927.zip
Make WinVNC service mode work on Windows Vista and beyond.
Patch by Jochen Tucht, fixes bug 135. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5158 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'win/winvnc/STrayIcon.cxx')
-rw-r--r--win/winvnc/STrayIcon.cxx17
1 files changed, 2 insertions, 15 deletions
diff --git a/win/winvnc/STrayIcon.cxx b/win/winvnc/STrayIcon.cxx
index 354575ad..84575bd0 100644
--- a/win/winvnc/STrayIcon.cxx
+++ b/win/winvnc/STrayIcon.cxx
@@ -136,22 +136,10 @@ public:
}
break;
case ID_OPTIONS:
- {
- CurrentUserToken token;
- if (token.canImpersonate())
- vncConfig.start(isServiceProcess() ? (HANDLE)token : INVALID_HANDLE_VALUE);
- else
- vlog.error("Options: unknown current user");
- }
+ vncConfig.start(INVALID_HANDLE_VALUE);
break;
case ID_CONNECT:
- {
- CurrentUserToken token;
- if (token.canImpersonate())
- vncConnect.start(isServiceProcess() ? (HANDLE)token : INVALID_HANDLE_VALUE);
- else
- vlog.error("Options: unknown current user");
- }
+ vncConnect.start(INVALID_HANDLE_VALUE);
break;
case ID_DISCONNECT:
thread.server.disconnectClients("tray menu disconnect");
@@ -160,7 +148,6 @@ public:
if (MsgBox(0, _T("Are you sure you want to close the server?"),
MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2) == IDYES) {
if (isServiceProcess()) {
- ImpersonateCurrentUser icu;
try {
rfb::win32::stopService(VNCServerService::Name);
} catch (rdr::Exception& e) {