https://git.reactos.org/?p=reactos.git;a=commitdiff;h=32861b84b9282affb9ff7…
commit 32861b84b9282affb9ff74b6caef8651ebaa9ecd
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon Jul 29 00:10:26 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon Jul 29 01:22:37 2019 +0200
[MSV1_0] Add debug messages to MsvpCheckWorkstations() and disable
MsvpCheckLogonHours() for testing.
---
dll/win32/msv1_0/msv1_0.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/dll/win32/msv1_0/msv1_0.c b/dll/win32/msv1_0/msv1_0.c
index c100aafd6ef..90ee9d264d8 100644
--- a/dll/win32/msv1_0/msv1_0.c
+++ b/dll/win32/msv1_0/msv1_0.c
@@ -849,24 +849,35 @@ MsvpCheckLogonHours(
_In_ PSAMPR_LOGON_HOURS LogonHours,
_In_ PLARGE_INTEGER LogonTime)
{
+#if 0
LARGE_INTEGER LocalLogonTime;
TIME_FIELDS TimeFields;
USHORT MinutesPerUnit, Offset;
+ BOOL bFound;
- TRACE("MsvpCheckLogonHours(%p %p)\n", LogonHours, LogonTime);
+ FIXME("MsvpCheckLogonHours(%p %p)\n", LogonHours, LogonTime);
if (LogonHours->UnitsPerWeek == 0 || LogonHours->LogonHours == NULL)
+ {
+ FIXME("No logon hours!\n");
return TRUE;
+ }
RtlSystemTimeToLocalTime(LogonTime, &LocalLogonTime);
RtlTimeToTimeFields(&LocalLogonTime, &TimeFields);
- TRACE("UnitsPerWeek: %u\n", LogonHours->UnitsPerWeek);
+ FIXME("UnitsPerWeek: %u\n", LogonHours->UnitsPerWeek);
MinutesPerUnit = 10080 / LogonHours->UnitsPerWeek;
Offset = ((TimeFields.Weekday * 24 + TimeFields.Hour) * 60 + TimeFields.Minute) /
MinutesPerUnit;
+ FIXME("Offset: %us\n", Offset);
- return (BOOL)(LogonHours->LogonHours[Offset / 8] & (1 << (Offset %
8)));
+ bFound = (BOOL)(LogonHours->LogonHours[Offset / 8] & (1 << (Offset %
8)));
+ FIXME("Logon permitted: %s\n", bFound ? "Yes" : "No");
+
+ return bFound;
+#endif
+ return TRUE;
}
@@ -879,10 +890,15 @@ MsvpCheckWorkstations(
PWSTR pStart, pEnd;
BOOL bFound = FALSE;
- TRACE("MsvpCheckWorkstations(%wZ %S)\n", WorkStations, ComputerName);
+ TRACE("MsvpCheckWorkstations(%p %S)\n", WorkStations, ComputerName);
if (WorkStations->Length == 0 || WorkStations->Buffer == NULL)
+ {
+ TRACE("No workstations!\n");
return TRUE;
+ }
+
+ TRACE("Workstations: %wZ\n", WorkStations);
pStart = WorkStations->Buffer;
for (;;)
@@ -891,6 +907,7 @@ MsvpCheckWorkstations(
if (pEnd != NULL)
*pEnd = UNICODE_NULL;
+ TRACE("Comparing '%S' and '%S'\n", ComputerName,
pStart);
if (_wcsicmp(ComputerName, pStart) == 0)
{
bFound = TRUE;
@@ -906,6 +923,8 @@ MsvpCheckWorkstations(
pStart = pEnd + 1;
}
+ TRACE("Found allowed workstation: %s\n", (bFound) ? "Yes" :
"No");
+
return bFound;
}