ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
24 participants
223 discussions
Start a n
N
ew thread
01/01: [SCHEDSVC] Fix a typo in debug print that was introduced in 0.4.10-dev-544-g 0d13bb10151e226df996f6c1d5b509dbe000446d
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2114a2fb5f6c6be7b2eee…
commit 2114a2fb5f6c6be7b2eee20d1556b48f7f6eaa22 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Wed Sep 19 22:51:07 2018 +0200 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Wed Sep 19 22:52:48 2018 +0200 [SCHEDSVC] Fix a typo in debug print that was introduced in 0.4.10-dev-544-g 0d13bb10151e226df996f6c1d5b509dbe000446d --- base/services/schedsvc/schedsvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/services/schedsvc/schedsvc.c b/base/services/schedsvc/schedsvc.c index b08b3e8ede..76f0418ad6 100644 --- a/base/services/schedsvc/schedsvc.c +++ b/base/services/schedsvc/schedsvc.c @@ -107,7 +107,7 @@ ServiceControlHandler(DWORD dwControl, return ERROR_SUCCESS; case 128: - TRACE(" Start Shell contol received\n"); + TRACE(" Start Shell control received\n"); return ERROR_SUCCESS; case 129:
6 years, 3 months
1
0
0
0
01/01: [WLNOTIFY] Disable the Logoff-Handler routine for the scheduler service.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5e2fe08918fc5a3c52d58…
commit 5e2fe08918fc5a3c52d586a8dc8b8df851473c20 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Wed Sep 19 16:35:12 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Wed Sep 19 16:35:12 2018 +0200 [WLNOTIFY] Disable the Logoff-Handler routine for the scheduler service. The Logoff-Handler might try to notify the scheduler service which might already have been shut down. We need to fix the shutdown sequence, so that the service manager stops all running services. Might fix CORE-14521. --- dll/win32/wlnotify/schedsvc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dll/win32/wlnotify/schedsvc.c b/dll/win32/wlnotify/schedsvc.c index edf89e29ec..ffca335386 100644 --- a/dll/win32/wlnotify/schedsvc.c +++ b/dll/win32/wlnotify/schedsvc.c @@ -17,9 +17,11 @@ WINAPI SchedEventLogoff( PWLX_NOTIFICATION_INFO pInfo) { +#if 0 SC_HANDLE hManager = NULL; SC_HANDLE hService = NULL; SERVICE_STATUS ServiceStatus; +#endif TRACE("SchedEventLogoff\n"); TRACE("Size: %lu\n", pInfo->Size); @@ -31,6 +33,7 @@ SchedEventLogoff( TRACE("hDesktop: %p\n", pInfo->hDesktop); TRACE("pStatusCallback: %p\n", pInfo->pStatusCallback); +#if 0 hManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT); if (hManager == NULL) { @@ -56,6 +59,7 @@ done: if (hManager != NULL) CloseServiceHandle(hManager); +#endif }
6 years, 3 months
1
0
0
0
01/01: [ADVAPI32][SERVICES] Use the session key provided by SystemFunction028 to encrypt and decrypt the service passwords.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=76588be0d1a4b271dc489…
commit 76588be0d1a4b271dc489a838967bee0a45f4c99 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Wed Sep 19 12:28:58 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Wed Sep 19 12:30:33 2018 +0200 [ADVAPI32][SERVICES] Use the session key provided by SystemFunction028 to encrypt and decrypt the service passwords. --- base/system/services/config.c | 20 +++++++++++++++++--- dll/win32/advapi32/service/scm.c | 21 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/base/system/services/config.c b/base/system/services/config.c index 4d1f2471c6..a4b809b76f 100644 --- a/base/system/services/config.c +++ b/base/system/services/config.c @@ -29,6 +29,11 @@ SystemFunction005( const struct ustring *key, struct ustring *out); +NTSTATUS +WINAPI +SystemFunction028( + IN PVOID ContextHandle, + OUT LPBYTE SessionKey); /* FUNCTIONS *****************************************************************/ @@ -699,17 +704,26 @@ ScmDecryptPassword( _Out_ PWSTR *pClearTextPassword) { struct ustring inData, keyData, outData; - PCHAR pszKey = "TestEncryptionKey"; + BYTE SessionKey[16]; PWSTR pBuffer; NTSTATUS Status; + /* Get the session key */ + Status = SystemFunction028(NULL, + SessionKey); + if (!NT_SUCCESS(Status)) + { + DPRINT1("SystemFunction028 failed (Status 0x%08lx)\n", Status); + return RtlNtStatusToDosError(Status); + } + inData.Length = dwPasswordSize; inData.MaximumLength = inData.Length; inData.Buffer = pPassword; - keyData.Length = strlen(pszKey); + keyData.Length = sizeof(SessionKey); keyData.MaximumLength = keyData.Length; - keyData.Buffer = (unsigned char *)pszKey; + keyData.Buffer = SessionKey; outData.Length = 0; outData.MaximumLength = 0; diff --git a/dll/win32/advapi32/service/scm.c b/dll/win32/advapi32/service/scm.c index efa19f2b35..b28055a968 100644 --- a/dll/win32/advapi32/service/scm.c +++ b/dll/win32/advapi32/service/scm.c @@ -19,6 +19,12 @@ SystemFunction004( const struct ustring *key, struct ustring *out); +NTSTATUS +WINAPI +SystemFunction028( + IN PVOID ContextHandle, + OUT LPBYTE SessionKey); + /* FUNCTIONS *****************************************************************/ handle_t __RPC_USER @@ -169,17 +175,26 @@ ScmEncryptPassword( _Out_ PDWORD pEncryptedPasswordSize) { struct ustring inData, keyData, outData; - PCHAR pszKey = "TestEncryptionKey"; + BYTE SessionKey[16]; PBYTE pBuffer; NTSTATUS Status; + /* Get the session key */ + Status = SystemFunction028(NULL, + SessionKey); + if (!NT_SUCCESS(Status)) + { + ERR("SystemFunction028 failed (Status 0x%08lx)\n", Status); + return RtlNtStatusToDosError(Status); + } + inData.Length = (wcslen(pClearTextPassword) + 1) * sizeof(WCHAR); inData.MaximumLength = inData.Length; inData.Buffer = (unsigned char *)pClearTextPassword; - keyData.Length = strlen(pszKey); + keyData.Length = sizeof(SessionKey); keyData.MaximumLength = keyData.Length; - keyData.Buffer = (unsigned char *)pszKey; + keyData.Buffer = SessionKey; outData.Length = 0; outData.MaximumLength = 0;
6 years, 3 months
1
0
0
0
02/02: [DWNL] Improve print date
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9f87785e962b05779bac9…
commit 9f87785e962b05779bac9a049dab22e503ed6a2b Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Sep 19 00:21:09 2018 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Wed Sep 19 12:16:23 2018 +0200 [DWNL] Improve print date --- base/applications/network/dwnl/dwnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/applications/network/dwnl/dwnl.c b/base/applications/network/dwnl/dwnl.c index 4de7eda54e..7660906a5f 100644 --- a/base/applications/network/dwnl/dwnl.c +++ b/base/applications/network/dwnl/dwnl.c @@ -424,7 +424,7 @@ download_file(IN LPCWSTR pszUrl, GetLocalTime(&sysTime); - ConPrintf(StdOut, L"--%d-%d-%d %d:%d:%d-- %s\n\t=> %s\n", + ConPrintf(StdOut, L"--%d-%02d-%02d %02d:%02d:%02d-- %s\n\t=> %s\n", sysTime.wYear, sysTime.wMonth, sysTime.wDay, sysTime.wHour, sysTime.wMinute, sysTime.wSecond, szUrl, pszFile);
6 years, 3 months
1
0
0
0
01/02: [DWNL] Add russian translation
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e283f4f72b20ab0c60ce1…
commit e283f4f72b20ab0c60ce1cf7e10f53709c081a5e Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Sep 19 00:19:22 2018 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Wed Sep 19 12:16:23 2018 +0200 [DWNL] Add russian translation --- base/applications/network/dwnl/dwnl.rc | 3 +++ base/applications/network/dwnl/lang/ru-RU.rc | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/base/applications/network/dwnl/dwnl.rc b/base/applications/network/dwnl/dwnl.rc index 79739f4f12..1981bc067b 100644 --- a/base/applications/network/dwnl/dwnl.rc +++ b/base/applications/network/dwnl/dwnl.rc @@ -14,3 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_EN_US #include "lang/en-US.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif diff --git a/base/applications/network/dwnl/lang/ru-RU.rc b/base/applications/network/dwnl/lang/ru-RU.rc new file mode 100644 index 0000000000..9b207321da --- /dev/null +++ b/base/applications/network/dwnl/lang/ru-RU.rc @@ -0,0 +1,25 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_USAGE "Использование: dwnl URL [ПУТЬ]\n" + IDS_RESOLVING "Определение хоста %s... " + IDS_DONE "успешно.\n" + IDS_LENGTH_FULL "Размер: %I64u [%s]\n" + IDS_LENGTH "Размер: %I64u\n" + IDS_FILE_SAVED "\nФайл сохранён.\n" + IDS_CONNECTING_TO_FULL "Соединение с %s [%s]... " + IDS_CONNECTING_TO "Соединение с %s... " + IDS_REDIRECTING_TO "Перенаправление на %s... " + IDS_SEND_REQUEST "Отправка запроса... " + IDS_BYTES_DOWNLOADED "%I64u байт скачано" + IDS_BYTES_DOWNLOADED_FULL "%2d%% (%I64u байт скачано)" +END + +STRINGTABLE +BEGIN + IDS_ERROR_DOWNLOAD "\nОШИБКА: Не удалось скачать.\n" + IDS_ERROR_CODE "\nОШИБКА: %u\n" + IDS_ERROR_FILENAME "\nОШИБКА: Невозможно определить конечное имя файла, пожалуйста укажите полное имя файла в пути.\n" + IDS_ERROR_PROTOCOL "\nОШИБКА: Неподдерживаемый протокол.\n" +END
6 years, 3 months
1
0
0
0
01/01: [ADVAPI32] Implement SystemFunction028 to always return the default session key.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4114dcad46efcf12ee4d0…
commit 4114dcad46efcf12ee4d09f06b715bbc57e80b14 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Tue Sep 18 23:57:54 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Wed Sep 19 00:20:11 2018 +0200 [ADVAPI32] Implement SystemFunction028 to always return the default session key. --- dll/win32/advapi32/misc/sysfunc.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/dll/win32/advapi32/misc/sysfunc.c b/dll/win32/advapi32/misc/sysfunc.c index b6bee62248..bbb8a69db4 100644 --- a/dll/win32/advapi32/misc/sysfunc.c +++ b/dll/win32/advapi32/misc/sysfunc.c @@ -19,6 +19,8 @@ static const unsigned char CRYPT_LMhash_Magic[8] = { 'K', 'G', 'S', '!', '@', '#', '$', '%' }; +static const unsigned char DefaultSessionKey[16] = + {'D', 'e', 'f', 'S', 'e', 's', 's', 'i', 'o', 'n', 'K', 'e', 'y', '!', '@', '#'}; /****************************************************************************** * SystemFunction001 [ADVAPI32.@] @@ -446,17 +448,35 @@ WINAPI SystemFunction025(const BYTE *in, const BYTE *key, LPBYTE out) } /********************************************************************** + * SystemFunction028 [ADVAPI32.@] + * + * Retrieves an encryption session key... + * + * PARAMS + * ContextHandle [I] RPC context handle + * SessionKey [O] buffer to receive the session key (16 bytes) + * + * RETURNS + * Success: STATUS_LOCAL_USER_SESSION_KEY * * @unimplemented */ -INT +NTSTATUS WINAPI -SystemFunction028(INT a, INT b) +SystemFunction028( + _In_ PVOID ContextHandle, + _Out_ LPBYTE SessionKey) { - //NDRCContextBinding() + /* HACK: Always return the default key */ + memcpy(SessionKey, DefaultSessionKey, sizeof(DefaultSessionKey)); + return STATUS_LOCAL_USER_SESSION_KEY; + +#if 0 + //NDRCContextBinding(); //SystemFunction034() SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 28; +#endif }
6 years, 3 months
1
0
0
0
01/01: [DWNL] Localize the File Download utility (#853)
by Lee Schroeder
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=08be1648f95464d41b8f8…
commit 08be1648f95464d41b8f86d42c476db04c3a0f0c Author: Lee Schroeder <spaceseel(a)gmail.com> AuthorDate: Tue Sep 18 15:55:44 2018 -0600 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Sep 18 23:55:44 2018 +0200 [DWNL] Localize the File Download utility (#853) Also, changed header string to include a start time stamp similar to the one in wget. CORE-14498 --- base/applications/network/dwnl/CMakeLists.txt | 7 +- base/applications/network/dwnl/dwnl.c | 121 +++++++++++++++----------- base/applications/network/dwnl/dwnl.rc | 16 ++++ base/applications/network/dwnl/lang/en-US.rc | 25 ++++++ base/applications/network/dwnl/resource.h | 22 +++++ 5 files changed, 138 insertions(+), 53 deletions(-) diff --git a/base/applications/network/dwnl/CMakeLists.txt b/base/applications/network/dwnl/CMakeLists.txt index ac0517d478..1bd84579ae 100644 --- a/base/applications/network/dwnl/CMakeLists.txt +++ b/base/applications/network/dwnl/CMakeLists.txt @@ -1,8 +1,11 @@ -add_executable(dwnl dwnl.c) +include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils) + +add_executable(dwnl dwnl.c dwnl.rc) set_module_type(dwnl win32cui UNICODE) +target_link_libraries(dwnl conutils ${PSEH_LIB}) target_link_libraries(dwnl uuid) -add_importlibs(dwnl urlmon wininet msvcrt kernel32) +add_importlibs(dwnl urlmon wininet msvcrt user32 kernel32) if(MSVC) add_importlibs(dwnl ntdll) diff --git a/base/applications/network/dwnl/dwnl.c b/base/applications/network/dwnl/dwnl.c index 827565367e..4de7eda54e 100644 --- a/base/applications/network/dwnl/dwnl.c +++ b/base/applications/network/dwnl/dwnl.c @@ -1,8 +1,11 @@ #define COBJMACROS #include <urlmon.h> #include <wininet.h> -#include <tchar.h> +#include <wchar.h> #include <strsafe.h> +#include <conutils.h> + +#include "resource.h" /* FIXME: add correct definitions to urlmon.idl */ #ifdef UNICODE @@ -19,8 +22,8 @@ typedef struct { const IBindStatusCallbackVtbl* lpIBindStatusCallbackVtbl; LONG ref; - TCHAR szHostName[INTERNET_MAX_HOST_NAME_LENGTH + 1]; - TCHAR szMimeType[128]; + WCHAR szHostName[INTERNET_MAX_HOST_NAME_LENGTH + 1]; + WCHAR szMimeType[128]; UINT64 Size; UINT64 Progress; UINT bResolving : 1; @@ -39,10 +42,10 @@ CBindStatusCallback_Destroy(CBindStatusCallback *This) } static void -write_status(LPCTSTR lpFmt, ...) +write_status(LPCWSTR lpFmt, ...) { va_list args; - TCHAR szTxt[128]; + WCHAR szTxt[128]; CONSOLE_SCREEN_BUFFER_INFO csbi; va_start(args, lpFmt); @@ -51,17 +54,19 @@ write_status(LPCTSTR lpFmt, ...) if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) { - _tprintf(_T("\r%*.*s"), -(csbi.dwSize.X - 1), csbi.dwSize.X - 1, szTxt); + ConPrintf(StdOut, L"\r%*.*s", -(csbi.dwSize.X - 1), csbi.dwSize.X - 1, szTxt); } else { - _putts(szTxt); + ConPuts(StdOut, szTxt); } } static void CBindStatusCallback_UpdateProgress(CBindStatusCallback *This) { + WCHAR szMessage[MAX_PATH]; + /* FIXME: better output */ if (This->Size != 0) { @@ -71,12 +76,16 @@ CBindStatusCallback_UpdateProgress(CBindStatusCallback *This) if (Percentage > 99) Percentage = 99; - write_status(_T("%2d%% (%I64u bytes downloaded)"), Percentage, This->Progress); + LoadStringW(NULL, IDS_BYTES_DOWNLOADED_FULL, szMessage, ARRAYSIZE(szMessage)); + + write_status(szMessage, Percentage, This->Progress); } else { + LoadStringW(NULL, IDS_BYTES_DOWNLOADED, szMessage, ARRAYSIZE(szMessage)); + /* Unknown size */ - write_status(_T("%I64u bytes downloaded"), This->Progress); + write_status(szMessage, This->Progress); } } @@ -168,10 +177,10 @@ CBindStatusCallback_OnProgress(IBindStatusCallback *iface, case BINDSTATUS_FINDINGRESOURCE: if (!This->bResolving) { - _tcscpy(This->szHostName, szStatusText); + wcscpy(This->szHostName, szStatusText); This->bResolving = TRUE; - _tprintf(_T("Resolving %s... "), This->szHostName); + ConResPrintf(StdOut, IDS_RESOLVING, This->szHostName); } break; @@ -179,14 +188,16 @@ CBindStatusCallback_OnProgress(IBindStatusCallback *iface, This->bConnecting = TRUE; This->bSendingReq = FALSE; This->bBeginTransfer = FALSE; - This->szMimeType[0] = _T('\0'); + This->szMimeType[0] = L'\0'; if (This->bResolving) { - _tprintf(_T("done.\n")); - _tprintf(_T("Connecting to %s[%s]... "), This->szHostName, szStatusText); + ConResPrintf(StdOut, IDS_DONE); + ConResPrintf(StdOut, IDS_CONNECTING_TO_FULL, This->szHostName, szStatusText); } else - _tprintf(_T("Connecting to %s... "), szStatusText); + { + ConResPrintf(StdOut, IDS_CONNECTING_TO, szStatusText); + } break; case BINDSTATUS_REDIRECTING: @@ -194,24 +205,24 @@ CBindStatusCallback_OnProgress(IBindStatusCallback *iface, This->bConnecting = FALSE; This->bSendingReq = FALSE; This->bBeginTransfer = FALSE; - This->szMimeType[0] = _T('\0'); - _tprintf(_T("Redirecting to %s... "), szStatusText); + This->szMimeType[0] = L'\0'; + ConResPrintf(StdOut, IDS_REDIRECTING_TO, szStatusText); break; case BINDSTATUS_SENDINGREQUEST: This->bBeginTransfer = FALSE; - This->szMimeType[0] = _T('\0'); + This->szMimeType[0] = L'\0'; if (This->bResolving || This->bConnecting) - _tprintf(_T("done.\n")); + ConResPrintf(StdOut, IDS_DONE); if (!This->bSendingReq) - _tprintf(_T("Sending request... ")); + ConResPrintf(StdOut, IDS_SEND_REQUEST); This->bSendingReq = TRUE; break; case BINDSTATUS_MIMETYPEAVAILABLE: - _tcscpy(This->szMimeType, szStatusText); + wcscpy(This->szMimeType, szStatusText); break; case BINDSTATUS_BEGINDOWNLOADDATA: @@ -219,24 +230,23 @@ CBindStatusCallback_OnProgress(IBindStatusCallback *iface, This->Size = (UINT64)ulProgressMax; if (This->bSendingReq) - _tprintf(_T("done.\n")); + ConResPrintf(StdOut, IDS_DONE); if (!This->bBeginTransfer && This->Size != 0) { - if (This->szMimeType[0] != _T('\0')) - _tprintf(_T("Length: %I64u [%s]\n"), This->Size, This->szMimeType); + if (This->szMimeType[0] != L'\0') + ConResPrintf(StdOut, IDS_LENGTH_FULL, This->Size, This->szMimeType); else - _tprintf(_T("Length: %I64u\n"), This->Size); + ConResPrintf(StdOut, IDS_LENGTH, This->Size); } - _tprintf(_T("\n")); + ConPuts(StdOut, L"\n"); This->bBeginTransfer = TRUE; break; case BINDSTATUS_ENDDOWNLOADDATA: - write_status(_T("File saved.")); - _tprintf(_T("\n")); + ConResPrintf(StdOut, IDS_FILE_SAVED); break; case BINDSTATUS_DOWNLOADINGDATA: @@ -319,7 +329,7 @@ CreateBindStatusCallback(void) static int get_display_url(IN LPURL_COMPONENTS purl, - OUT TCHAR *szBuffer, + OUT LPWSTR szBuffer, IN PDWORD pdwBufferSize) { URL_COMPONENTS urlc; @@ -336,23 +346,24 @@ get_display_url(IN LPURL_COMPONENTS purl, } static int -download_file(IN LPCTSTR pszUrl, - IN LPCTSTR pszFile OPTIONAL) +download_file(IN LPCWSTR pszUrl, + IN LPCWSTR pszFile OPTIONAL) { - TCHAR szScheme[INTERNET_MAX_SCHEME_LENGTH + 1]; - TCHAR szHostName[INTERNET_MAX_HOST_NAME_LENGTH + 1]; - TCHAR szUserName[INTERNET_MAX_USER_NAME_LENGTH + 1]; - TCHAR szPassWord[INTERNET_MAX_PASSWORD_LENGTH + 1]; - TCHAR szUrlPath[INTERNET_MAX_PATH_LENGTH + 1]; - TCHAR szExtraInfo[INTERNET_MAX_PATH_LENGTH + 1]; - TCHAR szUrl[INTERNET_MAX_URL_LENGTH + 1]; + WCHAR szScheme[INTERNET_MAX_SCHEME_LENGTH + 1]; + WCHAR szHostName[INTERNET_MAX_HOST_NAME_LENGTH + 1]; + WCHAR szUserName[INTERNET_MAX_USER_NAME_LENGTH + 1]; + WCHAR szPassWord[INTERNET_MAX_PASSWORD_LENGTH + 1]; + WCHAR szUrlPath[INTERNET_MAX_PATH_LENGTH + 1]; + WCHAR szExtraInfo[INTERNET_MAX_PATH_LENGTH + 1]; + WCHAR szUrl[INTERNET_MAX_URL_LENGTH + 1]; DWORD dwUrlLen; LPTSTR pszFilePart; URL_COMPONENTS urlc; IBindStatusCallback *pbsc; int iRet; + SYSTEMTIME sysTime; - if (pszFile != NULL && pszFile[0] == _T('\0')) + if (pszFile != NULL && pszFile[0] == L'\0') pszFile = NULL; urlc.dwStructSize = sizeof(urlc); @@ -368,7 +379,7 @@ download_file(IN LPCTSTR pszUrl, urlc.dwUrlPathLength = sizeof(szUrlPath) / sizeof(szUrlPath[0]); urlc.lpszExtraInfo = szExtraInfo; urlc.dwExtraInfoLength = sizeof(szExtraInfo) / sizeof(szExtraInfo[0]); - if (!InternetCrackUrl(pszUrl, _tcslen(pszUrl), ICU_ESCAPE, &urlc)) + if (!InternetCrackUrl(pszUrl, wcslen(pszUrl), ICU_ESCAPE, &urlc)) return DWNL_E_LASTERROR; if (urlc.nScheme != INTERNET_SCHEME_FTP && @@ -381,15 +392,15 @@ download_file(IN LPCTSTR pszUrl, if (urlc.nScheme == INTERNET_SCHEME_FTP && urlc.dwUserNameLength == 0 && urlc.dwPasswordLength == 0) { - _tcscpy(szUserName, _T("anonymous")); - urlc.dwUserNameLength = _tcslen(szUserName); + wcscpy(szUserName, L"anonymous"); + urlc.dwUserNameLength = wcslen(szUserName); } /* FIXME: Get file name from server */ if (urlc.dwUrlPathLength == 0 && pszFile == NULL) return DWNL_E_NEEDTARGETFILENAME; - pszFilePart = _tcsrchr(szUrlPath, _T('/')); + pszFilePart = wcsrchr(szUrlPath, L'/'); if (pszFilePart != NULL) pszFilePart++; @@ -411,7 +422,12 @@ download_file(IN LPCTSTR pszUrl, if (iRet <= 0) return iRet; - _tprintf(_T("Download `%s\'\n\t=> `%s\'\n"), szUrl, pszFile); + GetLocalTime(&sysTime); + + ConPrintf(StdOut, L"--%d-%d-%d %d:%d:%d-- %s\n\t=> %s\n", + sysTime.wYear, sysTime.wMonth, sysTime.wDay, + sysTime.wHour, sysTime.wMinute, sysTime.wSecond, + szUrl, pszFile); /* Generate the URL to download */ dwUrlLen = sizeof(szUrl) / sizeof(szUrl[0]); @@ -435,19 +451,19 @@ download_file(IN LPCTSTR pszUrl, static int print_err(int iErr) { - write_status(_T("")); + write_status(L""); if (iErr == DWNL_E_LASTERROR) { if (GetLastError() == ERROR_SUCCESS) { /* File not found */ - _ftprintf(stderr, _T("\nERROR: Download failed.\n")); + ConResPrintf(StdErr, IDS_ERROR_DOWNLOAD); } else { /* Display last error code */ - _ftprintf(stderr, _T("\nERROR: %u\n"), GetLastError()); + ConResPrintf(StdErr, IDS_ERROR_CODE, GetLastError()); } } else @@ -455,11 +471,11 @@ print_err(int iErr) switch (iErr) { case DWNL_E_NEEDTARGETFILENAME: - _ftprintf(stderr, _T("\nERROR: Cannot determine filename, please specify a destination file name.\n")); + ConResPrintf(StdErr, IDS_ERROR_FILENAME); break; case DWNL_E_UNSUPPORTEDSCHEME: - _ftprintf(stderr, _T("\nERROR: Unsupported protocol.\n")); + ConResPrintf(StdErr, IDS_ERROR_PROTOCOL); break; } } @@ -467,13 +483,16 @@ print_err(int iErr) return 1; } -int _tmain(int argc, TCHAR **argv) +int wmain(int argc, WCHAR **argv) { int iErr, iRet = 0; + /* Initialize the Console Standard Streams */ + ConInitStdStreams(); + if(argc != 2 && argc != 3) { - _tprintf(_T("Usage: dwnl URL [DESTINATION]")); + ConResPrintf(StdOut, IDS_USAGE); return 2; } diff --git a/base/applications/network/dwnl/dwnl.rc b/base/applications/network/dwnl/dwnl.rc new file mode 100644 index 0000000000..79739f4f12 --- /dev/null +++ b/base/applications/network/dwnl/dwnl.rc @@ -0,0 +1,16 @@ +#include <windef.h> + +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS File Download Utility" +#define REACTOS_STR_INTERNAL_NAME "dwnl" +#define REACTOS_STR_ORIGINAL_FILENAME "dwnl.exe" +#include <reactos/version.rc> + +/* UTF-8 */ +#pragma code_page(65001) +#ifdef LANGUAGE_EN_US + #include "lang/en-US.rc" +#endif diff --git a/base/applications/network/dwnl/lang/en-US.rc b/base/applications/network/dwnl/lang/en-US.rc new file mode 100644 index 0000000000..a62ce99a14 --- /dev/null +++ b/base/applications/network/dwnl/lang/en-US.rc @@ -0,0 +1,25 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE +BEGIN + IDS_USAGE "Usage: dwnl URL [DESTINATION]\n" + IDS_RESOLVING "Resolving %s... " + IDS_DONE "done.\n" + IDS_LENGTH_FULL "Length: %I64u [%s]\n" + IDS_LENGTH "Length: %I64u\n" + IDS_FILE_SAVED "\nFile saved.\n" + IDS_CONNECTING_TO_FULL "Connecting to %s [%s]... " + IDS_CONNECTING_TO "Connecting to %s... " + IDS_REDIRECTING_TO "Redirecting to %s... " + IDS_SEND_REQUEST "Sending request... " + IDS_BYTES_DOWNLOADED "%I64u bytes downloaded" + IDS_BYTES_DOWNLOADED_FULL "%2d%% (%I64u byte(s) downloaded)" +END + +STRINGTABLE +BEGIN + IDS_ERROR_DOWNLOAD "\nERROR: Download failed.\n" + IDS_ERROR_CODE "\nERROR: %u\n" + IDS_ERROR_FILENAME "\nERROR: Cannot determine filename, please specify a destination file name.\n" + IDS_ERROR_PROTOCOL "\nERROR: Unsupported protocol.\n" +END diff --git a/base/applications/network/dwnl/resource.h b/base/applications/network/dwnl/resource.h new file mode 100644 index 0000000000..a729bc0cda --- /dev/null +++ b/base/applications/network/dwnl/resource.h @@ -0,0 +1,22 @@ +#ifndef RESOURCE_H +#define RESOURCE_H + +#define IDS_USAGE 0 +#define IDS_RESOLVING 1 +#define IDS_DONE 2 +#define IDS_LENGTH_FULL 3 +#define IDS_LENGTH 4 +#define IDS_FILE_SAVED 5 +#define IDS_CONNECTING_TO_FULL 6 +#define IDS_CONNECTING_TO 7 +#define IDS_REDIRECTING_TO 8 +#define IDS_SEND_REQUEST 9 +#define IDS_BYTES_DOWNLOADED 10 +#define IDS_BYTES_DOWNLOADED_FULL 11 + +#define IDS_ERROR_DOWNLOAD 12 +#define IDS_ERROR_CODE 13 +#define IDS_ERROR_FILENAME 14 +#define IDS_ERROR_PROTOCOL 15 + +#endif /* RESOURCE_H */
6 years, 3 months
1
0
0
0
01/01: [NTOSKRNL] Stub IoInitializeCrashDump()
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=108991a6fbae487218812…
commit 108991a6fbae487218812350b1a984887dab084f Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Tue Sep 18 21:42:01 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue Sep 18 21:59:59 2018 +0200 [NTOSKRNL] Stub IoInitializeCrashDump() Also call it from NtCreatePagingFile() when we have successfully created a paging file on the system boot partition. --- ntoskrnl/include/internal/io.h | 6 ++++++ ntoskrnl/io/iomgr/iomgr.c | 8 ++++++++ ntoskrnl/mm/pagefile.c | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index f47768d4a1..83fe7ce3c7 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -797,6 +797,12 @@ IopVerifyDiskSignature( OUT PULONG Signature ); +BOOLEAN +NTAPI +IoInitializeCrashDump( + IN HANDLE PageFileHandle +); + // // Device/Volume Routines // diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c index 47defcab70..292c947036 100644 --- a/ntoskrnl/io/iomgr/iomgr.c +++ b/ntoskrnl/io/iomgr/iomgr.c @@ -651,4 +651,12 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return TRUE; } +BOOLEAN +NTAPI +IoInitializeCrashDump(IN HANDLE PageFileHandle) +{ + UNIMPLEMENTED; + return FALSE; +} + /* EOF */ diff --git a/ntoskrnl/mm/pagefile.c b/ntoskrnl/mm/pagefile.c index 0649f0f2c2..d05580bfbd 100644 --- a/ntoskrnl/mm/pagefile.c +++ b/ntoskrnl/mm/pagefile.c @@ -89,6 +89,8 @@ C_ASSERT(FILE_FROM_ENTRY(0xffffffff) < MAX_PAGING_FILES); static BOOLEAN MmSwapSpaceMessage = FALSE; +static BOOLEAN MmSystemPageFileLocated = FALSE; + /* FUNCTIONS *****************************************************************/ VOID @@ -804,6 +806,11 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, MmSwapSpaceMessage = FALSE; + if (!MmSystemPageFileLocated && BooleanFlagOn(FileObject->DeviceObject->Flags, DO_SYSTEM_BOOT_PARTITION)) + { + MmSystemPageFileLocated = IoInitializeCrashDump(FileHandle); + } + return STATUS_SUCCESS; }
6 years, 3 months
1
0
0
0
01/01: [ADVAPI32][SERVICES] Pass encrypted passwords to the service manager.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e5fcda922b0ad049f2281…
commit e5fcda922b0ad049f22815a6ea1258205fa17927 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Tue Sep 18 21:33:29 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Tue Sep 18 21:33:29 2018 +0200 [ADVAPI32][SERVICES] Pass encrypted passwords to the service manager. - Encrypt passwords before passing them to the service manager. Right now, we are using a fixed encryption key. This will be fixed later. - Replace the calls to ZeroMemory which are used to wipe the password buffers by calls to SecureZeroMemory. --- base/system/services/config.c | 58 +++++++++++++++++++++++++++++++--- dll/win32/advapi32/service/scm.c | 67 +++++++++++++++++++++++++++++++--------- 2 files changed, 106 insertions(+), 19 deletions(-) diff --git a/base/system/services/config.c b/base/system/services/config.c index 14af8e5b0f..4d1f2471c6 100644 --- a/base/system/services/config.c +++ b/base/system/services/config.c @@ -15,6 +15,20 @@ #define NDEBUG #include <debug.h> +struct ustring +{ + DWORD Length; + DWORD MaximumLength; + unsigned char *Buffer; +}; + +NTSTATUS +WINAPI +SystemFunction005( + const struct ustring *in, + const struct ustring *key, + struct ustring *out); + /* FUNCTIONS *****************************************************************/ @@ -684,17 +698,51 @@ ScmDecryptPassword( _In_ DWORD dwPasswordSize, _Out_ PWSTR *pClearTextPassword) { + struct ustring inData, keyData, outData; + PCHAR pszKey = "TestEncryptionKey"; PWSTR pBuffer; + NTSTATUS Status; + + inData.Length = dwPasswordSize; + inData.MaximumLength = inData.Length; + inData.Buffer = pPassword; + + keyData.Length = strlen(pszKey); + keyData.MaximumLength = keyData.Length; + keyData.Buffer = (unsigned char *)pszKey; + + outData.Length = 0; + outData.MaximumLength = 0; + outData.Buffer = NULL; + + /* Get the required buffer size */ + Status = SystemFunction005(&inData, + &keyData, + &outData); + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT1("SystemFunction005 failed (Status 0x%08lx)\n", Status); + return RtlNtStatusToDosError(Status); + } - /* Allocate a buffer for the decrypted password */ - pBuffer = HeapAlloc(GetProcessHeap(), 0, dwPasswordSize); + /* Allocate a buffer for the clear text password */ + pBuffer = HeapAlloc(GetProcessHeap(), 0, outData.Length); if (pBuffer == NULL) return ERROR_OUTOFMEMORY; + outData.MaximumLength = outData.Length; + outData.Buffer = (unsigned char *)pBuffer; + /* Decrypt the password */ - CopyMemory(pBuffer, - pPassword, - dwPasswordSize); + Status = SystemFunction005(&inData, + &keyData, + &outData); + if (!NT_SUCCESS(Status)) + { + DPRINT1("SystemFunction005 failed (Status 0x%08lx)\n", Status); + HeapFree(GetProcessHeap(), 0, pBuffer); + return RtlNtStatusToDosError(Status); + } *pClearTextPassword = pBuffer; diff --git a/dll/win32/advapi32/service/scm.c b/dll/win32/advapi32/service/scm.c index 022864bba9..efa19f2b35 100644 --- a/dll/win32/advapi32/service/scm.c +++ b/dll/win32/advapi32/service/scm.c @@ -12,6 +12,12 @@ #include <advapi32.h> WINE_DEFAULT_DEBUG_CHANNEL(advapi); +NTSTATUS +WINAPI +SystemFunction004( + const struct ustring *in, + const struct ustring *key, + struct ustring *out); /* FUNCTIONS *****************************************************************/ @@ -162,21 +168,54 @@ ScmEncryptPassword( _Out_ PBYTE *pEncryptedPassword, _Out_ PDWORD pEncryptedPasswordSize) { - DWORD dwSize; + struct ustring inData, keyData, outData; + PCHAR pszKey = "TestEncryptionKey"; PBYTE pBuffer; + NTSTATUS Status; + + inData.Length = (wcslen(pClearTextPassword) + 1) * sizeof(WCHAR); + inData.MaximumLength = inData.Length; + inData.Buffer = (unsigned char *)pClearTextPassword; + + keyData.Length = strlen(pszKey); + keyData.MaximumLength = keyData.Length; + keyData.Buffer = (unsigned char *)pszKey; - dwSize = (wcslen(pClearTextPassword) + 1) * sizeof(WCHAR); + outData.Length = 0; + outData.MaximumLength = 0; + outData.Buffer = NULL; - pBuffer = HeapAlloc(GetProcessHeap(), 0, dwSize); + /* Get the required buffer size */ + Status = SystemFunction004(&inData, + &keyData, + &outData); + if (Status != STATUS_BUFFER_TOO_SMALL) + { + ERR("SystemFunction004 failed (Status 0x%08lx)\n", Status); + return RtlNtStatusToDosError(Status); + } + + /* Allocate a buffer for the encrypted password */ + pBuffer = HeapAlloc(GetProcessHeap(), 0, outData.Length); if (pBuffer == NULL) return ERROR_OUTOFMEMORY; - CopyMemory(pBuffer, - pClearTextPassword, - dwSize); + outData.MaximumLength = outData.Length; + outData.Buffer = pBuffer; + + /* Encrypt the password */ + Status = SystemFunction004(&inData, + &keyData, + &outData); + if (!NT_SUCCESS(Status)) + { + ERR("SystemFunction004 failed (Status 0x%08lx)\n", Status); + HeapFree(GetProcessHeap(), 0, pBuffer); + return RtlNtStatusToDosError(Status); + } - *pEncryptedPassword = pBuffer; - *pEncryptedPasswordSize = dwSize; + *pEncryptedPassword = outData.Buffer; + *pEncryptedPasswordSize = outData.Length; return ERROR_SUCCESS; } @@ -395,12 +434,12 @@ done: if (lpPasswordW != NULL) { /* Wipe and release the password buffers */ - ZeroMemory(lpPasswordW, (wcslen(lpPasswordW) + 1) * sizeof(WCHAR)); + SecureZeroMemory(lpPasswordW, (wcslen(lpPasswordW) + 1) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, lpPasswordW); if (lpEncryptedPassword != NULL) { - ZeroMemory(lpEncryptedPassword, dwPasswordSize); + SecureZeroMemory(lpEncryptedPassword, dwPasswordSize); HeapFree(GetProcessHeap(), 0, lpEncryptedPassword); } } @@ -498,7 +537,7 @@ done: if (lpEncryptedPassword != NULL) { /* Wipe and release the password buffer */ - ZeroMemory(lpEncryptedPassword, dwPasswordSize); + SecureZeroMemory(lpEncryptedPassword, dwPasswordSize); HeapFree(GetProcessHeap(), 0, lpEncryptedPassword); } @@ -723,12 +762,12 @@ done: if (lpPasswordW != NULL) { /* Wipe and release the password buffers */ - ZeroMemory(lpPasswordW, (wcslen(lpPasswordW) + 1) * sizeof(WCHAR)); + SecureZeroMemory(lpPasswordW, (wcslen(lpPasswordW) + 1) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, lpPasswordW); if (lpEncryptedPassword != NULL) { - ZeroMemory(lpEncryptedPassword, dwPasswordSize); + SecureZeroMemory(lpEncryptedPassword, dwPasswordSize); HeapFree(GetProcessHeap(), 0, lpEncryptedPassword); } } @@ -837,7 +876,7 @@ done: if (lpEncryptedPassword != NULL) { /* Wipe and release the password buffers */ - ZeroMemory(lpEncryptedPassword, dwPasswordSize); + SecureZeroMemory(lpEncryptedPassword, dwPasswordSize); HeapFree(GetProcessHeap(), 0, lpEncryptedPassword); }
6 years, 3 months
1
0
0
0
01/01: [IDL][LSASRV] Improve the credentials interface a little and update the lsa server code accordingly.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da73c812598b56d137632…
commit da73c812598b56d137632f033afa51a68f022ca4 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Tue Sep 18 15:55:18 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Tue Sep 18 15:55:18 2018 +0200 [IDL][LSASRV] Improve the credentials interface a little and update the lsa server code accordingly. --- dll/win32/lsasrv/lsarpc.c | 42 +++++++++++++++++++++++-------- sdk/include/reactos/idl/lsa.idl | 56 ++++++++++++++++++++++++++++++++++------- 2 files changed, 79 insertions(+), 19 deletions(-) diff --git a/dll/win32/lsasrv/lsarpc.c b/dll/win32/lsasrv/lsarpc.c index 987d9701c6..517b89a23c 100644 --- a/dll/win32/lsasrv/lsarpc.c +++ b/dll/win32/lsasrv/lsarpc.c @@ -1409,7 +1409,7 @@ LsarpOpenAccount( AccountObject); if (!NT_SUCCESS(Status)) { - ERR("LsapOpenDbObject failed (Status 0x%08lx)\n", Status); + ERR("LsapOpenDbObject(Accounts/%S) failed (Status 0x%08lx)\n", SidString, Status); } if (SidString != NULL) @@ -3918,8 +3918,13 @@ NTSTATUS WINAPI CredrReadDomainCredentials( /* Function 65 */ -NTSTATUS WINAPI CredrDelete( - handle_t hBinding) +NTSTATUS +WINAPI +CredrDelete( + handle_t hBinding, + LPWSTR TargetName, + DWORD Type, + DWORD Flags) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; @@ -3927,8 +3932,13 @@ NTSTATUS WINAPI CredrDelete( /* Function 66 */ -NTSTATUS WINAPI CredrGetTargetInfo( - handle_t hBinding) +NTSTATUS +WINAPI +CredrGetTargetInfo( + handle_t hBinding, + LPWSTR TargetName, + DWORD Flags, + CREDPR_TARGET_INFORMATION *TargetInformation) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; @@ -3936,7 +3946,9 @@ NTSTATUS WINAPI CredrGetTargetInfo( /* Function 67 */ -NTSTATUS WINAPI CredrProfileLoaded( +NTSTATUS +WINAPI +CredrProfileLoaded( handle_t hBinding) { UNIMPLEMENTED; @@ -3983,8 +3995,12 @@ NTSTATUS WINAPI LsarLookupNames3( /* Function 69 */ -NTSTATUS WINAPI CredrGetSessionTypes( - handle_t hBinding) +NTSTATUS +WINAPI +CredrGetSessionTypes( + handle_t hBinding, + DWORD MaximumPersistCount, + DWORD *MaximumPersist) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; @@ -4045,8 +4061,14 @@ NTSTATUS WINAPI LsarSetForestTrustInformation( /* Function 75 */ -NTSTATUS WINAPI CredrRename( - handle_t hBinding) +NTSTATUS +WINAPI +CredrRename( + handle_t hBinding, + LPWSTR OldTargetName, + LPWSTR NewTargetName, + DWORD Type, + DWORD Flags) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; diff --git a/sdk/include/reactos/idl/lsa.idl b/sdk/include/reactos/idl/lsa.idl index 93c2bc3d6b..a7be25b1ea 100644 --- a/sdk/include/reactos/idl/lsa.idl +++ b/sdk/include/reactos/idl/lsa.idl @@ -581,6 +581,22 @@ typedef struct _LSA_FOREST_TRUST_COLLISION_INFORMATION { } LSA_FOREST_TRUST_COLLISION_INFORMATION, *PLSA_FOREST_TRUST_COLLISION_INFORMATION; cpp_quote("#endif") + +/* Credentials */ + +typedef struct _CREDPR_TARGET_INFORMATION +{ + LPWSTR TargetName; + LPWSTR NetbiosServerName; + LPWSTR DnsServerName; + LPWSTR NetbiosDomainName; + LPWSTR DnsDomainName; + LPWSTR DnsTreeName; + LPWSTR PackageName; + ULONG Flags; +} CREDPR_TARGET_INFORMATION, *PCREDPR_TARGET_INFORMATION; + + [ uuid(12345778-1234-abcd-ef00-0123456789ab), version(0.0), @@ -1007,15 +1023,27 @@ cpp_quote("#if _WIN32_WINNT >= 0x0501") [in] handle_t hBinding); /* FIXME */ /* Function 65 */ - NTSTATUS __stdcall CredrDelete( - [in] handle_t hBinding); /* FIXME */ + NTSTATUS + __stdcall + CredrDelete( + [in] handle_t hBinding, + [in, unique, string] LPWSTR TargetName, + [in] DWORD Type, + [in] DWORD Flags); /* FIXME */ /* Function 66 */ - NTSTATUS __stdcall CredrGetTargetInfo( - [in] handle_t hBinding); /* FIXME */ + NTSTATUS + __stdcall + CredrGetTargetInfo( + [in] handle_t hBinding, + [in, unique, string] LPWSTR TargetName, + [in] DWORD Flags, + [out] CREDPR_TARGET_INFORMATION *TargetInformation); /* FIXME */ /* Function 67 */ - NTSTATUS __stdcall CredrProfileLoaded( + NTSTATUS + __stdcall + CredrProfileLoaded( [in] handle_t hBinding); /* FIXME */ /* Function 68 */ @@ -1031,8 +1059,12 @@ cpp_quote("#if _WIN32_WINNT >= 0x0501") [in] DWORD ClientRevision); /* Function 69 */ - NTSTATUS __stdcall CredrGetSessionTypes( - [in] handle_t hBinding); /* FIXME */ + NTSTATUS + __stdcall + CredrGetSessionTypes( + [in] handle_t hBinding, + [in] DWORD MaximumPersistCount, + [out, size_is(MaximumPersistCount)] DWORD *MaximumPersist); /* FIXME */ /* Function 70 */ NTSTATUS __stdcall LsarRegisterAuditEvent( @@ -1063,8 +1095,14 @@ cpp_quote("#if _WIN32_WINNT >= 0x0501") [out] PLSA_FOREST_TRUST_COLLISION_INFORMATION *CollisionInfo); /* Function 75 */ - NTSTATUS __stdcall CredrRename( - [in] handle_t hBinding); /* FIXME */ + NTSTATUS + __stdcall + CredrRename( + [in] handle_t hBinding, + [in, unique, string] LPWSTR OldTargetName, + [in, unique, string] LPWSTR NewTargetName, + [in] DWORD Type, + [in] DWORD Flags); /* FIXME */ /* Function 76 */ NTSTATUS __stdcall LsarLookupSids3(
6 years, 3 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
23
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Results per page:
10
25
50
100
200