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
September 2008
----- 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
27 participants
747 discussions
Start a n
N
ew thread
[cwittich] 36253: add ReactOS (RosDbg) option to freeldr and use it as default for unattended installs
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Sep 15 01:25:31 2008 New Revision: 36253 URL:
http://svn.reactos.org/svn/reactos?rev=36253&view=rev
Log: add ReactOS (RosDbg) option to freeldr and use it as default for unattended installs Modified: trunk/reactos/base/setup/usetup/bootsup.c Modified: trunk/reactos/base/setup/usetup/bootsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/bootsup.…
============================================================================== --- trunk/reactos/base/setup/usetup/bootsup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/bootsup.c [iso-8859-1] Mon Sep 15 01:25:31 2008 @@ -51,7 +51,7 @@ NULL, INSERT_LAST, L"DefaultOS", - L"ReactOS_Debug"); + L"ReactOS_KdSerial"); } else #endif @@ -381,13 +381,20 @@ L"\"ReactOS (Debug)\""); #ifdef DBG + /* ReactOS_KdSerial="ReactOS (RosDbg)" */ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"ReactOS_KdSerial", + L"\"ReactOS (RosDbg)\""); + /* ReactOS_WinLdr="ReactOS (WinLdr)" */ IniCacheInsertKey(IniSection, NULL, INSERT_LAST, L"ReactOS_WinLdr", L"\"ReactOS (WinLdr)\""); - + /* ReactOS_Ram="ReactOS (RAM Disk)" */ IniCacheInsertKey(IniSection, NULL, @@ -447,6 +454,34 @@ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS"); #ifdef DBG + + /* Create "ReactOS_KdSerial" section */ + IniSection = IniCacheAppendSection(IniCache, + L"ReactOS_KdSerial"); + + /* BootType=ReactOS */ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"BootType", + L"ReactOS"); + + /* SystemPath=<ArcPath> */ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"SystemPath", + ArcPath); + + /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS*/ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"Options", + L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /KDSERIAL"); + +/* ------------------------------------------------------------------------------ */ + /* Create "ReactOS_WinLdr" section */ IniSection = IniCacheAppendSection(IniCache, L"ReactOS_WinLdr"); @@ -472,7 +507,7 @@ L"Options", L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS"); - /* Create "ReactOS_WinLdr" section */ + /* Create "ReactOS_Ram" section */ IniSection = IniCacheAppendSection(IniCache, L"ReactOS_Ram"); @@ -496,6 +531,7 @@ INSERT_LAST, L"Options", L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256"); + #endif /* Save the ini file */
16 years, 3 months
1
0
0
0
[sginsberg] 36252: - STDCALL -> NTAPI
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Sep 14 23:38:06 2008 New Revision: 36252 URL:
http://svn.reactos.org/svn/reactos?rev=36252&view=rev
Log: - STDCALL -> NTAPI Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] Sun Sep 14 23:38:06 2008 @@ -2079,7 +2079,7 @@ * @implemented */ BOOLEAN -STDCALL +NTAPI IoIsFileOriginRemote(IN PFILE_OBJECT FileObject) { /* Return the flag status */
16 years, 3 months
1
0
0
0
[sginsberg] 36251: - IopCompleteRequest: Remove the hack related to Irp->UserEvent, fixed by 36047
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Sep 14 23:32:45 2008 New Revision: 36251 URL:
http://svn.reactos.org/svn/reactos?rev=36251&view=rev
Log: - IopCompleteRequest: Remove the hack related to Irp->UserEvent, fixed by 36047 Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Sun Sep 14 23:32:45 2008 @@ -346,16 +346,8 @@ /* Check if this is an Asynch API */ if (!(Irp->Flags & IRP_SYNCHRONOUS_API)) { - /* HACK */ - if (*((PULONG)(Irp->UserEvent) - 1) != 0x87878787) - { /* Dereference the event */ ObDereferenceObject(Irp->UserEvent); - } - else - { - DPRINT1("Not an executive event -- should not be dereferenced\n"); - } } /*
16 years, 3 months
1
0
0
0
[cgutman] 36250: - Use NDIS_GET_PACKET_STATUS to get the real status for the packet - Set MiniportBusy to FALSE if Send/SendPacket didn't return NDIS_STATUS_PENDING
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Sep 14 16:17:44 2008 New Revision: 36250 URL:
http://svn.reactos.org/svn/reactos?rev=36250&view=rev
Log: - Use NDIS_GET_PACKET_STATUS to get the real status for the packet - Set MiniportBusy to FALSE if Send/SendPacket didn't return NDIS_STATUS_PENDING Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/protocol.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/protocol.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/protocol.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/protocol.c [iso-8859-1] Sun Sep 14 16:17:44 2008 @@ -340,13 +340,10 @@ KeLowerIrql(RaiseOldIrql); } - /* SendPackets handlers return void - they always "succeed" */ - NdisStatus = NDIS_STATUS_SUCCESS; + NdisStatus = NDIS_GET_PACKET_STATUS((PNDIS_PACKET)Packet); } else { - /* XXX FIXME THIS IS WRONG */ - /* uh oh... forgot why i thought that... */ if(Adapter->NdisMiniportBlock.Flags & NDIS_ATTRIBUTE_DESERIALIZE) { NDIS_DbgPrint(MAX_TRACE, ("Calling miniport's Send handler\n")); @@ -363,12 +360,13 @@ NdisStatus = (*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendHandler)( Adapter->NdisMiniportBlock.MiniportAdapterContext, Packet, 0); NDIS_DbgPrint(MAX_TRACE, ("back from miniport's send handler\n")); - if( NdisStatus != NDIS_STATUS_PENDING ) { - Adapter->MiniportBusy = FALSE; - } KeLowerIrql(RaiseOldIrql); } } + + if( NdisStatus != NDIS_STATUS_PENDING ) { + Adapter->MiniportBusy = FALSE; + } /* XXX why the hell do we do this? */ NDIS_DbgPrint(MAX_TRACE, ("acquiring miniport block lock\n"));
16 years, 3 months
1
0
0
0
[cgutman] 36249: - Pass the status we were given to the completion routine
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Sep 14 15:47:22 2008 New Revision: 36249 URL:
http://svn.reactos.org/svn/reactos?rev=36249&view=rev
Log: - Pass the status we were given to the completion routine Modified: branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c Modified: branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c [iso-8859-1] Sun Sep 14 15:47:22 2008 @@ -19,7 +19,7 @@ TI_DbgPrint(MID_TRACE, ("Called\n")); ASSERT_KM_POINTER(Packet); ASSERT_KM_POINTER(Packet->Complete); - Packet->Complete( Packet->Context, Packet->Packet, STATUS_SUCCESS ); + Packet->Complete( Packet->Context, Packet->Packet, Status ); TI_DbgPrint(MID_TRACE, ("Completed\n")); PoolFreeBuffer( Packet ); TI_DbgPrint(MID_TRACE, ("Freed\n"));
16 years, 3 months
1
0
0
0
[cgutman] 36248: - Merge r35555, r35575, r35576, and r36243 into my branch
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Sep 14 15:01:36 2008 New Revision: 36248 URL:
http://svn.reactos.org/svn/reactos?rev=36248&view=rev
Log: - Merge r35555, r35575, r35576, and r36243 into my branch Modified: branches/aicom-network-fixes/drivers/network/afd/afd/main.c branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/main.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/main.c [iso-8859-1] Sun Sep 14 15:01:36 2008 @@ -202,6 +202,7 @@ if( InFlightRequest[i]->InFlightRequest ) { AFD_DbgPrint(MID_TRACE,("Cancelling in flight irp %d (%x)\n", i, InFlightRequest[i]->InFlightRequest)); + IoCancelIrp(InFlightRequest[i]->InFlightRequest); InFlightRequest[i]->InFlightRequest = NULL; } } Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Sun Sep 14 15:01:36 2008 @@ -900,7 +900,7 @@ NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n")); - NdisWorkItem = ExAllocatePool(NonPagedPool, sizeof(PNDIS_WORK_ITEM)); + NdisWorkItem = ExAllocatePool(NonPagedPool, sizeof(NDIS_WORK_ITEM)); WorkItem = (PWORK_QUEUE_ITEM)NdisWorkItem->WrapperReserved; Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sun Sep 14 15:01:36 2008 @@ -179,17 +179,21 @@ if( !ChewCreate( &WorkItem, sizeof(DISCONNECT_TYPE), DispDoDisconnect, &DisType ) ) ASSERT(0); + + IoReleaseCancelSpinLock(Irp->CancelIrql); return; case TDI_SEND_DATAGRAM: if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { TI_DbgPrint(MIN_TRACE, ("TDI_SEND_DATAGRAM, but no address file.\n")); + break; } break; case TDI_RECEIVE_DATAGRAM: if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { TI_DbgPrint(MIN_TRACE, ("TDI_RECEIVE_DATAGRAM, but no address file.\n")); + break; } DGRemoveIRP(TranContext->Handle.AddressHandle, Irp);
16 years, 3 months
1
0
0
0
[cwittich] 36247: sync advapi32_winetest to wine 1.1.4
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Sep 14 13:24:25 2008 New Revision: 36247 URL:
http://svn.reactos.org/svn/reactos?rev=36247&view=rev
Log: sync advapi32_winetest to wine 1.1.4 Modified: trunk/rostests/winetests/advapi32/cred.c trunk/rostests/winetests/advapi32/crypt.c trunk/rostests/winetests/advapi32/crypt_lmhash.c trunk/rostests/winetests/advapi32/lsa.c trunk/rostests/winetests/advapi32/registry.c trunk/rostests/winetests/advapi32/security.c trunk/rostests/winetests/advapi32/service.c Modified: trunk/rostests/winetests/advapi32/cred.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/cred.c…
============================================================================== --- trunk/rostests/winetests/advapi32/cred.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/cred.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -97,8 +97,12 @@ SetLastError(0xdeadbeef); ret = pCredWriteA(&new_cred, 0); - ok(!ret && ( GetLastError() == ERROR_BAD_USERNAME || GetLastError() == ERROR_NO_SUCH_LOGON_SESSION /* Vista */ ), - "CredWrite with username without domain should return ERROR_BAD_USERNAME or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError()); + ok(!ret, "CredWrite with username without domain should have failed\n"); + ok(GetLastError() == ERROR_BAD_USERNAME || + GetLastError() == ERROR_NO_SUCH_LOGON_SESSION || /* Vista */ + broken(GetLastError() == ERROR_IO_PENDING), + "CredWrite with username without domain should return ERROR_BAD_USERNAME" + "or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError()); new_cred.UserName = NULL; SetLastError(0xdeadbeef); @@ -175,10 +179,12 @@ { if (!strcmp(creds[i]->TargetName, TEST_TARGET_NAME)) { - ok(creds[i]->Type == CRED_TYPE_GENERIC, "expected creds[%d]->Type CRED_TYPE_GENERIC but got %d\n", i, creds[i]->Type); + ok(creds[i]->Type == CRED_TYPE_GENERIC || + creds[i]->Type == CRED_TYPE_DOMAIN_PASSWORD, /* Vista */ + "expected creds[%d]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type); ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags); ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment); - check_blob(__LINE__, CRED_TYPE_GENERIC, creds[i]); + check_blob(__LINE__, creds[i]->Type, creds[i]); ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist); ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%d]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName); found = TRUE; @@ -216,6 +222,12 @@ new_cred.TargetAlias = NULL; new_cred.UserName = (char *)"test\\winetest"; ret = pCredWriteA(&new_cred, 0); + if (!ret && GetLastError() == ERROR_NO_SUCH_LOGON_SESSION) + { + skip("CRED_TYPE_DOMAIN_PASSWORD credentials are not supported " + "or are disabled. Skipping\n"); + return; + } ok(ret, "CredWriteA failed with error %d\n", GetLastError()); ret = pCredEnumerateA(NULL, 0, &count, &creds); Modified: trunk/rostests/winetests/advapi32/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/crypt.…
============================================================================== --- trunk/rostests/winetests/advapi32/crypt.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/crypt.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -903,7 +903,7 @@ /* Create and release a provider */ ret = pCryptAcquireContextA(&hCryptProv, szKeySet, NULL, PROV_RSA_FULL, 0); ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError()); - CryptReleaseContext(hCryptProv, 0); + pCryptReleaseContext(hCryptProv, 0); if (restoreGuid) RegSetValueExA(key, "MachineGuid", 0, REG_SZ, (const BYTE *)originalGuid, Modified: trunk/rostests/winetests/advapi32/crypt_lmhash.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/crypt_…
============================================================================== --- trunk/rostests/winetests/advapi32/crypt_lmhash.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/crypt_lmhash.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -348,18 +348,24 @@ out.Length = 0; out.MaximumLength = 0; r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_SUCCESS, "function failed\n"); + ok(r == STATUS_SUCCESS || + r == STATUS_INVALID_PARAMETER_1, /* Vista */ + "Expected STATUS_SUCCESS or STATUS_INVALID_PARAMETER_1, got %08x\n", r); ok(res.Length == in.Length, "Length wrong\n"); ok(!memcmp(res.Buffer, in.Buffer, in.Length), "data wrong\n"); res.MaximumLength = 0; r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_BUFFER_TOO_SMALL, "function failed\n"); + ok(r == STATUS_BUFFER_TOO_SMALL || + r == STATUS_INVALID_PARAMETER_1, /* Vista */ + "Expected STATUS_BUFFER_TOO_SMALL or STATUS_INVALID_PARAMETER_1, got %08x\n", r); key.Length = 1; r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_UNKNOWN_REVISION, "function failed\n"); + ok(r == STATUS_UNKNOWN_REVISION || + r == STATUS_INVALID_PARAMETER_1, /* Vista */ + "Expected STATUS_UNKNOWN_REVISION or STATUS_INVALID_PARAMETER_1, got %08x\n", r); key.Length = 0; r = pSystemFunction005(&out, &key, &res); Modified: trunk/rostests/winetests/advapi32/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/lsa.c?…
============================================================================== --- trunk/rostests/winetests/advapi32/lsa.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/lsa.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -30,9 +30,10 @@ #include "sddl.h" #include "winnls.h" #include "objbase.h" -#define INITGUID -#include "guiddef.h" +#include "initguid.h" #include "wine/test.h" + +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); static HMODULE hadvapi32; static NTSTATUS (WINAPI *pLsaClose)(LSA_HANDLE); @@ -95,7 +96,6 @@ status = pLsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (PVOID*)&primary_domain_info); ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08x\n", status); if (status == STATUS_SUCCESS) { - ok(primary_domain_info->Sid==0,"Sid should be NULL on the local computer\n"); if (primary_domain_info->Sid) { LPSTR strsid; if (pConvertSidToStringSidA(primary_domain_info->Sid, &strsid)) @@ -115,6 +115,8 @@ else trace("invalid sid\n"); } + else + trace("Running on a standalone system.\n"); pLsaFreeMemory((LPVOID)primary_domain_info); } @@ -129,8 +131,6 @@ ok(status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, "LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08x\n", status); if (status == STATUS_SUCCESS) { - ok(IsEqualGUID(&dns_domain_info->DomainGuid, &GUID_NULL), "DomainGUID should be GUID_NULL on local computer\n"); - ok(dns_domain_info->Sid==0,"Sid should be NULL on the local computer\n"); if (dns_domain_info->Sid || !IsEqualGUID(&dns_domain_info->DomainGuid, &GUID_NULL)) { LPSTR strsid = NULL; LPSTR name = NULL; @@ -169,6 +169,8 @@ LocalFree( guidstr ); LocalFree( strsid ); } + else + trace("Running on a standalone system.\n"); pLsaFreeMemory((LPVOID)dns_domain_info); } Modified: trunk/rostests/winetests/advapi32/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/regist…
============================================================================== --- trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -159,9 +159,8 @@ #define ADVAPI32_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hadvapi32, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); + p ## func = (void*)GetProcAddress(hadvapi32, #func); + static void InitFunctionPtrs(void) { @@ -263,7 +262,11 @@ ret = RegQueryValueExW(hkey_main, name, NULL, &type, NULL, &cbData); GLE = GetLastError(); ok(ret == ERROR_SUCCESS, "RegQueryValueExW failed: %d, GLE=%d\n", ret, GLE); - if(GLE == ERROR_CALL_NOT_IMPLEMENTED) return; + if(GLE == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("RegQueryValueExW() is not implemented\n"); + return; + } ok(type == REG_SZ, "RegQueryValueExW returned type %d\n", type); ok(cbData == full_byte_len, @@ -328,13 +331,21 @@ test_hkey_main_Value_A(NULL, substring2A, sizeof(substring2A)); test_hkey_main_Value_W(NULL, substring2W, sizeof(substring2W)); - /* only REG_SZ is supported */ + /* only REG_SZ is supported on NT*/ ret = RegSetValueA(hkey_main, NULL, REG_BINARY, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_SUCCESS */ + ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), + "got %d (expected ERROR_INVALID_PARAMETER or ERROR_SUCCESS)\n", ret); + ret = RegSetValueA(hkey_main, NULL, REG_EXPAND_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_SUCCESS */ + ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), + "got %d (expected ERROR_INVALID_PARAMETER or ERROR_SUCCESS)\n", ret); + ret = RegSetValueA(hkey_main, NULL, REG_MULTI_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); + /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_SUCCESS */ + ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), + "got %d (expected ERROR_INVALID_PARAMETER or ERROR_SUCCESS)\n", ret); /* Test RegSetValueExA with a 'zero-byte' string (as Office 2003 does). * Surprisingly enough we're supposed to get zero bytes out of it. @@ -433,7 +444,7 @@ "RegSetValueExA failed\n"); ok(!RegSetValueExA(hkey_main,"TP1_SZ",0,REG_SZ, (const BYTE *)sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"TP1_ZB_SZ",0,REG_SZ, NULL, 0), + ok(!RegSetValueExA(hkey_main,"TP1_ZB_SZ",0,REG_SZ, (const BYTE *)"", 0), "RegSetValueExA failed\n"); ok(!RegSetValueExA(hkey_main,"TP2_EXP_SZ",0,REG_EXPAND_SZ, (const BYTE *)sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n"); @@ -556,7 +567,7 @@ res = RegSetValueExW( test_key, testW, 0, REG_SZ, (const BYTE *)foobarW, 7*sizeof(WCHAR) ); if (res==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) { - skip("RegSetValueExW is not implemented\n"); + win_skip("RegSetValueExW is not implemented\n"); goto cleanup; } ok( res == 0, "RegSetValueExW failed error %d\n", res ); @@ -675,7 +686,7 @@ if(!pRegGetValueA) { - skip("RegGetValue not available on this platform\n"); + win_skip("RegGetValue not available on this platform\n"); return; } @@ -775,7 +786,7 @@ ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ, &type, NULL, &size); ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ - ok(size == strlen(sTestpath1)+1 || size == strlen(sTestpath1)+2, + ok(size == strlen(sTestpath1)+1 || broken(size == strlen(sTestpath1)+2), "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); ok(type == REG_SZ, "type=%d\n", type); @@ -816,7 +827,7 @@ ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ - ok((size == strlen(expanded)+1) || (size == strlen(sTestpath1)+1), + ok(size == strlen(expanded)+1 || broken(size == strlen(sTestpath1)+1), "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); ok(type == REG_SZ, "type=%d\n", type); ok(!strcmp(expanded, buf), "expanded=\"%s\" buf=\"%s\"\n", expanded, buf); @@ -826,7 +837,7 @@ ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath2 length + 1 here. */ - ok((size == strlen(expanded2)+1) || (size == strlen(sTestpath2)+1), + ok(size == strlen(expanded2)+1 || broken(size == strlen(sTestpath2)+1), "strlen(expanded2)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); ok(type == REG_SZ, "type=%d\n", type); ok(!strcmp(expanded2, buf), "expanded2=\"%s\" buf=\"%s\"\n", expanded2, buf); @@ -844,7 +855,7 @@ ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND, NULL, NULL, &size); ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ - ok(size == strlen(sTestpath1)+1 || size == strlen(sTestpath1)+2, + ok(size == strlen(sTestpath1)+1 || broken(size == strlen(sTestpath1)+2), "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (type mismatch) */ @@ -854,6 +865,16 @@ /* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ (not allowed without RRF_NOEXPAND) */ ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ, NULL, NULL, NULL); ok(ret == ERROR_INVALID_PARAMETER, "ret=%d\n", ret); + + /* Query REG_EXPAND_SZ using RRF_RT_ANY */ + buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); + ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_ANY, &type, buf, &size); + ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); + /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ + ok(size == strlen(expanded)+1 || broken(size == strlen(sTestpath1)+1), + "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); + ok(type == REG_SZ, "type=%d\n", type); + ok(!strcmp(expanded, buf), "expanded=\"%s\" buf=\"%s\"\n", expanded, buf); } static void test_reg_open_key(void) @@ -935,6 +956,19 @@ ok(ret == ERROR_BAD_PATHNAME || /* NT/2k/XP */ ret == ERROR_FILE_NOT_FOUND /* Win9x,ME */ , "expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); + + /* WOW64 flags */ + hkResult = NULL; + ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_32KEY, &hkResult); + ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), + "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + RegCloseKey(hkResult); + + hkResult = NULL; + ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_64KEY, &hkResult); + ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), + "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + RegCloseKey(hkResult); } static void test_reg_create_key(void) @@ -960,6 +994,19 @@ ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); RegDeleteKey(hkey1, NULL); } + + /* WOW64 flags - open an existing key */ + hkey1 = NULL; + ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL); + ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), + "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); + RegCloseKey(hkey1); + + hkey1 = NULL; + ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_64KEY, NULL, &hkey1, NULL); + ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), + "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); + RegCloseKey(hkey1); } static void test_reg_close_key(void) @@ -1124,7 +1171,7 @@ schnd = OpenSCManagerA( compName, NULL, GENERIC_READ); if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - skip("OpenSCManagerA is not implemented\n"); + win_skip("OpenSCManagerA is not implemented\n"); return; } @@ -1157,7 +1204,9 @@ SetLastError(0xdeadbeef); size = MAX_PATH; ret = RegQueryValueA((HKEY)0xcafebabe, "subkey", val, &size); - ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 98 returns BADKEY */ + ok(ret == ERROR_INVALID_HANDLE || + ret == ERROR_BADKEY || /* Windows 98 returns BADKEY */ + ret == ERROR_ACCESS_DENIED, /* non-admin winxp */ "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); @@ -1218,7 +1267,7 @@ ret = RegQueryValueW(subkey, NULL, valW, &size); if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - skip("RegQueryValueW is not implemented\n"); + win_skip("RegQueryValueW is not implemented\n"); goto cleanup; } ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); @@ -1266,7 +1315,7 @@ LONG size, ret; if(!pRegDeleteTreeA) { - skip("Skipping RegDeleteTreeA tests, function not present\n"); + win_skip("Skipping RegDeleteTreeA tests, function not present\n"); return; } Modified: trunk/rostests/winetests/advapi32/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/securi…
============================================================================== --- trunk/rostests/winetests/advapi32/security.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/security.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -101,6 +101,8 @@ static DWORD (WINAPI *pSetEntriesInAclW)(ULONG, PEXPLICIT_ACCESSW, PACL, PACL*); static BOOL (WINAPI *pSetSecurityDescriptorControl)(PSECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, SECURITY_DESCRIPTOR_CONTROL); +static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, + PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); static HMODULE hmod; static int myARGC; @@ -149,6 +151,7 @@ pMakeSelfRelativeSD = (void *)GetProcAddress(hmod, "MakeSelfRelativeSD"); pSetEntriesInAclW = (void *)GetProcAddress(hmod, "SetEntriesInAclW"); pSetSecurityDescriptorControl = (void *)GetProcAddress(hmod, "SetSecurityDescriptorControl"); + pGetSecurityInfo = (void *)GetProcAddress(hmod, "GetSecurityInfo"); myARGC = winetest_get_mainargs( &myARGV ); } @@ -586,8 +589,9 @@ luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; cchName = sizeof(buf); ret = pLookupPrivilegeNameA("b0gu5.Nam3", &luid, buf, &cchName); - ok( !ret && GetLastError() == RPC_S_SERVER_UNAVAILABLE, - "LookupPrivilegeNameA didn't fail with RPC_S_SERVER_UNAVAILABLE: %d\n", + ok( !ret && (GetLastError() == RPC_S_SERVER_UNAVAILABLE || + GetLastError() == RPC_S_INVALID_NET_ADDR) /* w2k8 */, + "LookupPrivilegeNameA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %d\n", GetLastError()); } @@ -644,8 +648,9 @@ /* check a bogus system name */ ret = pLookupPrivilegeValueA("b0gu5.Nam3", "SeCreateTokenPrivilege", &luid); - ok( !ret && GetLastError() == RPC_S_SERVER_UNAVAILABLE, - "LookupPrivilegeValueA didn't fail with RPC_S_SERVER_UNAVAILABLE: %d\n", + ok( !ret && (GetLastError() == RPC_S_SERVER_UNAVAILABLE || + GetLastError() == RPC_S_INVALID_NET_ADDR) /* w2k8 */, + "LookupPrivilegeValueA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %d\n", GetLastError()); /* check a NULL string */ ret = pLookupPrivilegeValueA(NULL, 0, &luid); @@ -1642,7 +1647,8 @@ ok(!ret, "Expected 0, got %d\n", ret); todo_wine { - ok(GetLastError() == ERROR_NONE_MAPPED, + ok(GetLastError() == ERROR_NONE_MAPPED || + broken(GetLastError() == ERROR_TRUSTED_RELATIONSHIP_FAILURE), "Expected ERROR_NONE_MAPPED, got %d\n", GetLastError()); ok(sid_size == 0, "Expected 0, got %d\n", sid_size); ok(domain_size == 0, "Expected 0, got %d\n", domain_size); @@ -1699,8 +1705,10 @@ } } -#define TEST_GRANTED_ACCESS(a,b) test_granted_access(a,b,__LINE__) -static void test_granted_access(HANDLE handle, ACCESS_MASK access, int line) +#define TEST_GRANTED_ACCESS(a,b) test_granted_access(a,b,0,__LINE__) +#define TEST_GRANTED_ACCESS2(a,b,c) test_granted_access(a,b,c,__LINE__) +static void test_granted_access(HANDLE handle, ACCESS_MASK access, + ACCESS_MASK alt, int line) { OBJECT_BASIC_INFORMATION obj_info; NTSTATUS status; @@ -1714,8 +1722,13 @@ status = pNtQueryObject( handle, ObjectBasicInformation, &obj_info, sizeof(obj_info), NULL ); ok_(__FILE__, line)(!status, "NtQueryObject with err: %08x\n", status); - ok_(__FILE__, line)(obj_info.GrantedAccess == access, "Granted access should " - "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess); + if (alt) + ok_(__FILE__, line)(obj_info.GrantedAccess == access || + obj_info.GrantedAccess == alt, "Granted access should be 0x%08x " + "or 0x%08x, instead of 0x%08x\n", access, alt, obj_info.GrantedAccess); + else + ok_(__FILE__, line)(obj_info.GrantedAccess == access, "Granted access should " + "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess); } #define CHECK_SET_SECURITY(o,i,e) \ @@ -1827,7 +1840,8 @@ /* Doesn't matter what ACL say we should get full access for ourselves */ ok(CreateProcessA( NULL, buffer, &psa, NULL, FALSE, 0, NULL, NULL, &startup, &info ), "CreateProcess with err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( info.hProcess, PROCESS_ALL_ACCESS ); + TEST_GRANTED_ACCESS2( info.hProcess, PROCESS_ALL_ACCESS, + STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL ); winetest_wait_child_process( info.hProcess ); CloseHandle( info.hProcess ); @@ -1876,7 +1890,8 @@ ok(DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS ), "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( handle, PROCESS_ALL_ACCESS ); + TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS, + STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL ); CloseHandle( handle ); @@ -1884,7 +1899,8 @@ ok(DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &handle, PROCESS_ALL_ACCESS, TRUE, 0 ), "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( handle, PROCESS_ALL_ACCESS ); + TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS, + PROCESS_ALL_ACCESS | PROCESS_QUERY_LIMITED_INFORMATION ); ok(DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), &handle1, PROCESS_VM_READ, TRUE, 0 ), "duplicating handle err:%d\n", GetLastError()); @@ -2480,6 +2496,61 @@ SetLastError(0xdeadbeef); ret = InitializeAcl(pAcl, sizeof(buffer), -1); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(-1) failed with error %d\n", GetLastError()); +} + +static void test_GetSecurityInfo(void) +{ + HANDLE obj; + PSECURITY_DESCRIPTOR sd; + PSID owner, group; + PACL dacl; + DWORD ret; + + if (!pGetSecurityInfo) + { + win_skip("GetSecurityInfo is not available\n"); + return; + } + + /* Create something. Files have lots of associated security info. */ + obj = CreateFile(myARGV[0], GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (obj == INVALID_HANDLE_VALUE) + { + skip("Couldn't create an object for GetSecurityInfo test\n"); + return; + } + + ret = pGetSecurityInfo(obj, SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, + &owner, &group, &dacl, NULL, &sd); + if (ret == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetSecurityInfo is not implemented\n"); + CloseHandle(obj); + return; + } + ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); + ok(sd != NULL, "GetSecurityInfo\n"); + ok(owner != NULL, "GetSecurityInfo\n"); + ok(group != NULL, "GetSecurityInfo\n"); + ok(dacl != NULL, "GetSecurityInfo\n"); + ok(IsValidAcl(dacl), "GetSecurityInfo\n"); + + LocalFree(sd); + + /* If we don't ask for the security descriptor, Windows will still give us + the other stuff, leaving us no way to free it. */ + ret = pGetSecurityInfo(obj, SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, + &owner, &group, &dacl, NULL, NULL); + ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); + ok(owner != NULL, "GetSecurityInfo\n"); + ok(group != NULL, "GetSecurityInfo\n"); + ok(dacl != NULL, "GetSecurityInfo\n"); + ok(IsValidAcl(dacl), "GetSecurityInfo\n"); + + CloseHandle(obj); } START_TEST(security) @@ -2510,4 +2581,5 @@ test_ConvertSecurityDescriptorToString(); test_PrivateObjectSecurity(); test_acls(); -} + test_GetSecurityInfo(); +} Modified: trunk/rostests/winetests/advapi32/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/servic…
============================================================================== --- trunk/rostests/winetests/advapi32/service.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/service.c [iso-8859-1] Sun Sep 14 13:24:25 2008 @@ -33,6 +33,26 @@ static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ +static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID); +static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD, + DWORD, LPBYTE, DWORD, LPDWORD, + LPDWORD, LPDWORD, LPCSTR); +static BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); +static BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); +static BOOL (WINAPI *pQueryServiceStatusEx)(SC_HANDLE, SC_STATUS_TYPE, LPBYTE, + DWORD, LPDWORD); + +static void init_function_pointers(void) +{ + HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); + + pChangeServiceConfig2A = (void*)GetProcAddress(hadvapi32, "ChangeServiceConfig2A"); + pEnumServicesStatusExA= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExA"); + pQueryServiceConfig2A= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2A"); + pQueryServiceConfig2W= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2W"); + pQueryServiceStatusEx= (void*)GetProcAddress(hadvapi32, "QueryServiceStatusEx"); +} + static void test_open_scm(void) { SC_HANDLE scm_handle; @@ -66,7 +86,8 @@ scm_handle = OpenSCManagerA("DOESNOTEXIST", SERVICES_ACTIVE_DATABASEA, SC_MANAGER_CONNECT); ok(!scm_handle, "Expected failure\n"); todo_wine - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE, "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); + ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* w2k8 */, + "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError()); CloseServiceHandle(scm_handle); /* Just in case */ /* Proper call with an empty hostname */ @@ -145,7 +166,17 @@ GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); /* Get the displayname */ GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - /* Try to open the service with this displayname */ + /* Try to open the service with this displayname, unless the displayname equals + * the servicename as that would defeat the purpose of this test. + */ + if (!lstrcmpi(spooler, displayname)) + { + skip("displayname equals servicename\n"); + CloseServiceHandle(scm_handle); + return; + } + + SetLastError(0xdeadbeef); svc_handle = OpenServiceA(scm_handle, displayname, GENERIC_READ); ok(!svc_handle, "Expected failure\n"); ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); @@ -773,6 +804,810 @@ CloseServiceHandle(scm_handle); } +static void test_query_svc(void) +{ + SC_HANDLE scm_handle, svc_handle; + BOOL ret; + SERVICE_STATUS status; + SERVICE_STATUS_PROCESS *statusproc; + DWORD bufsize, needed; + + /* All NULL or wrong */ + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); + + /* Check if 'Spooler' exists. + * Open with not enough rights to query the status. + */ + svc_handle = OpenServiceA(scm_handle, spooler, STANDARD_RIGHTS_READ); + if (!svc_handle) + { + skip("Spooler service doesn't exist\n"); + CloseServiceHandle(scm_handle); + return; + } + + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(svc_handle, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(svc_handle, &status); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* Open the service with just enough rights. + * (Verified with 'SERVICE_ALL_ACCESS &~ SERVICE_QUERY_STATUS') + */ + CloseServiceHandle(svc_handle); + svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS); + + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(svc_handle, &status); + ok(ret, "Expected success\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + + CloseServiceHandle(svc_handle); + + /* More or less the same tests for QueryServiceStatusEx */ + + /* Open service with not enough rights to query the status */ + svc_handle = OpenServiceA(scm_handle, spooler, STANDARD_RIGHTS_READ); + + /* All NULL or wrong, this proves that info level is checked first */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(NULL, 1, NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_LEVEL, + "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + + /* Passing a NULL parameter for the needed buffer size + * will crash on anything but NT4. + */ + + /* Only info level is correct. It looks like the buffer/size is checked second */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(NULL, 0, NULL, 0, &needed); + /* NT4 checks the handle first */ + if (GetLastError() != ERROR_INVALID_HANDLE) + { + ok(!ret, "Expected failure\n"); + ok(needed == sizeof(SERVICE_STATUS_PROCESS), + "Needed buffersize is wrong : %d\n", needed); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + } + + /* Pass a correct buffer and buffersize but a NULL handle */ + statusproc = HeapAlloc(GetProcessHeap(), 0, needed); + bufsize = needed; + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(NULL, 0, (BYTE*)statusproc, bufsize, &needed); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, statusproc); + + /* Correct handle and info level */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, 0, NULL, 0, &needed); + /* NT4 doesn't return the needed size */ + if (GetLastError() != ERROR_INVALID_PARAMETER) + { + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == sizeof(SERVICE_STATUS_PROCESS), + "Needed buffersize is wrong : %d\n", needed); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + } + } + + /* All parameters are OK but we don't have enough rights */ + statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); + bufsize = sizeof(SERVICE_STATUS_PROCESS); + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, 0, (BYTE*)statusproc, bufsize, &needed); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, statusproc); + + /* Open the service with just enough rights. */ + CloseServiceHandle(svc_handle); + svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS); + + /* Everything should be fine now. */ + statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); + bufsize = sizeof(SERVICE_STATUS_PROCESS); + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, 0, (BYTE*)statusproc, bufsize, &needed); + ok(ret, "Expected success\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + if (statusproc->dwCurrentState == SERVICE_RUNNING) + ok(statusproc->dwProcessId != 0, + "Expect a process id for this running service\n"); + else + ok(statusproc->dwProcessId == 0, + "Expect no process id for this stopped service\n"); + HeapFree(GetProcessHeap(), 0, statusproc); + + CloseServiceHandle(svc_handle); + CloseServiceHandle(scm_handle); +} + +static void test_enum_svc(void) +{ + SC_HANDLE scm_handle; + BOOL ret; + DWORD bufsize, needed, returned, resume; + DWORD tempneeded, tempreturned; + DWORD servicecountactive, servicecountinactive; + ENUM_SERVICE_STATUS *services; + ENUM_SERVICE_STATUS_PROCESS *exservices; + INT i; + + /* All NULL or wrong */ + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(NULL, 1, 0, NULL, 0, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + /* Open the service control manager with not enough rights at first */ + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); + + /* Valid handle but rest is still NULL or wrong */ + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 1, 0, NULL, 0, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, NULL, &returned, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + needed = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(needed == 0xdeadbeef, "Expected no change to the needed buffer variable\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* All parameters are correct but our access rights are wrong */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + } + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* Open the service control manager with the needed rights */ + CloseServiceHandle(scm_handle); + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE); + + /* All parameters are correct. Request the needed buffer size */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); + ok(returned == 0, "Expected no service returned, got %d\n", returned); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + + /* Store the needed bytes */ + tempneeded = needed; + + /* Allocate the correct needed bytes */ + services = HeapAlloc(GetProcessHeap(), 0, needed); + bufsize = needed; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, NULL); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned != 0xdeadbeef && returned > 0, "Expected some returned services\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, services); + + /* Store the number of returned services */ + tempreturned = returned; + + /* Allocate less than the needed bytes and don't specify a resume handle */ + services = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, services); + + /* Allocate less than the needed bytes, this time with a correct resume handle */ + services = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + resume = 0; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, &resume); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(resume, "Expected a resume handle\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, services); + + /* Fetch that last service but pass a bigger buffer size */ + services = HeapAlloc(GetProcessHeap(), 0, tempneeded); + bufsize = tempneeded; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, &resume); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned == 1, "Expected only 1 service to be returned\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + ok(resume == 0, "Expected the resume handle to be 0\n"); + HeapFree(GetProcessHeap(), 0, services); + + /* See if things add up */ + + /* Vista only shows the drivers with a state of SERVICE_RUNNING as active + * and doesn't count the others as inactive. This means that Vista could + * show a total that is greater than the sum of active and inactive + * drivers. + * The number of active and inactive drivers is greatly influenced by the + * time when tests are run, immediately after boot or later for example. + * + * Both reasons make calculations for drivers not so useful + */ + + /* Get the number of active win32 services */ + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + servicecountactive = returned; + + /* Get the number of inactive win32 services */ + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + servicecountinactive = returned; + + /* Get the number of win32 services */ + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + /* Check if total is the same as active and inactive win32 services */ + todo_wine + ok(returned == (servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Get all drivers and services + * + * Fetch the status of the last call as failing could make the following tests crash + * on Wine (we don't return anything yet). + */ + EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + ret = EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, + services, needed, &needed, &returned, NULL); + + /* Loop through all those returned drivers and services */ + for (i = 0; ret && i < returned; i++) + { + SERVICE_STATUS status = services[i].ServiceStatus; + + /* lpServiceName and lpDisplayName should always be filled */ + ok(lstrlenA(services[i].lpServiceName) > 0, "Expected a service name\n"); + ok(lstrlenA(services[i].lpDisplayName) > 0, "Expected a display name\n"); + + /* Decrement the counters to see if the functions calls return the same + * numbers as the contents of these structures. + */ + if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) + { + if (status.dwCurrentState == SERVICE_RUNNING) + servicecountactive--; + else + servicecountinactive--; + } + } + HeapFree(GetProcessHeap(), 0, services); + + todo_wine + { + ok(servicecountactive == 0, "Active services mismatch\n"); + ok(servicecountinactive == 0, "Inactive services mismatch\n"); + } + + CloseServiceHandle(scm_handle); + + /* More or less the same for EnumServicesStatusExA */ + + /* All NULL or wrong */ + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(NULL, 1, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_LEVEL, + "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + + /* All NULL or wrong, just the info level is correct */ + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(NULL, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + /* Open the service control manager with not enough rights at first */ + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); + + /* Valid handle and info level but rest is still NULL or wrong */ + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + needed = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(needed == 0xdeadbeef, "Expected no change to the needed buffer variable\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, NULL, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, 0, NULL, 0, + &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate and unknown service group */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, + &returned, NULL, "deadbeef_group"); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* All parameters are correct but our access rights are wrong */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* All parameters are correct, access rights are wrong but the + * group name won't be checked yet. + */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, "deadbeef_group"); + ok(!ret, "Expected failure\n"); + todo_wine + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* Open the service control manager with the needed rights */ + CloseServiceHandle(scm_handle); + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE); + + /* All parameters are correct and the group will be checked */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, "deadbeef_group"); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + } + + /* TODO: Create a test that makes sure we enumerate all services that don't + * belong to a group. (specifying ""). + */ + + /* All parameters are correct. Request the needed buffer size */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected no service returned, got %d\n", returned); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + + /* Store the needed bytes */ + tempneeded = needed; + + /* Allocate the correct needed bytes */ + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + bufsize = needed; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned == tempreturned, "Expected the same number of service from this function\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, exservices); + + /* Store the number of returned services */ + tempreturned = returned; + + /* Allocate less than the needed bytes and don't specify a resume handle */ + exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, exservices); + + /* Allocate less than the needed bytes, this time with a correct resume handle */ + exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + resume = 0; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(resume, "Expected a resume handle\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, exservices); + + /* Fetch that last service but pass a bigger buffer size */ + exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded); + bufsize = tempneeded; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned == 1, "Expected only 1 service to be returned\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + ok(resume == 0, "Expected the resume handle to be 0\n"); + HeapFree(GetProcessHeap(), 0, exservices); + + /* See if things add up */ + + /* Get the number of active win32 services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + servicecountactive = returned; + + /* Get the number of inactive win32 services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + servicecountinactive = returned; + + /* Get the number of win32 services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + /* Check if total is the same as active and inactive win32 services */ + ok(returned == (servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Get all drivers and services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, + SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, + SERVICE_STATE_ALL, (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + + /* Loop through all those returned drivers and services */ + for (i = 0; i < returned; i++) + { + SERVICE_STATUS_PROCESS status = exservices[i].ServiceStatusProcess; + + + /* lpServiceName and lpDisplayName should always be filled */ + ok(lstrlenA(exservices[i].lpServiceName) > 0, "Expected a service name\n"); + ok(lstrlenA(exservices[i].lpDisplayName) > 0, "Expected a display name\n"); + + /* Decrement the counters to see if the functions calls return the + * same numbers as the contents of these structures. + * Check some process id specifics. + */ + if (status.dwServiceType & (SERVICE_FILE_SYSTEM_DRIVER | SERVICE_KERNEL_DRIVER)) + { + /* We shouldn't have a process id for drivers */ + ok(status.dwProcessId == 0, + "This driver shouldn't have an associated process id\n"); + } + + if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) + { + if (status.dwCurrentState == SERVICE_RUNNING) + { + /* We expect a process id for every running service */ + ok(status.dwProcessId > 0, "Expected a process id for this running service (%s)\n", + exservices[i].lpServiceName); + + servicecountactive--; + } + else + { + /* We shouldn't have a process id for inactive services */ + ok(status.dwProcessId == 0, "This service shouldn't have an associated process id\n"); + + servicecountinactive--; + } + } + } + HeapFree(GetProcessHeap(), 0, exservices); + + ok(servicecountactive == 0, "Active services mismatch\n"); + ok(servicecountinactive == 0, "Inactive services mismatch\n"); + + CloseServiceHandle(scm_handle); +} + static void test_close(void) { SC_HANDLE handle; @@ -947,13 +1782,7 @@ static const CHAR dependencies[] = "Master1\0Master2\0+MasterGroup1\0"; static const CHAR password [] = ""; static const CHAR description [] = "Description"; - HMODULE dllhandle = GetModuleHandleA("advapi32.dll"); - BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID) - = (void*)GetProcAddress(dllhandle, "ChangeServiceConfig2A"); - BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD) - = (void*)GetProcAddress(dllhandle, "QueryServiceConfig2A"); - BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD) - = (void*)GetProcAddress(dllhandle, "QueryServiceConfig2W"); + if(!pQueryServiceConfig2A) { skip("function QueryServiceConfig2A not present\n"); @@ -1239,12 +2068,16 @@ } CloseServiceHandle(scm_handle); + init_function_pointers(); + /* First some parameter checking */ test_open_scm(); test_open_svc(); test_create_delete_svc(); test_get_displayname(); test_get_servicekeyname(); + test_query_svc(); + test_enum_svc(); test_close(); /* Test the creation, querying and deletion of a service */ test_sequence();
16 years, 3 months
1
0
0
0
[cwittich] 36246: add missing definitions
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Sep 14 13:22:53 2008 New Revision: 36246 URL:
http://svn.reactos.org/svn/reactos?rev=36246&view=rev
Log: add missing definitions Modified: trunk/reactos/include/psdk/winnt.h Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Sep 14 13:22:53 2008 @@ -486,6 +486,7 @@ #define PROCESS_SET_INFORMATION 512 #define PROCESS_QUERY_INFORMATION 1024 #define PROCESS_SUSPEND_RESUME 2048 +#define PROCESS_QUERY_LIMITED_INFORMATION 0x1000 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF) #endif #define PROCESS_DUP_HANDLE 64 @@ -1164,12 +1165,17 @@ #define HEAP_PSEUDO_TAG_FLAG 0x8000 #define HEAP_TAG_SHIFT 16 #define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b)+(o)<<16))) + #define KEY_QUERY_VALUE 1 #define KEY_SET_VALUE 2 #define KEY_CREATE_SUB_KEY 4 #define KEY_ENUMERATE_SUB_KEYS 8 #define KEY_NOTIFY 16 #define KEY_CREATE_LINK 32 +#define KEY_WOW64_64KEY 0x00000100 +#define KEY_WOW64_32KEY 0x00000200 +#define KEY_WOW64_RES 0x00000300 + #define KEY_WRITE 0x20006 #define KEY_EXECUTE 0x20019 #define KEY_READ 0x20019
16 years, 3 months
1
0
0
0
[ekohl] 36245: Don't user the local attribute twice.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Sep 14 13:16:24 2008 New Revision: 36245 URL:
http://svn.reactos.org/svn/reactos?rev=36245&view=rev
Log: Don't user the local attribute twice. Modified: trunk/reactos/include/dxsdk/vmrender.idl Modified: trunk/reactos/include/dxsdk/vmrender.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/vmrender.idl…
============================================================================== --- trunk/reactos/include/dxsdk/vmrender.idl [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/vmrender.idl [iso-8859-1] Sun Sep 14 13:16:24 2008 @@ -244,7 +244,6 @@ [ local, object, - local, uuid(CE704FE7-E71E-41fb-BAA2-C4403E1182F5), pointer_default(unique) ] @@ -258,7 +257,6 @@ [ local, object, - local, uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52), pointer_default(unique) ] @@ -273,7 +271,6 @@ [ local, object, - local, uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2), pointer_default(unique) ] @@ -290,7 +287,6 @@ [ local, object, - local, uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7), pointer_default(unique) ] @@ -316,7 +312,6 @@ [ local, object, - local, uuid(1c1a17b0-bed0-415d-974b-dc6696131599), pointer_default(unique) ] @@ -414,7 +409,6 @@ [ local, object, - local, uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82), pointer_default(unique) ] @@ -443,7 +437,6 @@ [ local, object, - local, uuid(a9849bbe-9ec8-4263-b764-62730f0d15d0), pointer_default(unique) ] @@ -458,7 +451,6 @@ [ local, object, - local, uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178), pointer_default(unique) ] @@ -472,7 +464,6 @@ [ local, object, - local, uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea), pointer_default(unique) ] @@ -486,7 +477,6 @@ [ local, object, - local, uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a), pointer_default(unique) ]
16 years, 3 months
1
0
0
0
[fireball] 36244: - Don't call MmLoadSystemImage with a NULL ModuleHandle. This could allow a simplification of the SystemLoadGdiDriverInformation function.
by fireball@svn.reactos.org
Author: fireball Date: Sun Sep 14 12:58:27 2008 New Revision: 36244 URL:
http://svn.reactos.org/svn/reactos?rev=36244&view=rev
Log: - Don't call MmLoadSystemImage with a NULL ModuleHandle. This could allow a simplification of the SystemLoadGdiDriverInformation function. Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sun Sep 14 12:58:27 2008 @@ -1266,6 +1266,7 @@ KPROCESSOR_MODE PreviousMode = KeGetPreviousMode(); UNICODE_STRING ImageName; PVOID ImageBase; + PLDR_DATA_TABLE_ENTRY ModuleObject; ULONG_PTR EntryPoint; NTSTATUS Status; ULONG DirSize; @@ -1287,7 +1288,7 @@ NULL, NULL, 0, - NULL, + (PVOID)&ModuleObject, &ImageBase); if (!NT_SUCCESS(Status)) return Status;
16 years, 3 months
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
75
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200