aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/platform/MSWindowsSession.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
commitbeb08eb751fa8e1f72042f263316ab5e5ddb596d (patch)
tree3b00df983527648bdae610ac7b88cb639b1f1828 /src/lib/platform/MSWindowsSession.cpp
parentfbc30002ab3438356c0476e70c4577a0310d52c0 (diff)
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/lib/platform/MSWindowsSession.cpp')
-rw-r--r--src/lib/platform/MSWindowsSession.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/platform/MSWindowsSession.cpp b/src/lib/platform/MSWindowsSession.cpp
index 8d4f8ce..daa9276 100644
--- a/src/lib/platform/MSWindowsSession.cpp
+++ b/src/lib/platform/MSWindowsSession.cpp
@@ -1,11 +1,11 @@
/*
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -45,7 +45,7 @@ MSWindowsSession::isProcessInSession(const char* name, PHANDLE process = NULL)
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
- // get the first process, and if we can't do that then it's
+ // get the first process, and if we can't do that then it's
// unlikely we can go any further
BOOL gotEntry = Process32First(snapshot, &entry);
if (!gotEntry) {
@@ -94,7 +94,7 @@ MSWindowsSession::isProcessInSession(const char* name, PHANDLE process = NULL)
}
std::string nameListJoin;
- for(std::list<std::string>::iterator it = nameList.begin();
+ for (std::list<std::string>::iterator it = nameList.begin();
it != nameList.end(); it++) {
nameListJoin.append(*it);
nameListJoin.append(", ");
@@ -119,7 +119,7 @@ MSWindowsSession::isProcessInSession(const char* name, PHANDLE process = NULL)
}
}
-HANDLE
+HANDLE
MSWindowsSession::getUserToken(LPSECURITY_ATTRIBUTES security)
{
HANDLE sourceToken;
@@ -127,7 +127,7 @@ MSWindowsSession::getUserToken(LPSECURITY_ATTRIBUTES security)
LOG((CLOG_ERR "could not get token from session %d", m_activeSessionId));
throw XArch(new XArchEvalWindows);
}
-
+
HANDLE newToken;
if (!DuplicateTokenEx(
sourceToken, TOKEN_ASSIGN_PRIMARY | TOKEN_ALL_ACCESS, security,
@@ -136,7 +136,7 @@ MSWindowsSession::getUserToken(LPSECURITY_ATTRIBUTES security)
LOG((CLOG_ERR "could not duplicate token"));
throw XArch(new XArchEvalWindows);
}
-
+
LOG((CLOG_DEBUG "duplicated, new token: %i", newToken));
return newToken;
}