Commit 283cefe2 authored by Owen Rudge's avatar Owen Rudge Committed by Alexandre Julliard

secur32: Implement basic functionality for LsaGetLogonSessionData.

parent 402b8473
......@@ -43,6 +43,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(secur32);
#define LSA_MAGIC_CREDENTIALS ('L' << 24 | 'S' << 16 | 'A' << 8 | '1')
#define LSA_MAGIC_CONTEXT ('L' << 24 | 'S' << 16 | 'A' << 8 | '2')
static const WCHAR *default_authentication_package = L"Negotiate";
struct lsa_package
{
ULONG package_id;
......@@ -157,9 +159,30 @@ NTSTATUS WINAPI LsaFreeReturnBuffer(PVOID buffer)
NTSTATUS WINAPI LsaGetLogonSessionData(PLUID LogonId,
PSECURITY_LOGON_SESSION_DATA* ppLogonSessionData)
{
FIXME("%p %p stub\n", LogonId, ppLogonSessionData);
*ppLogonSessionData = NULL;
return STATUS_NOT_IMPLEMENTED;
SECURITY_LOGON_SESSION_DATA *data;
int authpkg_len;
WCHAR *end;
FIXME("%p %p semi-stub\n", LogonId, ppLogonSessionData);
authpkg_len = wcslen(default_authentication_package) * sizeof(WCHAR);
data = calloc(1, sizeof(*data) + authpkg_len + sizeof(WCHAR));
if (!data) return STATUS_NO_MEMORY;
data->Size = sizeof(*data);
data->LogonId = *LogonId;
end = (WCHAR *)(data + 1);
wcscpy(end, default_authentication_package);
data->AuthenticationPackage.Length = authpkg_len;
data->AuthenticationPackage.MaximumLength = authpkg_len + sizeof(WCHAR);
data->AuthenticationPackage.Buffer = end;
*ppLogonSessionData = data;
return STATUS_SUCCESS;
}
NTSTATUS WINAPI LsaLogonUser(HANDLE LsaHandle, PLSA_STRING OriginName,
......
......@@ -266,7 +266,7 @@ static void test_get_logon_session_data(void)
if (!ret) goto cleanup;
status = LsaGetLogonSessionData(&ts.AuthenticationId, &data);
todo_wine ok(!status, "got %08lx\n", status);
ok(!status, "got %08lx\n", status);
if (status) goto cleanup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment