Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change windows logon type from NETWORK to INTERACTIVE #234

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/deadline_worker_agent/installer/win_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def ensure_user_profile_exists(username: str, password: str):
# https://timgolden.me.uk/pywin32-docs/win32security__LogonUser_meth.html
logon_token = win32security.LogonUser(
Username=username,
LogonType=win32security.LOGON32_LOGON_NETWORK_CLEARTEXT,
LogonType=win32security.LOGON32_LOGON_INTERACTIVE,
LogonProvider=win32security.LOGON32_PROVIDER_DEFAULT,
Password=password,
Domain=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pywintypes import HANDLE as PyHANDLE
from win32security import (
LogonUser,
LOGON32_LOGON_NETWORK_CLEARTEXT,
LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT,
)
from win32profile import LoadUserProfile, PI_NOUI, UnloadUserProfile
Expand Down Expand Up @@ -214,7 +214,7 @@ def get_windows_session_user(self, user: str, passwordArn: str) -> WindowsSessio
# https://timgolden.me.uk/pywin32-docs/win32profile__LoadUserProfile_meth.html
logon_token = LogonUser(
Username=user,
LogonType=LOGON32_LOGON_NETWORK_CLEARTEXT,
LogonType=LOGON32_LOGON_INTERACTIVE,
LogonProvider=LOGON32_PROVIDER_DEFAULT,
Password=password,
Domain=None,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/install/test_windows_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_loads_user_profile(
# THEN
mock_LogonUser.assert_called_once_with(
Username=username,
LogonType=win32security.LOGON32_LOGON_NETWORK_CLEARTEXT,
LogonType=win32security.LOGON32_LOGON_INTERACTIVE,
LogonProvider=win32security.LOGON32_PROVIDER_DEFAULT,
Password=password,
Domain=None,
Expand Down