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
2025
January
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
June 2016
----- 2025 -----
January 2025
----- 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
17 participants
228 discussions
Start a n
N
ew thread
[jimtabor] 71688: [NtUser] - Patch by Victor Matovykh : Remove menu spacing if there is no menu to paint.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Jun 28 15:56:21 2016 New Revision: 71688 URL:
http://svn.reactos.org/svn/reactos?rev=71688&view=rev
Log: [NtUser] - Patch by Victor Matovykh : Remove menu spacing if there is no menu to paint. Modified: trunk/reactos/win32ss/user/ntuser/menu.c Modified: trunk/reactos/win32ss/user/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Tue Jun 28 15:56:21 2016 @@ -2706,7 +2706,13 @@ HFONT hfontOld = 0; PMENU lppop = UserGetMenuObject(UlongToHandle(pWnd->IDMenu)); - if (lppop == NULL || lprect == NULL) + if (lppop == NULL) + { + // No menu. Do not reserve any space + return 0; + } + + if (lprect == NULL) { return UserGetSystemMetrics(SM_CYMENU); }
8 years, 7 months
1
0
0
0
[hbelusca] 71687: [KERNEL32]: Whitespace fixes only, no functional code changes.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Jun 27 22:36:12 2016 New Revision: 71687 URL:
http://svn.reactos.org/svn/reactos?rev=71687&view=rev
Log: [KERNEL32]: Whitespace fixes only, no functional code changes. Modified: trunk/reactos/dll/win32/kernel32/client/dosdev.c Modified: trunk/reactos/dll/win32/kernel32/client/dosdev.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/dosdev.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/dosdev.c [iso-8859-1] Mon Jun 27 22:36:12 2016 @@ -92,7 +92,7 @@ DEV_BROADCAST_VOLUME dbcv; BOOL Result = TRUE; DWORD dwRecipients; - typedef long (WINAPI *BSM_type)(DWORD,LPDWORD,UINT,WPARAM,LPARAM); + typedef long (WINAPI *BSM_type)(DWORD, LPDWORD, UINT, WPARAM, LPARAM); BSM_type BSM_ptr; if ( (dwFlags & 0xFFFFFFF0) || @@ -241,73 +241,62 @@ DWORD ucchMax ) { - UNICODE_STRING DeviceNameU; - UNICODE_STRING TargetPathU; - ANSI_STRING TargetPathA; - DWORD Length; - DWORD CurrentLength; - PWCHAR Buffer; - - if (lpDeviceName) - { - if (!RtlCreateUnicodeStringFromAsciiz (&DeviceNameU, - (LPSTR)lpDeviceName)) - { - SetLastError (ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - } - Buffer = RtlAllocateHeap (RtlGetProcessHeap (), - 0, - ucchMax * sizeof(WCHAR)); - if (Buffer == NULL) - { + UNICODE_STRING DeviceNameU; + UNICODE_STRING TargetPathU; + ANSI_STRING TargetPathA; + DWORD Length; + DWORD CurrentLength; + PWCHAR Buffer; + if (lpDeviceName) { - RtlFreeHeap (RtlGetProcessHeap (), - 0, - DeviceNameU.Buffer); - } - SetLastError (ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - - Length = QueryDosDeviceW (lpDeviceName ? DeviceNameU.Buffer : NULL, - Buffer, - ucchMax); - if (Length != 0) - { - TargetPathA.Buffer = lpTargetPath; - TargetPathU.Buffer = Buffer; - ucchMax = Length; - - while (ucchMax) - { - CurrentLength = min (ucchMax, MAXUSHORT / 2); - TargetPathU.MaximumLength = TargetPathU.Length = (USHORT)CurrentLength * sizeof(WCHAR); - - TargetPathA.Length = 0; - TargetPathA.MaximumLength = (USHORT)CurrentLength; - - RtlUnicodeStringToAnsiString (&TargetPathA, - &TargetPathU, - FALSE); - ucchMax -= CurrentLength; - TargetPathA.Buffer += TargetPathA.Length; - TargetPathU.Buffer += TargetPathU.Length / sizeof(WCHAR); - } - } - - RtlFreeHeap (RtlGetProcessHeap (), - 0, - Buffer); - if (lpDeviceName) - { - RtlFreeHeap (RtlGetProcessHeap (), - 0, - DeviceNameU.Buffer); - } - return Length; + if (!RtlCreateUnicodeStringFromAsciiz(&DeviceNameU, + (LPSTR)lpDeviceName)) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + } + Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, ucchMax * sizeof(WCHAR)); + if (Buffer == NULL) + { + if (lpDeviceName) + { + RtlFreeHeap(RtlGetProcessHeap(), 0, DeviceNameU.Buffer); + } + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + + Length = QueryDosDeviceW(lpDeviceName ? DeviceNameU.Buffer : NULL, + Buffer, ucchMax); + if (Length != 0) + { + TargetPathA.Buffer = lpTargetPath; + TargetPathU.Buffer = Buffer; + ucchMax = Length; + + while (ucchMax) + { + CurrentLength = min(ucchMax, MAXUSHORT / 2); + TargetPathU.MaximumLength = TargetPathU.Length = (USHORT)CurrentLength * sizeof(WCHAR); + + TargetPathA.Length = 0; + TargetPathA.MaximumLength = (USHORT)CurrentLength; + + RtlUnicodeStringToAnsiString(&TargetPathA, &TargetPathU, FALSE); + ucchMax -= CurrentLength; + TargetPathA.Buffer += TargetPathA.Length; + TargetPathU.Buffer += TargetPathU.Length / sizeof(WCHAR); + } + } + + RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); + if (lpDeviceName) + { + RtlFreeHeap(RtlGetProcessHeap(), 0, DeviceNameU.Buffer); + } + return Length; } @@ -322,160 +311,156 @@ DWORD ucchMax ) { - POBJECT_DIRECTORY_INFORMATION DirInfo; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING UnicodeString; - HANDLE DirectoryHandle; - HANDLE DeviceHandle; - ULONG ReturnLength; - ULONG NameLength; - ULONG Length; - ULONG Context; - BOOLEAN RestartScan; - NTSTATUS Status; - UCHAR Buffer[512]; - PWSTR Ptr; - - /* Open the '\??' directory */ - RtlInitUnicodeString (&UnicodeString, - L"\\??"); - InitializeObjectAttributes (&ObjectAttributes, - &UnicodeString, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenDirectoryObject (&DirectoryHandle, - DIRECTORY_QUERY, - &ObjectAttributes); - if (!NT_SUCCESS (Status)) - { - WARN ("NtOpenDirectoryObject() failed (Status %lx)\n", Status); - BaseSetLastNTError (Status); - return 0; - } - - Length = 0; - - if (lpDeviceName != NULL) - { - /* Open the lpDeviceName link object */ - RtlInitUnicodeString (&UnicodeString, - (PWSTR)lpDeviceName); - InitializeObjectAttributes (&ObjectAttributes, - &UnicodeString, - OBJ_CASE_INSENSITIVE, - DirectoryHandle, - NULL); - Status = NtOpenSymbolicLinkObject (&DeviceHandle, - SYMBOLIC_LINK_QUERY, - &ObjectAttributes); - if (!NT_SUCCESS (Status)) - { - WARN ("NtOpenSymbolicLinkObject() failed (Status %lx)\n", Status); - NtClose (DirectoryHandle); - BaseSetLastNTError (Status); - return 0; - } - - /* Query link target */ - UnicodeString.Length = 0; - UnicodeString.MaximumLength = (USHORT)ucchMax * sizeof(WCHAR); - UnicodeString.Buffer = lpTargetPath; - - ReturnLength = 0; - Status = NtQuerySymbolicLinkObject (DeviceHandle, - &UnicodeString, - &ReturnLength); - NtClose (DeviceHandle); - NtClose (DirectoryHandle); - if (!NT_SUCCESS (Status)) - { - WARN ("NtQuerySymbolicLinkObject() failed (Status %lx)\n", Status); - BaseSetLastNTError (Status); - return 0; - } - - TRACE ("ReturnLength: %lu\n", ReturnLength); - TRACE ("TargetLength: %hu\n", UnicodeString.Length); - TRACE ("Target: '%wZ'\n", &UnicodeString); - - Length = UnicodeString.Length / sizeof(WCHAR); - if (Length < ucchMax) - { - /* Append null-charcter */ - lpTargetPath[Length] = UNICODE_NULL; - Length++; + POBJECT_DIRECTORY_INFORMATION DirInfo; + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING UnicodeString; + HANDLE DirectoryHandle; + HANDLE DeviceHandle; + ULONG ReturnLength; + ULONG NameLength; + ULONG Length; + ULONG Context; + BOOLEAN RestartScan; + NTSTATUS Status; + UCHAR Buffer[512]; + PWSTR Ptr; + + /* Open the '\??' directory */ + RtlInitUnicodeString(&UnicodeString, L"\\??"); + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + Status = NtOpenDirectoryObject(&DirectoryHandle, + DIRECTORY_QUERY, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + WARN("NtOpenDirectoryObject() failed (Status %lx)\n", Status); + BaseSetLastNTError(Status); + return 0; + } + + Length = 0; + + if (lpDeviceName != NULL) + { + /* Open the lpDeviceName link object */ + RtlInitUnicodeString(&UnicodeString, (PWSTR)lpDeviceName); + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + OBJ_CASE_INSENSITIVE, + DirectoryHandle, + NULL); + Status = NtOpenSymbolicLinkObject(&DeviceHandle, + SYMBOLIC_LINK_QUERY, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + WARN("NtOpenSymbolicLinkObject() failed (Status %lx)\n", Status); + NtClose(DirectoryHandle); + BaseSetLastNTError(Status); + return 0; + } + + /* Query link target */ + UnicodeString.Length = 0; + UnicodeString.MaximumLength = (USHORT)ucchMax * sizeof(WCHAR); + UnicodeString.Buffer = lpTargetPath; + + ReturnLength = 0; + Status = NtQuerySymbolicLinkObject(DeviceHandle, + &UnicodeString, + &ReturnLength); + NtClose(DeviceHandle); + NtClose(DirectoryHandle); + if (!NT_SUCCESS(Status)) + { + WARN("NtQuerySymbolicLinkObject() failed (Status %lx)\n", Status); + BaseSetLastNTError(Status); + return 0; + } + + TRACE("ReturnLength: %lu\n", ReturnLength); + TRACE("TargetLength: %hu\n", UnicodeString.Length); + TRACE("Target: '%wZ'\n", &UnicodeString); + + Length = UnicodeString.Length / sizeof(WCHAR); + if (Length < ucchMax) + { + /* Append null-charcter */ + lpTargetPath[Length] = UNICODE_NULL; + Length++; + } + else + { + TRACE("Buffer is too small\n"); + BaseSetLastNTError(STATUS_BUFFER_TOO_SMALL); + return 0; + } } else { - TRACE ("Buffer is too small\n"); - BaseSetLastNTError (STATUS_BUFFER_TOO_SMALL); - return 0; - } - } - else - { - RestartScan = TRUE; - Context = 0; - Ptr = lpTargetPath; - DirInfo = (POBJECT_DIRECTORY_INFORMATION)Buffer; - - while (TRUE) - { - Status = NtQueryDirectoryObject (DirectoryHandle, - Buffer, - sizeof (Buffer), - TRUE, - RestartScan, - &Context, - &ReturnLength); - if (!NT_SUCCESS(Status)) - { - if (Status == STATUS_NO_MORE_ENTRIES) - { - /* Terminate the buffer */ - *Ptr = UNICODE_NULL; - Length++; - - Status = STATUS_SUCCESS; - } - else - { - Length = 0; - } - BaseSetLastNTError (Status); - break; - } - - if (!wcscmp (DirInfo->TypeName.Buffer, L"SymbolicLink")) - { - TRACE ("Name: '%wZ'\n", &DirInfo->Name); - - NameLength = DirInfo->Name.Length / sizeof(WCHAR); - if (Length + NameLength + 1 >= ucchMax) - { - Length = 0; - BaseSetLastNTError (STATUS_BUFFER_TOO_SMALL); - break; - } - - memcpy (Ptr, - DirInfo->Name.Buffer, - DirInfo->Name.Length); - Ptr += NameLength; - Length += NameLength; - *Ptr = UNICODE_NULL; - Ptr++; - Length++; - } - - RestartScan = FALSE; - } - - NtClose (DirectoryHandle); - } - - return Length; + RestartScan = TRUE; + Context = 0; + Ptr = lpTargetPath; + DirInfo = (POBJECT_DIRECTORY_INFORMATION)Buffer; + + while (TRUE) + { + Status = NtQueryDirectoryObject(DirectoryHandle, + Buffer, + sizeof(Buffer), + TRUE, + RestartScan, + &Context, + &ReturnLength); + if (!NT_SUCCESS(Status)) + { + if (Status == STATUS_NO_MORE_ENTRIES) + { + /* Terminate the buffer */ + *Ptr = UNICODE_NULL; + Length++; + + Status = STATUS_SUCCESS; + } + else + { + Length = 0; + } + BaseSetLastNTError(Status); + break; + } + + if (!wcscmp(DirInfo->TypeName.Buffer, L"SymbolicLink")) + { + TRACE("Name: '%wZ'\n", &DirInfo->Name); + + NameLength = DirInfo->Name.Length / sizeof(WCHAR); + if (Length + NameLength + 1 >= ucchMax) + { + Length = 0; + BaseSetLastNTError (STATUS_BUFFER_TOO_SMALL); + break; + } + + memcpy(Ptr, DirInfo->Name.Buffer, DirInfo->Name.Length); + Ptr += NameLength; + Length += NameLength; + *Ptr = UNICODE_NULL; + Ptr++; + Length++; + } + + RestartScan = FALSE; + } + + NtClose(DirectoryHandle); + } + + return Length; } /* EOF */
8 years, 7 months
1
0
0
0
[ekohl] 71686: [SERVICES] RSetServiceObjectSecurity: Modify and store a service security descriptor.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Jun 27 22:35:54 2016 New Revision: 71686 URL:
http://svn.reactos.org/svn/reactos?rev=71686&view=rev
Log: [SERVICES] RSetServiceObjectSecurity: Modify and store a service security descriptor. Modified: trunk/reactos/base/system/services/rpcserver.c Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Mon Jun 27 22:35:54 2016 @@ -1441,9 +1441,10 @@ PSERVICE_HANDLE hSvc; PSERVICE lpService; ULONG DesiredAccess = 0; - /* HANDLE hToken = NULL; */ - HKEY hServiceKey; - /* NTSTATUS Status; */ + HANDLE hToken = NULL; + HKEY hServiceKey = NULL; + BOOL bDatabaseLocked = FALSE; + NTSTATUS Status; DWORD dwError; DPRINT("RSetServiceObjectSecurity() called\n"); @@ -1483,14 +1484,14 @@ if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess, DesiredAccess)) { - DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess); + DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess); return ERROR_ACCESS_DENIED; } lpService = hSvc->ServiceEntry; if (lpService == NULL) { - DPRINT("lpService == NULL!\n"); + DPRINT1("lpService == NULL!\n"); return ERROR_INVALID_HANDLE; } @@ -1510,13 +1511,10 @@ RpcRevertToSelf(); #endif - /* Lock the service database exclusive */ - ScmLockDatabaseExclusive(); - -#if 0 + /* Build the new security descriptor */ Status = RtlSetSecurityObject(dwSecurityInformation, (PSECURITY_DESCRIPTOR)lpSecurityDescriptor, - &lpService->lpSecurityDescriptor, + &lpService->pSecurityDescriptor, &ScmServiceMapping, hToken); if (!NT_SUCCESS(Status)) @@ -1524,31 +1522,34 @@ dwError = RtlNtStatusToDosError(Status); goto Done; } -#endif - + + /* Lock the service database exclusive */ + ScmLockDatabaseExclusive(); + bDatabaseLocked = TRUE; + + /* Open the service key */ dwError = ScmOpenServiceKey(lpService->lpServiceName, READ_CONTROL | KEY_CREATE_SUB_KEY | KEY_SET_VALUE, &hServiceKey); if (dwError != ERROR_SUCCESS) goto Done; - UNIMPLEMENTED; - dwError = ERROR_SUCCESS; -// dwError = ScmWriteSecurityDescriptor(hServiceKey, -// lpService->lpSecurityDescriptor); + /* Store the new security descriptor */ + dwError = ScmWriteSecurityDescriptor(hServiceKey, + lpService->pSecurityDescriptor); RegFlushKey(hServiceKey); - RegCloseKey(hServiceKey); Done: - -#if 0 + if (hServiceKey != NULL) + RegCloseKey(hServiceKey); + + /* Unlock service database */ + if (bDatabaseLocked == TRUE) + ScmUnlockDatabase(); + if (hToken != NULL) NtClose(hToken); -#endif - - /* Unlock service database */ - ScmUnlockDatabase(); DPRINT("RSetServiceObjectSecurity() done (Error %lu)\n", dwError);
8 years, 7 months
1
0
0
0
[ekohl] 71685: [RTL] Implement the core functionality of RtlpSetSecurityObject. Still incomplete.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Jun 27 22:25:17 2016 New Revision: 71685 URL:
http://svn.reactos.org/svn/reactos?rev=71685&view=rev
Log: [RTL] Implement the core functionality of RtlpSetSecurityObject. Still incomplete. Modified: trunk/reactos/sdk/lib/rtl/security.c Modified: trunk/reactos/sdk/lib/rtl/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/rtl/security.c?rev…
============================================================================== --- trunk/reactos/sdk/lib/rtl/security.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/rtl/security.c [iso-8859-1] Mon Jun 27 22:25:17 2016 @@ -16,17 +16,187 @@ NTSTATUS NTAPI -RtlpSetSecurityObject(IN PVOID Object, +RtlpSetSecurityObject(IN PVOID Object OPTIONAL, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR ModificationDescriptor, - OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, + IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, IN ULONG AutoInheritFlags, IN ULONG PoolType, IN PGENERIC_MAPPING GenericMapping, IN HANDLE Token OPTIONAL) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + PISECURITY_DESCRIPTOR_RELATIVE pNewSd = NULL; + PSID pOwnerSid = NULL; + PSID pGroupSid = NULL; + PACL pDacl = NULL; + PACL pSacl = NULL; + BOOLEAN Defaulted; + BOOLEAN Present; + ULONG ulOwnerSidSize = 0, ulGroupSidSize = 0; + ULONG ulDaclSize = 0, ulSaclSize = 0; + ULONG ulNewSdSize; + SECURITY_DESCRIPTOR_CONTROL Control = SE_SELF_RELATIVE; + PUCHAR pDest; + NTSTATUS Status = STATUS_SUCCESS; + + DPRINT("RtlpSetSecurityObject()\n"); + + /* Change the Owner SID */ + if (SecurityInformation & OWNER_SECURITY_INFORMATION) + { + Status = RtlGetOwnerSecurityDescriptor(ModificationDescriptor, &pOwnerSid, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + } + else + { + Status = RtlGetOwnerSecurityDescriptor(*ObjectsSecurityDescriptor, &pOwnerSid, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + } + + if (pOwnerSid == NULL || !RtlValidSid(pOwnerSid)) + return STATUS_INVALID_OWNER; + + ulOwnerSidSize = RtlLengthSid(pOwnerSid); + + /* Change the Group SID */ + if (SecurityInformation & GROUP_SECURITY_INFORMATION) + { + Status = RtlGetGroupSecurityDescriptor(ModificationDescriptor, &pGroupSid, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + } + else + { + Status = RtlGetGroupSecurityDescriptor(*ObjectsSecurityDescriptor, &pGroupSid, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + } + + if (pGroupSid == NULL || !RtlValidSid(pGroupSid)) + return STATUS_INVALID_PRIMARY_GROUP; + + ulGroupSidSize = ROUND_UP(RtlLengthSid(pGroupSid), sizeof(ULONG)); + + /* Change the DACL */ + if (SecurityInformation & DACL_SECURITY_INFORMATION) + { + Status = RtlGetDaclSecurityDescriptor(ModificationDescriptor, &Present, &pDacl, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + + Control |= SE_DACL_PRESENT; + } + else + { + Status = RtlGetDaclSecurityDescriptor(*ObjectsSecurityDescriptor, &Present, &pDacl, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + + if (Present) + Control |= SE_DACL_PRESENT; + + if (Defaulted) + Control |= SE_DACL_DEFAULTED; + } + + if (pDacl != NULL) + ulDaclSize = pDacl->AclSize; + + /* Change the SACL */ + if (SecurityInformation & SACL_SECURITY_INFORMATION) + { + Status = RtlGetSaclSecurityDescriptor(ModificationDescriptor, &Present, &pSacl, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + + Control |= SE_SACL_PRESENT; + } + else + { + Status = RtlGetSaclSecurityDescriptor(*ObjectsSecurityDescriptor, &Present, &pSacl, &Defaulted); + if (!NT_SUCCESS(Status)) + return Status; + + if (Present) + Control |= SE_SACL_PRESENT; + + if (Defaulted) + Control |= SE_SACL_DEFAULTED; + } + + if (pSacl != NULL) + ulSaclSize = pSacl->AclSize; + + /* Calculate the size of the new security descriptor */ + ulNewSdSize = sizeof(SECURITY_DESCRIPTOR_RELATIVE) + + ROUND_UP(ulOwnerSidSize, sizeof(ULONG)) + + ROUND_UP(ulGroupSidSize, sizeof(ULONG)) + + ROUND_UP(ulDaclSize, sizeof(ULONG)) + + ROUND_UP(ulSaclSize, sizeof(ULONG)); + + /* Allocate the new security descriptor */ + pNewSd = RtlAllocateHeap(RtlGetProcessHeap(), 0, ulNewSdSize); + if (pNewSd == NULL) + { + Status = STATUS_NO_MEMORY; + DPRINT1("New security descriptor allocation failed (Status 0x%08lx)\n", Status); + goto done; + } + + /* Initialize the new security descriptor */ + Status = RtlCreateSecurityDescriptorRelative(pNewSd, SECURITY_DESCRIPTOR_REVISION); + if (!NT_SUCCESS(Status)) + { + DPRINT1("New security descriptor creation failed (Status 0x%08lx)\n", Status); + goto done; + } + + /* Set the security descriptor control flags */ + pNewSd->Control = Control; + + pDest = (PUCHAR)((ULONG_PTR)pNewSd + sizeof(SECURITY_DESCRIPTOR_RELATIVE)); + + /* Copy the SACL */ + if (pSacl != NULL) + { + RtlCopyMemory(pDest, pSacl, ulSaclSize); + pNewSd->Sacl = (ULONG_PTR)pDest - (ULONG_PTR)pNewSd; + pDest = pDest + ROUND_UP(ulSaclSize, sizeof(ULONG)); + } + + /* Copy the DACL */ + if (pDacl != NULL) + { + RtlCopyMemory(pDest, pDacl, ulDaclSize); + pNewSd->Dacl = (ULONG_PTR)pDest - (ULONG_PTR)pNewSd; + pDest = pDest + ROUND_UP(ulDaclSize, sizeof(ULONG)); + } + + /* Copy the Owner SID */ + RtlCopyMemory(pDest, pOwnerSid, ulOwnerSidSize); + pNewSd->Owner = (ULONG_PTR)pDest - (ULONG_PTR)pNewSd; + pDest = pDest + ROUND_UP(ulOwnerSidSize, sizeof(ULONG)); + + /* Copy the Group SID */ + RtlCopyMemory(pDest, pGroupSid, ulGroupSidSize); + pNewSd->Group = (ULONG_PTR)pDest - (ULONG_PTR)pNewSd; + + /* Free the old security descriptor */ + RtlFreeHeap(RtlGetProcessHeap(), 0, (PVOID)*ObjectsSecurityDescriptor); + + /* Return the new security descriptor */ + *ObjectsSecurityDescriptor = (PSECURITY_DESCRIPTOR)pNewSd; + +done: + if (!NT_SUCCESS(Status)) + { + if (pNewSd != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, pNewSd); + } + + return Status; } NTSTATUS @@ -581,9 +751,9 @@ NTAPI RtlSetSecurityObject(IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR ModificationDescriptor, - OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, + IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, IN PGENERIC_MAPPING GenericMapping, - IN HANDLE Token) + IN HANDLE Token OPTIONAL) { /* Call the internal API */ return RtlpSetSecurityObject(NULL, @@ -603,10 +773,10 @@ NTAPI RtlSetSecurityObjectEx(IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR ModificationDescriptor, - OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, + IN OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, IN ULONG AutoInheritFlags, IN PGENERIC_MAPPING GenericMapping, - IN HANDLE Token) + IN HANDLE Token OPTIONAL) { /* Call the internal API */ return RtlpSetSecurityObject(NULL,
8 years, 7 months
1
0
0
0
[ekohl] 71684: [SERVICES] - Create the absolute default service security descriptor when services.exe starts up. - Create a self-relative security descriptor whenever it is needed.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Jun 27 22:19:19 2016 New Revision: 71684 URL:
http://svn.reactos.org/svn/reactos?rev=71684&view=rev
Log: [SERVICES] - Create the absolute default service security descriptor when services.exe starts up. - Create a self-relative security descriptor whenever it is needed. Modified: trunk/reactos/base/system/services/security.c Modified: trunk/reactos/base/system/services/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/secur…
============================================================================== --- trunk/reactos/base/system/services/security.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/security.c [iso-8859-1] Mon Jun 27 22:19:19 2016 @@ -18,6 +18,11 @@ static PSID pAuthenticatedUserSid = NULL; static PSID pAliasAdminsSid = NULL; +static PACL pDefaultDacl = NULL; +static PACL pDefaultSacl = NULL; + +static PSECURITY_DESCRIPTOR pDefaultSD = NULL; + /* FUNCTIONS ****************************************************************/ @@ -100,18 +105,11 @@ } -DWORD -ScmCreateDefaultServiceSD( - PSECURITY_DESCRIPTOR *ppSecurityDescriptor) -{ - PSECURITY_DESCRIPTOR pServiceSD = NULL; - PSECURITY_DESCRIPTOR pRelativeSD = NULL; - PACL pDacl = NULL; - PACL pSacl = NULL; +static +DWORD +ScmCreateAcls(VOID) +{ ULONG ulLength; - DWORD dwBufferLength = 0; - NTSTATUS Status; - DWORD dwError = ERROR_SUCCESS; /* Create DACL */ ulLength = sizeof(ACL) + @@ -119,28 +117,25 @@ (sizeof(ACE) + RtlLengthSid(pAliasAdminsSid)) + (sizeof(ACE) + RtlLengthSid(pAuthenticatedUserSid)); - pDacl = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, ulLength); - if (pDacl == NULL) - { - dwError = ERROR_OUTOFMEMORY; - goto done; - } - - RtlCreateAcl(pDacl, ulLength, ACL_REVISION); - - RtlAddAccessAllowedAce(pDacl, + pDefaultDacl = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, ulLength); + if (pDefaultDacl == NULL) + return ERROR_OUTOFMEMORY; + + RtlCreateAcl(pDefaultDacl, ulLength, ACL_REVISION); + + RtlAddAccessAllowedAce(pDefaultDacl, ACL_REVISION, READ_CONTROL | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_INTERROGATE | SERVICE_PAUSE_CONTINUE | SERVICE_QUERY_CONFIG | SERVICE_QUERY_STATUS | SERVICE_START | SERVICE_STOP | SERVICE_USER_DEFINED_CONTROL, pLocalSystemSid); - RtlAddAccessAllowedAce(pDacl, + RtlAddAccessAllowedAce(pDefaultDacl, ACL_REVISION, SERVICE_ALL_ACCESS, pAliasAdminsSid); - RtlAddAccessAllowedAce(pDacl, + RtlAddAccessAllowedAce(pDefaultDacl, ACL_REVISION, READ_CONTROL | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_INTERROGATE | SERVICE_QUERY_CONFIG | SERVICE_QUERY_STATUS | SERVICE_USER_DEFINED_CONTROL, @@ -150,79 +145,103 @@ ulLength = sizeof(ACL) + (sizeof(ACE) + RtlLengthSid(pNullSid)); - pSacl = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, ulLength); - if (pSacl == NULL) - { - dwError = ERROR_OUTOFMEMORY; - goto done; - } - - RtlCreateAcl(pSacl, ulLength, ACL_REVISION); - - RtlAddAuditAccessAce(pSacl, + pDefaultSacl = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, ulLength); + if (pDefaultSacl == NULL) + return ERROR_OUTOFMEMORY; + + RtlCreateAcl(pDefaultSacl, ulLength, ACL_REVISION); + + RtlAddAuditAccessAce(pDefaultSacl, ACL_REVISION, SERVICE_ALL_ACCESS, pNullSid, FALSE, TRUE); + return ERROR_SUCCESS; +} + + +static +VOID +ScmFreeAcls(VOID) +{ + if (pDefaultDacl != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, pDefaultDacl); + + if (pDefaultSacl != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, pDefaultSacl); +} + + +static +DWORD +ScmCreateDefaultSD(VOID) +{ + NTSTATUS Status; + /* Create the absolute security descriptor */ - pServiceSD = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SECURITY_DESCRIPTOR)); - if (pServiceSD == NULL) - { - dwError = ERROR_OUTOFMEMORY; - goto done; - } - DPRINT("pServiceSD %p\n", pServiceSD); - - Status = RtlCreateSecurityDescriptor(pServiceSD, + pDefaultSD = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SECURITY_DESCRIPTOR)); + if (pDefaultSD == NULL) + return ERROR_OUTOFMEMORY; + + DPRINT("pDefaultSD %p\n", pDefaultSD); + + Status = RtlCreateSecurityDescriptor(pDefaultSD, SECURITY_DESCRIPTOR_REVISION); if (!NT_SUCCESS(Status)) - { - dwError = RtlNtStatusToDosError(Status); - goto done; - } - - Status = RtlSetOwnerSecurityDescriptor(pServiceSD, + return RtlNtStatusToDosError(Status); + + Status = RtlSetOwnerSecurityDescriptor(pDefaultSD, pLocalSystemSid, FALSE); if (!NT_SUCCESS(Status)) - { - dwError = RtlNtStatusToDosError(Status); - goto done; - } - - Status = RtlSetGroupSecurityDescriptor(pServiceSD, + return RtlNtStatusToDosError(Status); + + Status = RtlSetGroupSecurityDescriptor(pDefaultSD, pLocalSystemSid, FALSE); if (!NT_SUCCESS(Status)) - { - dwError = RtlNtStatusToDosError(Status); - goto done; - } - - Status = RtlSetDaclSecurityDescriptor(pServiceSD, + return RtlNtStatusToDosError(Status); + + Status = RtlSetDaclSecurityDescriptor(pDefaultSD, TRUE, - pDacl, + pDefaultDacl, FALSE); if (!NT_SUCCESS(Status)) - { - dwError = RtlNtStatusToDosError(Status); - goto done; - } - - Status = RtlSetSaclSecurityDescriptor(pServiceSD, + return RtlNtStatusToDosError(Status); + + Status = RtlSetSaclSecurityDescriptor(pDefaultSD, TRUE, - pSacl, + pDefaultSacl, FALSE); if (!NT_SUCCESS(Status)) - { - dwError = RtlNtStatusToDosError(Status); - goto done; - } + return RtlNtStatusToDosError(Status); + + return ERROR_SUCCESS; +} + + +static +VOID +ScmFreeDefaultSD(VOID) +{ + if (pDefaultSD != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, pDefaultSD); +} + + +DWORD +ScmCreateDefaultServiceSD( + PSECURITY_DESCRIPTOR *ppSecurityDescriptor) +{ + PSECURITY_DESCRIPTOR pRelativeSD = NULL; + DWORD dwBufferLength = 0; + NTSTATUS Status; + DWORD dwError = ERROR_SUCCESS; /* Convert the absolute SD to a self-relative SD */ - Status = RtlAbsoluteToSelfRelativeSD(pServiceSD, + Status = RtlAbsoluteToSelfRelativeSD(pDefaultSD, NULL, &dwBufferLength); if (Status != STATUS_BUFFER_TOO_SMALL) @@ -243,7 +262,7 @@ } DPRINT("pRelativeSD %p\n", pRelativeSD); - Status = RtlAbsoluteToSelfRelativeSD(pServiceSD, + Status = RtlAbsoluteToSelfRelativeSD(pDefaultSD, pRelativeSD, &dwBufferLength); if (!NT_SUCCESS(Status)) @@ -260,15 +279,6 @@ if (pRelativeSD != NULL) RtlFreeHeap(RtlGetProcessHeap(), 0, pRelativeSD); } - - if (pServiceSD != NULL) - RtlFreeHeap(RtlGetProcessHeap(), 0, pServiceSD); - - if (pSacl != NULL) - RtlFreeHeap(RtlGetProcessHeap(), 0, pSacl); - - if (pDacl != NULL) - RtlFreeHeap(RtlGetProcessHeap(), 0, pDacl); return dwError; } @@ -283,6 +293,14 @@ if (dwError != ERROR_SUCCESS) return dwError; + dwError = ScmCreateAcls(); + if (dwError != ERROR_SUCCESS) + return dwError; + + dwError = ScmCreateDefaultSD(); + if (dwError != ERROR_SUCCESS) + return dwError; + return ERROR_SUCCESS; } @@ -290,6 +308,8 @@ VOID ScmShutdownSecurity(VOID) { + ScmFreeDefaultSD(); + ScmFreeAcls(); ScmFreeSids(); }
8 years, 7 months
1
0
0
0
[hbelusca] 71683: [SUBST]: Fix help message indentation in different languages.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Jun 27 20:10:59 2016 New Revision: 71683 URL:
http://svn.reactos.org/svn/reactos?rev=71683&view=rev
Log: [SUBST]: Fix help message indentation in different languages. Modified: trunk/reactos/base/system/subst/lang/bg-BG.rc trunk/reactos/base/system/subst/lang/en-US.rc trunk/reactos/base/system/subst/lang/es-ES.rc trunk/reactos/base/system/subst/lang/fr-FR.rc trunk/reactos/base/system/subst/lang/it-IT.rc trunk/reactos/base/system/subst/lang/pl-PL.rc trunk/reactos/base/system/subst/lang/ro-RO.rc trunk/reactos/base/system/subst/lang/ru-RU.rc trunk/reactos/base/system/subst/lang/sq-AL.rc trunk/reactos/base/system/subst/lang/uk-UA.rc Modified: trunk/reactos/base/system/subst/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/bg-…
============================================================================== --- trunk/reactos/base/system/subst/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/bg-BG.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -7,9 +7,12 @@ IDS_INVALID_PARAMETER2 "ÐедопÑÑÑим клÑÑ - %s\n" IDS_DRIVE_ALREADY_SUBSTED "УÑÑÑойÑÑвоÑо веÑе е подложено на SUBST\n" IDS_FAILED_WITH_ERRORCODE "ÐÑеÑка номеÑ: 0x%x: %s\n" - IDS_USAGE "ÐбвÑÑзва пÑÑ Ñ Ð¸Ð¼Ðµ на ÑÑÑÑойÑÑво (дÑл).\n\nSUBST [drive1: [drive2:]path]\nSUBST drive1: /D\n\n drive1: \ - Указва мнимоÑо ÑÑÑÑойÑÑво и пÑÑа, Ñ ÐºÐ¾Ð¹Ñо иÑкаÑе да обвÑÑжеÑе пÑÑÑ.\n \ - [drive2:]path Указва дейÑÑвиÑелно ÑÑÑÑойÑÑво и пÑÑÑ, Ñ ÐºÐ¾Ð¹Ñо иÑкаÑе да обвÑÑжеÑе\n \ - мнимо ÑÑÑÑойÑÑво.\n /D \ - ÐзÑÑива замеÑÑеноÑо (мнимо) ÑÑÑÑойÑÑво.\n\nÐапиÑеÑе âSUBSTâ без клÑÑове, за да Ñе изведе ÑпиÑÑк Ñ ÑекÑÑиÑе мними ÑÑÑÑойÑÑва.\n" + IDS_USAGE "ÐбвÑÑзва пÑÑ Ñ Ð¸Ð¼Ðµ на ÑÑÑÑойÑÑво (дÑл).\n\n\ +SUBST [drive1: [drive2:]path]\n\ +SUBST drive1: /D\n\n\ + drive1: Указва мнимоÑо ÑÑÑÑойÑÑво и пÑÑа, Ñ ÐºÐ¾Ð¹Ñо иÑкаÑе да обвÑÑжеÑе пÑÑÑ.\n\ + [drive2:]path Указва дейÑÑвиÑелно ÑÑÑÑойÑÑво и пÑÑÑ, Ñ ÐºÐ¾Ð¹Ñо иÑкаÑе да обвÑÑжеÑе\n\ + мнимо ÑÑÑÑойÑÑво.\n\ + /D ÐзÑÑива замеÑÑеноÑо (мнимо) ÑÑÑÑойÑÑво.\n\n\ +ÐапиÑеÑе âSUBSTâ без клÑÑове, за да Ñе изведе ÑпиÑÑк Ñ ÑекÑÑиÑе мними ÑÑÑÑойÑÑва.\n" END Modified: trunk/reactos/base/system/subst/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/en-…
============================================================================== --- trunk/reactos/base/system/subst/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/en-US.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -11,7 +11,8 @@ SUBST [drive1: [drive2:]path]\n\ SUBST drive1: /D\n\n\ drive1: Specifies a virtual drive to which you want to assign a path.\n\ - [drive2:]path Specifies a physical drive and path you want to assign to\n a virtual drive.\n\ + [drive2:]path Specifies a physical drive and path you want to assign to\n\ + a virtual drive.\n\ /D Deletes a substituted (virtual) drive.\n\n\ Type SUBST with no parameters to display a list of current virtual drives.\n" END Modified: trunk/reactos/base/system/subst/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/es-…
============================================================================== --- trunk/reactos/base/system/subst/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/es-ES.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -11,7 +11,8 @@ SUBST [unidad1: [unidad2:]ruta]\n\ SUBST unidad1: /D\n\n\ unidad1: Especifica una unidad virtual a la cual se quiere asignar una ruta.\n\ - [unidad2:]ruta Especifica una unidad fÃsica y una ruta a la cual asignar\n una unidad virtual.\n\ + [unidad2:]ruta Especifica una unidad fÃsica y una ruta a la cual asignar\n\ + una unidad virtual.\n\ /D Elimina una unidad (virtual) substituida.\n\n\ Escribir SUBST sin parámetros para mostrar una lista de las unidades virtuales actuales.\n" END Modified: trunk/reactos/base/system/subst/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/fr-…
============================================================================== --- trunk/reactos/base/system/subst/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/fr-FR.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -9,9 +9,9 @@ IDS_FAILED_WITH_ERRORCODE "Ãchoue avec le code d'erreur 0x%x: %s\n" IDS_USAGE "Associe un chemin avec une lettre de lecteur.\n\n\ SUBST [disque1: [disque2:]chemin]\n\ -SUBST dique1: /D\n\n\ -disque1: Lecteur virtuel auquel vous voulez affecter un chemin.\n\ -[disque2:]chemin Disque physique/chemin attribués à un disque virtuel.\n\ -/D Supprime un disque (virtuel) substitué.\n\n\ +SUBST disque1: /D\n\n\ + disque1: Lecteur virtuel auquel vous voulez affecter un chemin.\n\ + [disque2:]chemin Disque physique/chemin attribués à un disque virtuel.\n\ + /D Supprime un disque (virtuel) substitué.\n\n\ Tapez SUBST sans paramètre pour afficher la liste des lecteurs virtuels.\n" END Modified: trunk/reactos/base/system/subst/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/it-…
============================================================================== --- trunk/reactos/base/system/subst/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/it-IT.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -10,8 +10,9 @@ IDS_USAGE "Associa un percorso ad una lettera di unità .\n\n\ SUBST [unità 1: [unità 2:]percorso]\n\ SUBST unità 1: /D\n\n\ - unità 1: Specifica un'unità virtuale alla quale assegnare un percorso.\n\ - [unità 2:]percorso Specifica un'unità fisica e un percorso da assegnare ad una\n unità virtuale.\n\ - /D Elimina un'unità (virtuale) sostituita.\n\n\ + unità 1: Specifica un'unità virtuale alla quale assegnare un percorso.\n\ + [unità 2:]percorso Specifica un'unità fisica e un percorso da assegnare ad una\n\ + unità virtuale.\n\ + /D Elimina un'unità (virtuale) sostituita.\n\n\ Digitare SUBST senza parametri per mostrare un elenco delle unità virtuali attuali.\n" END Modified: trunk/reactos/base/system/subst/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/pl-…
============================================================================== --- trunk/reactos/base/system/subst/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/pl-PL.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -18,8 +18,9 @@ IDS_USAGE "PowiÄ zuje ÅcieżkÄ z literÄ napÄdu.\n\n\ SUBST [napÄd1: [napÄd2:]Åcieżka]\n\ SUBST napÄd1: /D\n\n\ - napÄd1: OkreÅla wirutalny napÄd do litery któreego chcesz powiÄ zaÄ ÅcieżkÄ.\n\ - [napÄd2:]Åcieżka OkreÅla istniejÄ cÄ ÅcieżkÄ, którÄ chcesz powiÄ zaÄ z literÄ napÄdu \n wirtualnego.\n\ - /D Kasuje aktywny (wirtualny) napÄd.\n\n\ + napÄd1: OkreÅla wirutalny napÄd do litery któreego chcesz powiÄ zaÄ ÅcieżkÄ.\n\ + [napÄd2:]Åcieżka OkreÅla istniejÄ cÄ ÅcieżkÄ, którÄ chcesz powiÄ zaÄ z literÄ napÄdu\n\ + wirtualnego.\n\ + /D Kasuje aktywny (wirtualny) napÄd.\n\n\ Użycie SUBST bez żadnych parametrów wyÅwietla aktualnÄ listÄ napÄdów wirtualnych.\n" END Modified: trunk/reactos/base/system/subst/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/ro-…
============================================================================== --- trunk/reactos/base/system/subst/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/ro-RO.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -12,9 +12,9 @@ IDS_USAGE "Substituie un director cu o unitate de stocare.\n\n\ SUBST [unitate1: [unitate2:]cale]\n\ SUBST unitate1: /D\n\n\ - unitate1: Unitatea virtualÄ ce va fi asociatÄ directorului.\n\ - [unitate:]cale Unitatea fizicÄ Èi calea directorului substituit\n\ - cu unitatea virtualÄ.\n\ - /D Èterge o unitate (virtualÄ) de substituÈie.\n\n\ + unitate1: Unitatea virtualÄ ce va fi asociatÄ directorului.\n\ + [unitate:]cale Unitatea fizicÄ Èi calea directorului substituit\n\ + cu unitatea virtualÄ.\n\ + /D Èterge o unitate (virtualÄ) de substituÈie.\n\n\ TastaÈi SUBST fÄrÄ argumente pentru a enumera unitÄÈile virtuale curente.\n" END Modified: trunk/reactos/base/system/subst/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/ru-…
============================================================================== --- trunk/reactos/base/system/subst/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/ru-RU.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -12,8 +12,9 @@ IDS_USAGE "СопоÑÑавление имени диÑка ÑÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð¼Ñ Ð¿ÑÑи.\n\n\ SUBST [диÑк1: [диÑк2:]пÑÑÑ]\n\ SUBST диÑк1: /D\n\n\ - диÑк1: ÐиÑÑÑалÑнÑй диÑк, коÑоÑÑй ÑопоÑÑавлÑеÑÑÑ ÑÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð¼Ñ Ð¿ÑÑи.\n\ - [диÑк:]пÑÑÑ Ð¤Ð¸Ð·Ð¸ÑеÑкие диÑк и пÑÑÑ,\n коÑоÑÑм ÑопоÑÑавлÑеÑÑÑ Ð²Ð¸ÑÑÑалÑнÑй диÑк.\n\ - /D Удаление Ñанее Ñозданного виÑÑÑалÑного диÑка.\n\n\ + диÑк1: ÐиÑÑÑалÑнÑй диÑк, коÑоÑÑй ÑопоÑÑавлÑеÑÑÑ ÑÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð¼Ñ Ð¿ÑÑи.\n\ + [диÑк:]пÑÑÑ Ð¤Ð¸Ð·Ð¸ÑеÑкие диÑк и пÑÑÑ,\n\ + коÑоÑÑм ÑопоÑÑавлÑеÑÑÑ Ð²Ð¸ÑÑÑалÑнÑй диÑк.\n\ + /D Удаление Ñанее Ñозданного виÑÑÑалÑного диÑка.\n\n\ ÐведиÑе SUBST без паÑамеÑÑов Ð´Ð»Ñ Ð²Ñвода ÑекÑÑего ÑпиÑка виÑÑÑалÑнÑÑ Ð´Ð¸Ñков.\n" END Modified: trunk/reactos/base/system/subst/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/sq-…
============================================================================== --- trunk/reactos/base/system/subst/lang/sq-AL.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/sq-AL.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -15,7 +15,8 @@ SUBST [drive1: [drive2:]path]\n\ SUBST drive1: /D\n\n\ drive1: Përcakton një drive virtual për të cilën ju doni të caktojë një rrugë.\n\ - [drive2:]path Përcakton një drive fizik dhe rrugen qe doni te percaktoni\nnje driveri virtual.\n\ + [drive2:]path Përcakton një drive fizik dhe rrugen qe doni te percaktoni\n\ + një driveri virtual.\n\ /D Fshin një zëvendesus (virtual) drive.\n\n\ Shkruaj SUBST pa parametra per te shfaqur një liste e drivera virtual aktual.\n" END Modified: trunk/reactos/base/system/subst/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/uk-…
============================================================================== --- trunk/reactos/base/system/subst/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/uk-UA.rc [iso-8859-1] Mon Jun 27 20:10:59 2016 @@ -13,7 +13,8 @@ SUBST [диÑк1: [диÑк2:]ÑлÑÑ ]\n\ SUBST диÑк1: /D\n\n\ диÑк1: ÐизнаÑÐ°Ñ Ð²ÑÑÑÑалÑний диÑк, на Ñкий ви Ñ Ð¾ÑеÑе пÑизнаÑиÑи ÑлÑÑ .\n\ - [диÑк2:]ÑлÑÑ ÐизнаÑÐ°Ñ ÑÑзиÑний диÑк Ñа ÑлÑÑ , Ñкий ви Ñ Ð¾ÑеÑе пÑизнаÑиÑи\n Ð´Ð»Ñ Ð²ÑÑÑÑалÑного диÑкÑ.\n\ + [диÑк2:]ÑлÑÑ ÐизнаÑÐ°Ñ ÑÑзиÑний диÑк Ñа ÑлÑÑ , Ñкий ви Ñ Ð¾ÑеÑе пÑизнаÑиÑи\n\ + Ð´Ð»Ñ Ð²ÑÑÑÑалÑного диÑкÑ.\n\ /D ÐидалÑÑ Ð¿ÑдÑÑавлений (вÑÑÑÑалÑний) диÑк.\n\n\ ÐведÑÑÑ SUBST без паÑамеÑÑÑв Ð´Ð»Ñ Ð²ÑдобÑÐ°Ð¶ÐµÐ½Ð½Ñ ÑпиÑÐºÑ Ð¿Ð¾ÑоÑÐ½Ð¸Ñ Ð²ÑÑÑÑалÑÐ½Ð¸Ñ Ð´Ð¸ÑкÑв.\n" END
8 years, 7 months
1
0
0
0
[hbelusca] 71682: [SHELL32]: Adjust the size of the static text in the logoff dialog, for German language. Patch by 'reactosfanboy'. CORE-11446 #resolve #comment Thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Jun 27 19:44:20 2016 New Revision: 71682 URL:
http://svn.reactos.org/svn/reactos?rev=71682&view=rev
Log: [SHELL32]: Adjust the size of the static text in the logoff dialog, for German language. Patch by 'reactosfanboy'. CORE-11446 #resolve #comment Thanks! Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] Mon Jun 27 19:44:20 2016 @@ -481,7 +481,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SHELL_LOGOFF, IDC_STATIC, 7, 7, 20, 20 - LTEXT "Sind Sie sicher, dass Sie sich abmelden wollen?", -1, 35, 16, 146, 8 + LTEXT "Sind Sie sicher, dass Sie sich abmelden wollen?", -1, 35, 16, 166, 8 DEFPUSHBUTTON "&Abmelden", IDOK, 41, 39, 50, 14 PUSHBUTTON "Abbrechen", IDCANCEL, 95, 39, 50, 14 END
8 years, 7 months
1
0
0
0
[apriyadarshi] 71681: Next: Interrupt Handler for completed FIS commands. Notes.txt
by apriyadarshi@svn.reactos.org
Author: apriyadarshi Date: Mon Jun 27 12:58:04 2016 New Revision: 71681 URL:
http://svn.reactos.org/svn/reactos?rev=71681&view=rev
Log: Next: Interrupt Handler for completed FIS commands. Notes.txt Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/Notes.txt branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.rc Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/Notes.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/Notes.txt [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/Notes.txt [iso-8859-1] Mon Jun 27 12:58:04 2016 @@ -24,11 +24,12 @@ AhciInterruptHandler Flags - IMPLEMENTED + NOT_IMPLEMENTED TESTED Comment Fatal Error not supported Error Recovery not supported + Complete Request Routine AhciHwInterrupt Flags @@ -70,9 +71,9 @@ AhciATA_CFIS Flags - NOT_IMPLEMENTED + IMPLEMENTED Comment - Need to configure command table according to Srb function + Need to implement NCQ AhciATAPI_CFIS Flags @@ -95,9 +96,9 @@ AhciActivatePort Flags - NOT_IMPLEMENTED + IMPLEMENTED Comment - NONE + NCQ not supported AhciProcessIO Flags Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] Mon Jun 27 12:58:04 2016 @@ -77,6 +77,13 @@ StorPortWriteRegisterUlong(adapterExtension, &PortExtension->Port->FBU, receivedFISPhysical.HighPart); } + PortExtension->IdentifyDeviceDataPhysicalAddress = StorPortGetPhysicalAddress(adapterExtension, + NULL, + PortExtension->IdentifyDeviceData, + &mappedLength); + + NT_ASSERT(mappedLength == sizeof(IDENTIFY_DEVICE_DATA)); + // set device power state flag to D0 PortExtension->DevicePowerState = StorPowerDeviceD0; @@ -107,7 +114,7 @@ ) { PVOID portsExtension = NULL; - PCHAR nonCachedExtension; + PCHAR nonCachedExtension, tmp; ULONG status, index, NCS, AlignedNCS; ULONG portCount, portImplemented, nonCachedExtensionSize; @@ -130,7 +137,8 @@ AdapterExtension->PortCount = portCount; nonCachedExtensionSize = sizeof(AHCI_COMMAND_HEADER) * AlignedNCS + //should be 1K aligned - sizeof(AHCI_RECEIVED_FIS); + sizeof(AHCI_RECEIVED_FIS) + + sizeof(IDENTIFY_DEVICE_DATA); // align nonCachedExtensionSize to 1024 nonCachedExtensionSize = ROUND_UP(nonCachedExtensionSize, 1024); @@ -157,7 +165,11 @@ AdapterExtension->PortExtension[index].IsActive = TRUE; AdapterExtension->PortExtension[index].AdapterExtension = AdapterExtension; AdapterExtension->PortExtension[index].CommandList = nonCachedExtension; - AdapterExtension->PortExtension[index].ReceivedFIS = (PAHCI_RECEIVED_FIS)(nonCachedExtension + sizeof(AHCI_COMMAND_HEADER) * AlignedNCS); + + tmp = (PCHAR)(nonCachedExtension + sizeof(AHCI_COMMAND_HEADER) * AlignedNCS); + + AdapterExtension->PortExtension[index].ReceivedFIS = (PAHCI_RECEIVED_FIS)tmp; + AdapterExtension->PortExtension[index].IdentifyDeviceData = (PIDENTIFY_DEVICE_DATA)(tmp + sizeof(AHCI_RECEIVED_FIS)); nonCachedExtension += nonCachedExtensionSize; } } @@ -219,7 +231,7 @@ __in PAHCI_PORT_EXTENSION PortExtension ) { - ULONG IS; + ULONG is, ci, sact, outstanding; AHCI_INTERRUPT_STATUS PxIS; AHCI_INTERRUPT_STATUS PxISMasked; PAHCI_ADAPTER_EXTENSION AdapterExtension; @@ -283,8 +295,18 @@ // 10.7.1.1 // Clear port interrupt // It is set by the level of the virtual interrupt line being a set, and cleared by a write of â1â from the software. - IS = (1 << PortExtension->PortNumber); - StorPortWriteRegisterUlong(AdapterExtension, AdapterExtension->IS, IS); + is = (1 << PortExtension->PortNumber); + StorPortWriteRegisterUlong(AdapterExtension, AdapterExtension->IS, is); + + ci = StorPortReadRegisterUlong(AdapterExtension, &PortExtension->Port->CI); + sact = StorPortReadRegisterUlong(AdapterExtension, &PortExtension->Port->SACT); + + outstanding = ci | sact; // NOTE: Including both non-NCQ and NCQ based commands + if ((PortExtension->CommandIssuedSlots & (~outstanding)) != 0) + { + DebugPrint("\tCompleted Commands: %d\n", (PortExtension->CommandIssuedSlots & (~outstanding))); + PortExtension->CommandIssuedSlots &= outstanding; + } return; }// -- AhciInterruptHandler(); @@ -741,7 +763,7 @@ /** * @name AhciATA_CFIS - * @not_implemented + * @implemented * * create ATA CFIS from Srb * @@ -755,8 +777,33 @@ __in PAHCI_SRB_EXTENSION SrbExtension ) { + PAHCI_COMMAND_TABLE cmdTable; + DebugPrint("AhciATA_CFIS()\n"); + cmdTable = (PAHCI_COMMAND_TABLE)SrbExtension; + + NT_ASSERT(sizeof(cmdTable->CFIS) == 64); + + AhciZeroMemory(&cmdTable->CFIS, sizeof(cmdTable->CFIS)); + + cmdTable->CFIS[AHCI_ATA_CFIS_FisType] = 0x27; // FIS Type + cmdTable->CFIS[AHCI_ATA_CFIS_PMPort_C] = (1 << 7); // PM Port & C + cmdTable->CFIS[AHCI_ATA_CFIS_CommandReg] = SrbExtension->CommandReg; + + cmdTable->CFIS[AHCI_ATA_CFIS_FeaturesLow] = SrbExtension->FeaturesLow; + cmdTable->CFIS[AHCI_ATA_CFIS_LBA0] = SrbExtension->LBA0; + cmdTable->CFIS[AHCI_ATA_CFIS_LBA1] = SrbExtension->LBA1; + cmdTable->CFIS[AHCI_ATA_CFIS_LBA2] = SrbExtension->LBA2; + cmdTable->CFIS[AHCI_ATA_CFIS_Device] = SrbExtension->Device; + cmdTable->CFIS[AHCI_ATA_CFIS_LBA3] = SrbExtension->LBA3; + cmdTable->CFIS[AHCI_ATA_CFIS_LBA4] = SrbExtension->LBA4; + cmdTable->CFIS[AHCI_ATA_CFIS_LBA5] = SrbExtension->LBA5; + cmdTable->CFIS[AHCI_ATA_CFIS_FeaturesHigh] = SrbExtension->FeaturesHigh; + cmdTable->CFIS[AHCI_ATA_CFIS_SectorCountLow] = SrbExtension->SectorCountLow; + cmdTable->CFIS[AHCI_ATA_CFIS_SectorCountHigh] = SrbExtension->SectorCountHigh; + + return; }// -- AhciATA_CFIS(); /** @@ -934,13 +981,13 @@ } // mark this slot - PortExtension->OccupiedSlots |= SlotIndex; + PortExtension->QueueSlots |= SlotIndex; return; }// -- AhciProcessSrb(); /** * @name AhciActivatePort - * @not_implemented + * @implemented * * Program Port and populate command list * @@ -952,7 +999,39 @@ __in PAHCI_PORT_EXTENSION PortExtension ) { + ULONG cmd, QueueSlots, slotToActivate, tmp; + PAHCI_ADAPTER_EXTENSION AdapterExtension; + DebugPrint("AhciActivatePort()\n"); + + AdapterExtension = PortExtension->AdapterExtension; + QueueSlots = PortExtension->QueueSlots; + + if (QueueSlots == 0) + return; + + // section 3.3.14 + // Bits in this field shall only be set to â1â by software when PxCMD.ST is set to â1â + cmd = StorPortReadRegisterUlong(AdapterExtension, &PortExtension->Port->CMD); + + if ((cmd&1) == 0) // PxCMD.ST == 0 + return; + + // get the lowest set bit + tmp = QueueSlots & (QueueSlots - 1); + + if (tmp == 0) + slotToActivate = QueueSlots; + else + slotToActivate = (QueueSlots & (~tmp)); + + // mark that bit off in QueueSlots + PortExtension->QueueSlots &= ~slotToActivate; + // mark this CommandIssuedSlots + PortExtension->CommandIssuedSlots |= slotToActivate; + + // tell the HBA to issue this Command Slot to the given port + StorPortWriteRegisterUlong(AdapterExtension, &PortExtension->Port->CI, slotToActivate); return; }// -- AhciActivatePort(); @@ -999,7 +1078,7 @@ // Acquire Lock StorPortAcquireSpinLock(AdapterExtension, InterruptLock, NULL, &lockhandle); - occupiedSlots = PortExtension->OccupiedSlots; // Busy command slots for given port + occupiedSlots = (PortExtension->QueueSlots | PortExtension->CommandIssuedSlots); // Busy command slots for given port NCS = AHCI_Global_Port_CAP_NCS(AdapterExtension->CAP); commandSlotMask = (1 << NCS) - 1; // available slots mask @@ -1064,11 +1143,15 @@ { PVOID DataBuffer; ULONG DataBufferLength; + PAHCI_PORT_EXTENSION PortExtension; PAHCI_SRB_EXTENSION SrbExtension; DebugPrint("DeviceInquiryRequest()\n"); + NT_ASSERT(IsPortValid(AdapterExtension, Srb->PathId)); + SrbExtension = GetSrbExtension(Srb); + PortExtension = &AdapterExtension->PortExtension[Srb->PathId]; // 3.6.1 // If the EVPD bit is set to zero, the device server shall return the standard INQUIRY data @@ -1078,7 +1161,25 @@ NT_ASSERT(SrbExtension != NULL); SrbExtension->AtaFunction = ATA_FUNCTION_ATA_IDENTIFY; + SrbExtension->Flags |= ATA_FLAGS_DATA_IN; SrbExtension->CommandReg = IDE_COMMAND_NOT_VALID; + + SrbExtension->FeaturesLow = 0; + SrbExtension->LBA0 = 0; + SrbExtension->LBA1 = 0; + SrbExtension->LBA2 = 0; + SrbExtension->Device = 0; + SrbExtension->LBA3 = 0; + SrbExtension->LBA4 = 0; + SrbExtension->LBA5 = 0; + SrbExtension->FeaturesHigh = 0; + SrbExtension->SectorCountLow = 0; + SrbExtension->SectorCountHigh = 0; + + SrbExtension->Sgl.NumberOfElements = 1; + SrbExtension->Sgl.List[0].PhysicalAddress.LowPart = PortExtension->IdentifyDeviceDataPhysicalAddress.LowPart; + SrbExtension->Sgl.List[0].PhysicalAddress.HighPart = PortExtension->IdentifyDeviceDataPhysicalAddress.HighPart; + SrbExtension->Sgl.List[0].Length = sizeof(IDENTIFY_DEVICE_DATA); } else { @@ -1093,10 +1194,13 @@ } AhciZeroMemory(DataBuffer, DataBufferLength); + + // not supported + return SRB_STATUS_BAD_FUNCTION; } AhciProcessIO(AdapterExtension, Srb->PathId, Srb); - return SRB_STATUS_SUCCESS; + return SRB_STATUS_PENDING; }// -- DeviceInquiryRequest(); /** Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h [iso-8859-1] Mon Jun 27 12:58:04 2016 @@ -22,6 +22,21 @@ #define AHCI_Global_HBA_CONTROL_MRSM (1 << 2) #define AHCI_Global_HBA_CONTROL_AE (1 << 31) #define AHCI_Global_HBA_CAP_S64A (1 << 31) + +#define AHCI_ATA_CFIS_FisType 0 +#define AHCI_ATA_CFIS_PMPort_C 1 +#define AHCI_ATA_CFIS_CommandReg 2 +#define AHCI_ATA_CFIS_FeaturesLow 3 +#define AHCI_ATA_CFIS_LBA0 4 +#define AHCI_ATA_CFIS_LBA1 5 +#define AHCI_ATA_CFIS_LBA2 6 +#define AHCI_ATA_CFIS_Device 7 +#define AHCI_ATA_CFIS_LBA3 8 +#define AHCI_ATA_CFIS_LBA4 9 +#define AHCI_ATA_CFIS_LBA5 10 +#define AHCI_ATA_CFIS_FeaturesHigh 11 +#define AHCI_ATA_CFIS_SectorCountLow 12 +#define AHCI_ATA_CFIS_SectorCountHigh 13 // ATA Functions #define ATA_FUNCTION_ATA_COMMAND 0x100 @@ -297,13 +312,16 @@ typedef struct _AHCI_PORT_EXTENSION { ULONG PortNumber; - ULONG OccupiedSlots; // slots to which we have already assigned task + ULONG QueueSlots; // slots to which we have already assigned task + ULONG CommandIssuedSlots; BOOLEAN IsActive; PAHCI_PORT Port; // AHCI Port Infomation AHCI_QUEUE SrbQueue; PAHCI_RECEIVED_FIS ReceivedFIS; PAHCI_COMMAND_HEADER CommandList; STOR_DEVICE_POWER_STATE DevicePowerState; // Device Power State + PIDENTIFY_DEVICE_DATA IdentifyDeviceData; + STOR_PHYSICAL_ADDRESS IdentifyDeviceDataPhysicalAddress; struct _AHCI_ADAPTER_EXTENSION* AdapterExtension; // Port's Adapter Information } AHCI_PORT_EXTENSION, *PAHCI_PORT_EXTENSION; @@ -353,7 +371,21 @@ AHCI_COMMAND_TABLE CommandTable; ULONG AtaFunction; ULONG Flags; - ULONG CommandReg; + + UCHAR CommandReg; + UCHAR FeaturesLow; + UCHAR LBA0; + UCHAR LBA1; + UCHAR LBA2; + UCHAR Device; + UCHAR LBA3; + UCHAR LBA4; + UCHAR LBA5; + UCHAR FeaturesHigh; + + UCHAR SectorCountLow; + UCHAR SectorCountHigh; + ULONG SlotIndex; LOCAL_SCATTER_GATHER_LIST Sgl; } AHCI_SRB_EXTENSION, *PAHCI_SRB_EXTENSION; Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.rc URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.rc [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.rc [iso-8859-1] Mon Jun 27 12:58:04 2016 @@ -17,6 +17,6 @@ #define REACTOS_STR_FILE_VERSION VERSION_STR #define REACTOS_STR_INTERNAL_NAME "storahci.sys" #define REACTOS_STR_ORIGINAL_FILENAME "storahci.sys" -#define REACTOS_STR_LEGAL_COPYRIGHT "Copyright 2010 ReactOS Team" +#define REACTOS_STR_LEGAL_COPYRIGHT "Copyright 2016 ReactOS Team" #define REACTOS_STR_PRODUCT_NAME "AHCI Driver for ReactOS" #define REACTOS_STR_PRODUCT_VERSION VERSION_STR
8 years, 7 months
1
0
0
0
[tthompson] 71680: [NTFS] Allow for an existing file to be opened with FILE_OVERWRITE, FILE_OVERWRITE_IF, or FILE_SUPERSEDE dispositions, and truncate that file. This allows for a file to be opened...
by tthompson@svn.reactos.org
Author: tthompson Date: Sun Jun 26 21:06:02 2016 New Revision: 71680 URL:
http://svn.reactos.org/svn/reactos?rev=71680&view=rev
Log: [NTFS] Allow for an existing file to be opened with FILE_OVERWRITE, FILE_OVERWRITE_IF, or FILE_SUPERSEDE dispositions, and truncate that file. This allows for a file to be opened and saved in Notepad.exe [provided that file is non-resident and its allocation size doesn't need to change]. Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c [iso-8859-1] Sun Jun 26 21:06:02 2016 @@ -476,14 +476,66 @@ return Status; } - /* HUGLY HACK: Can't overwrite or supersede a file yet... */ if (RequestedDisposition == FILE_OVERWRITE || RequestedDisposition == FILE_OVERWRITE_IF || RequestedDisposition == FILE_SUPERSEDE) { - DPRINT1("Cannot yet perform an overwrite or supersede request on NTFS volume\n"); - NtfsCloseFile(DeviceExt, FileObject); - return STATUS_ACCESS_DENIED; + PFILE_RECORD_HEADER fileRecord = NULL; + PNTFS_ATTR_CONTEXT dataContext = NULL; + ULONG DataAttributeOffset; + LARGE_INTEGER Zero; + Zero.QuadPart = 0; + + // TODO: check for appropriate access + + ExAcquireResourceExclusiveLite(&(Fcb->MainResource), TRUE); + + fileRecord = ExAllocatePoolWithTag(NonPagedPool, + Fcb->Vcb->NtfsInfo.BytesPerFileRecord, + TAG_NTFS); + if (fileRecord) + { + + Status = ReadFileRecord(Fcb->Vcb, + Fcb->MFTIndex, + fileRecord); + if (!NT_SUCCESS(Status)) + goto DoneOverwriting; + + // find the data attribute and set it's length to 0 (TODO: Handle Alternate Data Streams) + Status = FindAttribute(Fcb->Vcb, fileRecord, AttributeData, L"", 0, &dataContext, &DataAttributeOffset); + if (!NT_SUCCESS(Status)) + goto DoneOverwriting; + + Status = SetAttributeDataLength(FileObject, Fcb, dataContext, DataAttributeOffset, fileRecord, &Zero); + } + else + { + Status = STATUS_NO_MEMORY; + } + + DoneOverwriting: + if (fileRecord) + ExFreePool(fileRecord); + if (dataContext) + ReleaseAttributeContext(dataContext); + + ExReleaseResourceLite(&(Fcb->MainResource)); + + if (!NT_SUCCESS(Status)) + { + NtfsCloseFile(DeviceExt, FileObject); + return Status; + } + + if (RequestedDisposition == FILE_SUPERSEDE) + { + Irp->IoStatus.Information = FILE_SUPERSEDED; + } + else + { + Irp->IoStatus.Information = FILE_OVERWRITTEN; + } } } else
8 years, 7 months
1
0
0
0
[ekohl] 71679: [SERVICES] Create an individual security descriptor for each service. We cannot use a common default security descriptor because RtlSetSecurityObject will free the old security descr...
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Jun 26 20:09:37 2016 New Revision: 71679 URL:
http://svn.reactos.org/svn/reactos?rev=71679&view=rev
Log: [SERVICES] Create an individual security descriptor for each service. We cannot use a common default security descriptor because RtlSetSecurityObject will free the old security descriptor when we try to set a new one. Modified: trunk/reactos/base/system/services/config.c trunk/reactos/base/system/services/database.c trunk/reactos/base/system/services/rpcserver.c trunk/reactos/base/system/services/security.c trunk/reactos/base/system/services/services.h Modified: trunk/reactos/base/system/services/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/confi…
============================================================================== --- trunk/reactos/base/system/services/config.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/config.c [iso-8859-1] Sun Jun 26 20:09:37 2016 @@ -513,9 +513,8 @@ DWORD dwDisposition; DWORD dwError; - DPRINT1("ScmWriteSecurityDescriptor(%p %p)\n", hServiceKey, pSecurityDescriptor); - -DPRINT1("\n"); + DPRINT("ScmWriteSecurityDescriptor(%p %p)\n", hServiceKey, pSecurityDescriptor); + dwError = RegCreateKeyExW(hServiceKey, L"Security", 0, @@ -526,23 +525,16 @@ &hSecurityKey, &dwDisposition); if (dwError != ERROR_SUCCESS) - { -DPRINT1("\n"); - goto done; - } - -DPRINT1("\n"); + return dwError; + dwError = RegSetValueExW(hSecurityKey, L"Security", 0, REG_BINARY, (LPBYTE)pSecurityDescriptor, RtlLengthSecurityDescriptor(pSecurityDescriptor)); -DPRINT1("\n"); - -done: - if (hSecurityKey != NULL) - RegCloseKey(hSecurityKey); + + RegCloseKey(hSecurityKey); return dwError; } @@ -559,7 +551,7 @@ DWORD dwType; DWORD dwError; - DPRINT("ScmReadSecurityDescriptor()\n"); + DPRINT("ScmReadSecurityDescriptor(%p %p)\n", hServiceKey, ppSecurityDescriptor); *ppSecurityDescriptor = NULL; Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/database.c [iso-8859-1] Sun Jun 26 20:09:37 2016 @@ -555,8 +555,7 @@ ScmSetServiceGroup(lpService, NULL); /* Release the SecurityDescriptor */ - if ((lpService->pSecurityDescriptor != NULL) && - (lpService->pSecurityDescriptor != pDefaultServiceSD)) + if (lpService->pSecurityDescriptor != NULL) HeapFree(GetProcessHeap(), 0, lpService->pSecurityDescriptor); /* Remove the Service from the List */ @@ -706,7 +705,9 @@ if (lpService->pSecurityDescriptor == NULL) { DPRINT("No security descriptor found! Assign default security descriptor!\n"); - lpService->pSecurityDescriptor = pDefaultServiceSD; + dwError = ScmCreateDefaultServiceSD(&lpService->pSecurityDescriptor); + if (dwError != ERROR_SUCCESS) + goto done; dwError = ScmWriteSecurityDescriptor(hServiceKey, lpService->pSecurityDescriptor); Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sun Jun 26 20:09:37 2016 @@ -2255,7 +2255,9 @@ /* Assign the default security descriptor */ if (dwServiceType & SERVICE_WIN32) { - lpService->pSecurityDescriptor = pDefaultServiceSD; + dwError = ScmCreateDefaultServiceSD(&lpService->pSecurityDescriptor); + if (dwError != ERROR_SUCCESS) + goto done; } /* Write service data to the registry */ Modified: trunk/reactos/base/system/services/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/secur…
============================================================================== --- trunk/reactos/base/system/services/security.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/security.c [iso-8859-1] Sun Jun 26 20:09:37 2016 @@ -13,8 +13,6 @@ #define NDEBUG #include <debug.h> -PSECURITY_DESCRIPTOR pDefaultServiceSD = NULL; /* Self-relative SD */ - static PSID pNullSid = NULL; static PSID pLocalSystemSid = NULL; static PSID pAuthenticatedUserSid = NULL; @@ -102,11 +100,12 @@ } -static DWORD -ScmCreateDefaultServiceSD(VOID) +ScmCreateDefaultServiceSD( + PSECURITY_DESCRIPTOR *ppSecurityDescriptor) { PSECURITY_DESCRIPTOR pServiceSD = NULL; + PSECURITY_DESCRIPTOR pRelativeSD = NULL; PACL pDacl = NULL; PACL pSacl = NULL; ULONG ulLength; @@ -234,32 +233,32 @@ DPRINT("BufferLength %lu\n", dwBufferLength); - pDefaultServiceSD = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - dwBufferLength); - if (pDefaultServiceSD == NULL) - { - dwError = ERROR_OUTOFMEMORY; - goto done; - } - DPRINT("pDefaultServiceSD %p\n", pDefaultServiceSD); + pRelativeSD = RtlAllocateHeap(RtlGetProcessHeap(), + HEAP_ZERO_MEMORY, + dwBufferLength); + if (pRelativeSD == NULL) + { + dwError = ERROR_OUTOFMEMORY; + goto done; + } + DPRINT("pRelativeSD %p\n", pRelativeSD); Status = RtlAbsoluteToSelfRelativeSD(pServiceSD, - pDefaultServiceSD, + pRelativeSD, &dwBufferLength); if (!NT_SUCCESS(Status)) { dwError = RtlNtStatusToDosError(Status); - } + goto done; + } + + *ppSecurityDescriptor = pRelativeSD; done: if (dwError != ERROR_SUCCESS) { - if (pDefaultServiceSD != NULL) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, pDefaultServiceSD); - pDefaultServiceSD = NULL; - } + if (pRelativeSD != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, pRelativeSD); } if (pServiceSD != NULL) @@ -284,10 +283,6 @@ if (dwError != ERROR_SUCCESS) return dwError; - dwError = ScmCreateDefaultServiceSD(); - if (dwError != ERROR_SUCCESS) - return dwError; - return ERROR_SUCCESS; } Modified: trunk/reactos/base/system/services/services.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/servi…
============================================================================== --- trunk/reactos/base/system/services/services.h [iso-8859-1] (original) +++ trunk/reactos/base/system/services/services.h [iso-8859-1] Sun Jun 26 20:09:37 2016 @@ -98,8 +98,6 @@ extern BOOL ScmInitialize; extern BOOL ScmShutdown; -extern PSECURITY_DESCRIPTOR pDefaultServiceSD; - /* FUNCTIONS ***************************************************************/ @@ -215,6 +213,10 @@ DWORD ScmInitializeSecurity(VOID); VOID ScmShutdownSecurity(VOID); +DWORD +ScmCreateDefaultServiceSD( + PSECURITY_DESCRIPTOR *ppSecurityDescriptor); + /* services.c */
8 years, 7 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
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