ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2005
----- 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
23 participants
669 discussions
Start a n
N
ew thread
[weiden] 16938: fixed some uninitialized variables warnings
by weiden@svn.reactos.com
fixed some uninitialized variables warnings Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-08-01 09:08:07 UTC (rev 16937) +++ trunk/reactos/lib/setupapi/devinst.c 2005-08-01 09:23:13 UTC (rev 16938) @@ -761,7 +761,7 @@ LPWSTR InfSectionNameW = NULL; PWSTR InfSectionWithExtW = NULL; PWSTR ExtensionW; - BOOL bResult; + BOOL bResult = FALSE; TRACE("\n"); @@ -932,6 +932,8 @@ goto end; } } + else + ClassDescriptionW = NULL; if (MachineName) { @@ -2005,7 +2007,7 @@ { if (bIsStringProperty && PropertyBufferSize > 0) { - if (WideCharToMultiByte(CP_ACP, 0, (LPWSTR)PropertyBufferW, RequiredSizeW / sizeof(WCHAR), PropertyBuffer, PropertyBufferSize, NULL, NULL) == 0) + if (WideCharToMultiByte(CP_ACP, 0, (LPWSTR)PropertyBufferW, RequiredSizeW / sizeof(WCHAR), (LPSTR)PropertyBuffer, PropertyBufferSize, NULL, NULL) == 0) { /* Last error is already set by WideCharToMultiByte */ bResult = FALSE; @@ -2067,9 +2069,6 @@ switch (Property) { - LPCWSTR RegistryPropertyName; - DWORD BufferSize; - case SPDRP_CAPABILITIES: case SPDRP_CLASS: case SPDRP_CLASSGUID: @@ -2087,6 +2086,9 @@ case SPDRP_UI_NUMBER: case SPDRP_UPPERFILTERS: { + LPCWSTR RegistryPropertyName; + DWORD BufferSize; + switch (Property) { case SPDRP_CAPABILITIES: @@ -2123,7 +2125,7 @@ RegistryPropertyName = L"UpperFilters"; break; default: /* Should not happen */ - break; + RegistryPropertyName = NULL; break; } /* Open registry key name */
19 years, 4 months
1
0
0
0
[hpoussin] 16937: Add back changes of revision 16783. Sorry Alex
by hpoussin@svn.reactos.com
Add back changes of revision 16783. Sorry Alex Modified: trunk/reactos/lib/setupapi/queue.c _____ Modified: trunk/reactos/lib/setupapi/queue.c --- trunk/reactos/lib/setupapi/queue.c 2005-08-01 09:05:20 UTC (rev 16936) +++ trunk/reactos/lib/setupapi/queue.c 2005-08-01 09:08:07 UTC (rev 16937) @@ -979,8 +979,8 @@ if ((GetFileAttributesW(target) != INVALID_FILE_ATTRIBUTES) && (GetFileAttributesW(source) != INVALID_FILE_ATTRIBUTES)) { - VersionSizeSource = GetFileVersionInfoSizeW(source,&zero); - VersionSizeTarget = GetFileVersionInfoSizeW(target,&zero); + VersionSizeSource = GetFileVersionInfoSizeW((LPWSTR)source,&zero); + VersionSizeTarget = GetFileVersionInfoSizeW((LPWSTR)target,&zero); } TRACE("SizeTarget %li ... SizeSource %li\n",VersionSizeTarget, @@ -999,9 +999,9 @@ VersionSource = HeapAlloc(GetProcessHeap(),0,VersionSizeSource); VersionTarget = HeapAlloc(GetProcessHeap(),0,VersionSizeTarget); - ret = GetFileVersionInfoW(source,0,VersionSizeSource,VersionSource); + ret = GetFileVersionInfoW((LPWSTR)source,0,VersionSizeSource,VersionSource); if (ret) - ret = GetFileVersionInfoW(target, 0, VersionSizeTarget, + ret = GetFileVersionInfoW((LPWSTR)target, 0, VersionSizeTarget, VersionTarget); if (ret)
19 years, 4 months
1
0
0
0
[navaraf] 16936: Cleanup SID initialization and fill all SeExports fields.
by navaraf@svn.reactos.com
Cleanup SID initialization and fill all SeExports fields. Modified: trunk/reactos/ntoskrnl/include/internal/se.h Modified: trunk/reactos/ntoskrnl/se/priv.c Modified: trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/se/sid.c _____ Modified: trunk/reactos/ntoskrnl/include/internal/se.h --- trunk/reactos/ntoskrnl/include/internal/se.h 2005-08-01 08:58:15 UTC (rev 16935) +++ trunk/reactos/ntoskrnl/include/internal/se.h 2005-08-01 09:05:20 UTC (rev 16936) @@ -37,6 +37,9 @@ extern PSID SeAliasSystemOpsSid; extern PSID SeAliasPrintOpsSid; extern PSID SeAliasBackupOpsSid; +extern PSID SeAuthenticatedUsersSid; +extern PSID SeRestrictedSid; +extern PSID SeAnonymousLogonSid; /* Privileges */ extern LUID SeCreateTokenPrivilege; @@ -62,6 +65,9 @@ extern LUID SeSystemEnvironmentPrivilege; extern LUID SeChangeNotifyPrivilege; extern LUID SeRemoteShutdownPrivilege; +extern LUID SeUndockPrivilege; +extern LUID SeSyncAgentPrivilege; +extern LUID SeEnableDelegationPrivilege; /* DACLs */ extern PACL SePublicDefaultUnrestrictedDacl; _____ Modified: trunk/reactos/ntoskrnl/se/priv.c --- trunk/reactos/ntoskrnl/se/priv.c 2005-08-01 08:58:15 UTC (rev 16935) +++ trunk/reactos/ntoskrnl/se/priv.c 2005-08-01 09:05:20 UTC (rev 16936) @@ -40,6 +40,9 @@ LUID SeSystemEnvironmentPrivilege; LUID SeChangeNotifyPrivilege; LUID SeRemoteShutdownPrivilege; +LUID SeUndockPrivilege; +LUID SeSyncAgentPrivilege; +LUID SeEnableDelegationPrivilege; /* FUNCTIONS ***************************************************************/ @@ -93,6 +96,12 @@ SeChangeNotifyPrivilege.HighPart = 0; SeRemoteShutdownPrivilege.LowPart = SE_REMOTE_SHUTDOWN_PRIVILEGE; SeRemoteShutdownPrivilege.HighPart = 0; + SeUndockPrivilege.LowPart = SE_UNDOCK_PRIVILEGE; + SeUndockPrivilege.HighPart = 0; + SeSyncAgentPrivilege.LowPart = SE_SYNC_AGENT_PRIVILEGE; + SeSyncAgentPrivilege.HighPart = 0; + SeEnableDelegationPrivilege.LowPart = SE_ENABLE_DELEGATION_PRIVILEGE; + SeEnableDelegationPrivilege.HighPart = 0; } _____ Modified: trunk/reactos/ntoskrnl/se/semgr.c --- trunk/reactos/ntoskrnl/se/semgr.c 2005-08-01 08:58:15 UTC (rev 16935) +++ trunk/reactos/ntoskrnl/se/semgr.c 2005-08-01 09:05:20 UTC (rev 16936) @@ -165,7 +165,14 @@ SepExports.SeAliasSystemOpsSid = SeAliasSystemOpsSid; SepExports.SeAliasPrintOpsSid = SeAliasPrintOpsSid; SepExports.SeAliasBackupOpsSid = SeAliasBackupOpsSid; + SepExports.SeAuthenticatedUsersSid = SeAuthenticatedUsersSid; + SepExports.SeRestrictedSid = SeRestrictedSid; + SepExports.SeAnonymousLogonSid = SeAnonymousLogonSid; + SepExports.SeUndockPrivilege = SeUndockPrivilege; + SepExports.SeSyncAgentPrivilege = SeSyncAgentPrivilege; + SepExports.SeEnableDelegationPrivilege = SeEnableDelegationPrivilege; + SeExports = &SepExports; return TRUE; } _____ Modified: trunk/reactos/ntoskrnl/se/sid.c --- trunk/reactos/ntoskrnl/se/sid.c 2005-08-01 08:58:15 UTC (rev 16935) +++ trunk/reactos/ntoskrnl/se/sid.c 2005-08-01 09:05:20 UTC (rev 16936) @@ -36,7 +36,6 @@ PSID SeBatchSid = NULL; PSID SeInteractiveSid = NULL; PSID SeServiceSid = NULL; -PSID SeAnonymousLogonSid = NULL; PSID SePrincipalSelfSid = NULL; PSID SeLocalSystemSid = NULL; PSID SeAuthenticatedUserSid = NULL; @@ -49,6 +48,9 @@ PSID SeAliasSystemOpsSid = NULL; PSID SeAliasPrintOpsSid = NULL; PSID SeAliasBackupOpsSid = NULL; +PSID SeAuthenticatedUsersSid = NULL; +PSID SeRestrictedSid = NULL; +PSID SeAnonymousLogonSid = NULL; /* FUNCTIONS ****************************************************************/ @@ -67,398 +69,153 @@ SidLength2 = RtlLengthRequiredSid(2); /* create NullSid */ - SeNullSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeNullSid == NULL) + SeNullSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeWorldSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeLocalSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeCreatorOwnerSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeCreatorGroupSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeCreatorOwnerServerSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeCreatorGroupServerSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeNtAuthoritySid = ExAllocatePoolWithTag(PagedPool, SidLength0, TAG_SID); + SeDialupSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeNetworkSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeBatchSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeInteractiveSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeServiceSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SePrincipalSelfSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeLocalSystemSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeAuthenticatedUserSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeRestrictedCodeSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeAliasAdminsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasUsersSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasGuestsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasPowerUsersSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasAccountOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasSystemOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasPrintOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAliasBackupOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); + SeAuthenticatedUsersSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeRestrictedSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + SeAnonymousLogonSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); + + if (SeNullSid == NULL || SeNullSid == NULL || SeWorldSid == NULL || + SeLocalSid == NULL || SeCreatorOwnerSid == NULL || + SeCreatorGroupSid == NULL || SeCreatorOwnerServerSid == NULL || + SeCreatorGroupServerSid == NULL || SeNtAuthoritySid == NULL || + SeDialupSid == NULL || SeNetworkSid == NULL || SeBatchSid == NULL || + SeInteractiveSid == NULL || SeServiceSid == NULL || + SePrincipalSelfSid == NULL || SeLocalSystemSid == NULL || + SeAuthenticatedUserSid == NULL || SeRestrictedCodeSid == NULL || + SeAliasAdminsSid == NULL || SeAliasUsersSid == NULL || + SeAliasGuestsSid == NULL || SeAliasPowerUsersSid == NULL || + SeAliasAccountOpsSid == NULL || SeAliasSystemOpsSid == NULL || + SeAliasPrintOpsSid == NULL || SeAliasBackupOpsSid == NULL || + SeAuthenticatedUsersSid == NULL || SeRestrictedSid == NULL || + SeAnonymousLogonSid == NULL) + { + /* FIXME: We're leaking memory here. */ return(FALSE); + } - RtlInitializeSid(SeNullSid, - &SeNullSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeNullSid, - 0); - *SubAuthority = SECURITY_NULL_RID; + RtlInitializeSid(SeNullSid, &SeNullSidAuthority, 1); + RtlInitializeSid(SeWorldSid, &SeWorldSidAuthority, 1); + RtlInitializeSid(SeLocalSid, &SeLocalSidAuthority, 1); + RtlInitializeSid(SeCreatorOwnerSid, &SeCreatorSidAuthority, 1); + RtlInitializeSid(SeCreatorGroupSid, &SeCreatorSidAuthority, 1); + RtlInitializeSid(SeCreatorOwnerServerSid, &SeCreatorSidAuthority, 1); + RtlInitializeSid(SeCreatorGroupServerSid, &SeCreatorSidAuthority, 1); + RtlInitializeSid(SeNtAuthoritySid, &SeNtSidAuthority, 0); + RtlInitializeSid(SeDialupSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeNetworkSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeBatchSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeInteractiveSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeServiceSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SePrincipalSelfSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeLocalSystemSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeAuthenticatedUserSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeRestrictedCodeSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeAliasAdminsSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasUsersSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasGuestsSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasPowerUsersSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasAccountOpsSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasSystemOpsSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasPrintOpsSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAliasBackupOpsSid, &SeNtSidAuthority, 2); + RtlInitializeSid(SeAuthenticatedUsersSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeRestrictedSid, &SeNtSidAuthority, 1); + RtlInitializeSid(SeAnonymousLogonSid, &SeNtSidAuthority, 1); - /* create WorldSid */ - SeWorldSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeWorldSid == NULL) - return(FALSE); - - RtlInitializeSid(SeWorldSid, - &SeWorldSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeWorldSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeNullSid, 0); + *SubAuthority = SECURITY_NULL_RID; + SubAuthority = RtlSubAuthoritySid(SeWorldSid, 0); *SubAuthority = SECURITY_WORLD_RID; - - /* create LocalSid */ - SeLocalSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeLocalSid == NULL) - return(FALSE); - - RtlInitializeSid(SeLocalSid, - &SeLocalSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeLocalSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeLocalSid, 0); *SubAuthority = SECURITY_LOCAL_RID; - - /* create CreatorOwnerSid */ - SeCreatorOwnerSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeCreatorOwnerSid == NULL) - return(FALSE); - - RtlInitializeSid(SeCreatorOwnerSid, - &SeCreatorSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerSid, 0); *SubAuthority = SECURITY_CREATOR_OWNER_RID; - - /* create CreatorGroupSid */ - SeCreatorGroupSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeCreatorGroupSid == NULL) - return(FALSE); - - RtlInitializeSid(SeCreatorGroupSid, - &SeCreatorSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeCreatorGroupSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeCreatorGroupSid, 0); *SubAuthority = SECURITY_CREATOR_GROUP_RID; - - /* create CreatorOwnerServerSid */ - SeCreatorOwnerServerSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeCreatorOwnerServerSid == NULL) - return(FALSE); - - RtlInitializeSid(SeCreatorOwnerServerSid, - &SeCreatorSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerServerSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerServerSid, 0); *SubAuthority = SECURITY_CREATOR_OWNER_SERVER_RID; - - /* create CreatorGroupServerSid */ - SeCreatorGroupServerSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeCreatorGroupServerSid == NULL) - return(FALSE); - - RtlInitializeSid(SeCreatorGroupServerSid, - &SeCreatorSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeCreatorGroupServerSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeCreatorGroupServerSid, 0); *SubAuthority = SECURITY_CREATOR_GROUP_SERVER_RID; - - - /* create NtAuthoritySid */ - SeNtAuthoritySid = ExAllocatePoolWithTag(PagedPool, - SidLength0, - TAG_SID); - if (SeNtAuthoritySid == NULL) - return(FALSE); - - RtlInitializeSid(SeNtAuthoritySid, - &SeNtSidAuthority, - 0); - - /* create DialupSid */ - SeDialupSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeDialupSid == NULL) - return(FALSE); - - RtlInitializeSid(SeDialupSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeDialupSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeDialupSid, 0); *SubAuthority = SECURITY_DIALUP_RID; - - /* create NetworkSid */ - SeNetworkSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeNetworkSid == NULL) - return(FALSE); - - RtlInitializeSid(SeNetworkSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeNetworkSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeNetworkSid, 0); *SubAuthority = SECURITY_NETWORK_RID; - - /* create BatchSid */ - SeBatchSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeBatchSid == NULL) - return(FALSE); - - RtlInitializeSid(SeBatchSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeBatchSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeBatchSid, 0); *SubAuthority = SECURITY_BATCH_RID; - - /* create InteractiveSid */ - SeInteractiveSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeInteractiveSid == NULL) - return(FALSE); - - RtlInitializeSid(SeInteractiveSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeInteractiveSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeInteractiveSid, 0); *SubAuthority = SECURITY_INTERACTIVE_RID; - - /* create ServiceSid */ - SeServiceSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeServiceSid == NULL) - return(FALSE); - - RtlInitializeSid(SeServiceSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeServiceSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeServiceSid, 0); *SubAuthority = SECURITY_SERVICE_RID; - - /* create AnonymousLogonSid */ - SeAnonymousLogonSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeAnonymousLogonSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAnonymousLogonSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeAnonymousLogonSid, - 0); - *SubAuthority = SECURITY_ANONYMOUS_LOGON_RID; - - /* create PrincipalSelfSid */ - SePrincipalSelfSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SePrincipalSelfSid == NULL) - return(FALSE); - - RtlInitializeSid(SePrincipalSelfSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SePrincipalSelfSid, - 0); + SubAuthority = RtlSubAuthoritySid(SePrincipalSelfSid, 0); *SubAuthority = SECURITY_PRINCIPAL_SELF_RID; - - /* create LocalSystemSid */ - SeLocalSystemSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeLocalSystemSid == NULL) - return(FALSE); - - RtlInitializeSid(SeLocalSystemSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeLocalSystemSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeLocalSystemSid, 0); *SubAuthority = SECURITY_LOCAL_SYSTEM_RID; - - /* create AuthenticatedUserSid */ - SeAuthenticatedUserSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeAuthenticatedUserSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAuthenticatedUserSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUserSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUserSid, 0); *SubAuthority = SECURITY_AUTHENTICATED_USER_RID; - - /* create RestrictedCodeSid */ - SeRestrictedCodeSid = ExAllocatePoolWithTag(PagedPool, - SidLength1, - TAG_SID); - if (SeRestrictedCodeSid == NULL) - return(FALSE); - - RtlInitializeSid(SeRestrictedCodeSid, - &SeNtSidAuthority, - 1); - SubAuthority = RtlSubAuthoritySid(SeRestrictedCodeSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeRestrictedCodeSid, 0); *SubAuthority = SECURITY_RESTRICTED_CODE_RID; - - /* create AliasAdminsSid */ - SeAliasAdminsSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasAdminsSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasAdminsSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_ADMINS; - - /* create AliasUsersSid */ - SeAliasUsersSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasUsersSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasUsersSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_USERS; - - /* create AliasGuestsSid */ - SeAliasGuestsSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasGuestsSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasGuestsSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_GUESTS; - - /* create AliasPowerUsersSid */ - SeAliasPowerUsersSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasPowerUsersSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasPowerUsersSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_POWER_USERS; - - /* create AliasAccountOpsSid */ - SeAliasAccountOpsSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasAccountOpsSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasAccountOpsSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_ACCOUNT_OPS; - - /* create AliasSystemOpsSid */ - SeAliasSystemOpsSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasSystemOpsSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasSystemOpsSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_SYSTEM_OPS; - - /* create AliasPrintOpsSid */ - SeAliasPrintOpsSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasPrintOpsSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasPrintOpsSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_PRINT_OPS; - - /* create AliasBackupOpsSid */ - SeAliasBackupOpsSid = ExAllocatePoolWithTag(PagedPool, - SidLength2, - TAG_SID); - if (SeAliasBackupOpsSid == NULL) - return(FALSE); - - RtlInitializeSid(SeAliasBackupOpsSid, - &SeNtSidAuthority, - 2); - SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, - 0); + SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, 0); *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID; - - SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, - 1); + SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, 1); *SubAuthority = DOMAIN_ALIAS_RID_BACKUP_OPS; + SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUsersSid, 0); + *SubAuthority = SECURITY_AUTHENTICATED_USER_RID; + SubAuthority = RtlSubAuthoritySid(SeRestrictedSid, 0); + *SubAuthority = SECURITY_RESTRICTED_CODE_RID; + SubAuthority = RtlSubAuthoritySid(SeAnonymousLogonSid, 0); + *SubAuthority = SECURITY_ANONYMOUS_LOGON_RID; return(TRUE); }
19 years, 4 months
1
0
0
0
[navaraf] 16935: Fix LdrAccessResource for ordinary mapped files.
by navaraf@svn.reactos.com
Fix LdrAccessResource for ordinary mapped files. Modified: trunk/reactos/ntoskrnl/ldr/resource.c _____ Modified: trunk/reactos/ntoskrnl/ldr/resource.c --- trunk/reactos/ntoskrnl/ldr/resource.c 2005-08-01 08:56:51 UTC (rev 16934) +++ trunk/reactos/ntoskrnl/ldr/resource.c 2005-08-01 08:58:15 UTC (rev 16935) @@ -43,10 +43,10 @@ if (Data == 0) return STATUS_RESOURCE_DATA_NOT_FOUND; - if ((ULONG)BaseAddress & 1) + if ((ULONG_PTR)BaseAddress & 1) { /* loaded as ordinary file */ - NtHeader = RtlImageNtHeader((PVOID)((ULONG)BaseAddress & ~1UL)); + NtHeader = RtlImageNtHeader((PVOID)((ULONG_PTR)BaseAddress & ~1)); Offset = (ULONG)BaseAddress - Data + NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].V irtualAddress; Section = RtlImageRvaToSection (NtHeader, BaseAddress, NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].V irtualAddress); if (Section == NULL) @@ -64,7 +64,7 @@ if (Resource) { - *Resource = (PVOID)(ResourceDataEntry->OffsetToData - Offset + (ULONG)BaseAddress); + *Resource = (PVOID)(ResourceDataEntry->OffsetToData - Offset + ((ULONG_PTR)BaseAddress & ~1)); } if (Size)
19 years, 4 months
1
0
0
0
[navaraf] 16934: Fix DPRINT.
by navaraf@svn.reactos.com
Fix DPRINT. Modified: trunk/reactos/ntoskrnl/ldr/loader.c _____ Modified: trunk/reactos/ntoskrnl/ldr/loader.c --- trunk/reactos/ntoskrnl/ldr/loader.c 2005-08-01 08:55:22 UTC (rev 16933) +++ trunk/reactos/ntoskrnl/ldr/loader.c 2005-08-01 08:56:51 UTC (rev 16934) @@ -558,7 +558,7 @@ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); DPRINT("Comparing %wZ and %wZ\n", - &Module->BaseName, + &Module->BaseDllName, ModuleName); if (!LdrpCompareModuleNames(&Module->BaseDllName, ModuleName))
19 years, 4 months
1
0
0
0
[navaraf] 16933: Fix paramater validation and pointer manipulation in RtlAddAce.
by navaraf@svn.reactos.com
Fix paramater validation and pointer manipulation in RtlAddAce. Modified: trunk/reactos/lib/rtl/acl.c _____ Modified: trunk/reactos/lib/rtl/acl.c --- trunk/reactos/lib/rtl/acl.c 2005-08-01 08:50:30 UTC (rev 16932) +++ trunk/reactos/lib/rtl/acl.c 2005-08-01 08:55:22 UTC (rev 16933) @@ -266,9 +266,9 @@ ULONG AceListLength) { PACE Ace; - ULONG i; PACE Current; - ULONG j; + ULONG NewAceCount; + ULONG Index; PAGED_CODE_RTL(); @@ -289,41 +289,35 @@ return(STATUS_INVALID_PARAMETER); } - i = 0; - Current = (PACE)(Acl + 1); - while ((ULONG_PTR)Current < ((ULONG_PTR)AceList + AceListLength)) + for (Current = AceList, NewAceCount = 0; + (ULONG_PTR)Current < ((ULONG_PTR)AceList + AceListLength); + Current = (PACE)((ULONG_PTR)Current + Current->Header.AceSize), + ++NewAceCount) { if (AceList->Header.AceType == ACCESS_ALLOWED_COMPOUND_ACE_TYPE && AclRevision < ACL_REVISION3) { return(STATUS_INVALID_PARAMETER); } - Current = (PACE)((ULONG_PTR)Current + Current->Header.AceSize); } if (Ace == NULL || - ((ULONG_PTR)Ace + AceListLength) >= ((ULONG_PTR)Acl + Acl->AclSize)) + ((ULONG_PTR)Ace + AceListLength) > ((ULONG_PTR)Acl + Acl->AclSize)) { return(STATUS_BUFFER_TOO_SMALL); } - if (StartingIndex != 0) + Current = (PACE)(Acl + 1); + for (Index = 0; Index < StartingIndex && Index < Acl->AceCount; Index++) { - if (Acl->AceCount > 0) - { - Current = (PACE)(Acl + 1); - for (j = 0; j < StartingIndex; j++) - { - Current = (PACE)((ULONG_PTR)Current + Current->Header.AceSize); - } - } + Current = (PACE)((ULONG_PTR)Current + Current->Header.AceSize); } RtlpAddData(AceList, AceListLength, Current, (ULONG)((ULONG_PTR)Ace - (ULONG_PTR)Current)); - Acl->AceCount = Acl->AceCount + i; + Acl->AceCount = Acl->AceCount + NewAceCount; Acl->AclRevision = AclRevision; return(STATUS_SUCCESS);
19 years, 4 months
1
0
0
0
[navaraf] 16932: Fix locking in RtlPinAtomInAtomTable.
by navaraf@svn.reactos.com
Fix locking in RtlPinAtomInAtomTable. Modified: trunk/reactos/lib/rtl/atom.c _____ Modified: trunk/reactos/lib/rtl/atom.c --- trunk/reactos/lib/rtl/atom.c 2005-08-01 07:46:06 UTC (rev 16931) +++ trunk/reactos/lib/rtl/atom.c 2005-08-01 08:50:30 UTC (rev 16932) @@ -557,8 +557,6 @@ RtlpUnlockAtomTable(AtomTable); } - RtlpLockAtomTable(AtomTable); - return Status; }
19 years, 4 months
1
0
0
0
[hpoussin] 16931: Merge from Wine:
by hpoussin@svn.reactos.com
Merge from Wine: - Add traces at the start of functions - (reported by Matthew Davison) Preserve the spaces before an opening quote in the middle of a token. - Matthew Davison <mjd77(a)cam.ac.uk> Stub out the error dialog functions. Modify the default callbacks to call these for Delete and Rename errors. Modify the default callbacks to ignore file missing errors when deleting files. - Stefan Huehner <stefan(a)huehner.org> Fix some more -Wmissing-declarations warnings. - Mike McCormack <mike(a)codeweavers.com> gcc 4.0 -Wpointer-sign fixes (Reg* functions). - Detlef Riekenberg <wine.dev(a)web.de> SetupSetFileQueueAlternatePlatform{AW} implemented as stub. Modified: trunk/reactos/include/wine/setupapi.h Modified: trunk/reactos/lib/setupapi/misc.c Modified: trunk/reactos/lib/setupapi/parser.c Modified: trunk/reactos/lib/setupapi/queue.c Modified: trunk/reactos/lib/setupapi/setupapi.spec Modified: trunk/reactos/lib/setupapi/setupx_main.c Modified: trunk/reactos/lib/setupapi/virtcopy.c _____ Modified: trunk/reactos/include/wine/setupapi.h --- trunk/reactos/include/wine/setupapi.h 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/include/wine/setupapi.h 2005-08-01 07:46:06 UTC (rev 16931) @@ -668,6 +668,14 @@ #define SPDRP_MAXIMUM_PROPERTY 0x00000023 +/* Return values for SetupCopyError/SetupDeleteError/SetupRenameError */ +#define DPROMPT_SUCCESS 0x00000000 +#define DPROMPT_CANCEL 0x00000001 +#define DPROMPT_SKIPFILE 0x00000002 +#define DPROMPT_BUFFERTOOSMALL 0x00000003 +#define DPROMPT_OUTOFMEMORY 0x00000004 + + /* Flags for StringTableAddString and StringTableLookUpString */ #define ST_CASE_SENSITIVE_COMPARE 0x00000001 @@ -702,9 +710,15 @@ BOOL WINAPI SetupCommitFileQueueA( HWND, HSPFILEQ, PSP_FILE_CALLBACK_A, PVOID ); BOOL WINAPI SetupCommitFileQueueW( HWND, HSPFILEQ, PSP_FILE_CALLBACK_W, PVOID ); #define SetupCommitFileQueue WINELIB_NAME_AW(SetupCommitFileQueue) +UINT WINAPI SetupCopyErrorA( HWND, PCSTR, PCSTR, PCSTR, PCSTR, PCSTR, UINT, DWORD, PSTR, DWORD, PDWORD ); +UINT WINAPI SetupCopyErrorW( HWND, PCWSTR, PCWSTR, PCWSTR, PCWSTR, PCWSTR, UINT, DWORD, PWSTR, DWORD, PDWORD ); +#define SetupCopyError WINELIB_NAME_AW(SetupCopyError) UINT WINAPI SetupDefaultQueueCallbackA( PVOID, UINT, UINT_PTR, UINT_PTR ); UINT WINAPI SetupDefaultQueueCallbackW( PVOID, UINT, UINT_PTR, UINT_PTR ); #define SetupDefaultQueueCallback WINELIB_NAME_AW(SetupDefaultQueueCallback) +UINT WINAPI SetupDeleteErrorA( HWND, PCSTR, PCSTR, UINT, DWORD ); +UINT WINAPI SetupDeleteErrorW( HWND, PCWSTR, PCWSTR, UINT, DWORD ); +#define SetupDeleteError WINELIB_NAME_AW(SetupDeleteError) BOOL WINAPI SetupDiBuildClassInfoList(DWORD, LPGUID, DWORD, PDWORD); BOOL WINAPI SetupDiBuildClassInfoListExA(DWORD, LPGUID, DWORD, PDWORD, PCSTR, PVOID); BOOL WINAPI SetupDiBuildClassInfoListExW(DWORD, LPGUID, DWORD, PDWORD, PCWSTR, PVOID); @@ -831,6 +845,9 @@ BOOL WINAPI SetupQueueRenameSectionA( HSPFILEQ, HINF, HINF, PCSTR ); BOOL WINAPI SetupQueueRenameSectionW( HSPFILEQ, HINF, HINF, PCWSTR ); #define SetupQueueRenameSection WINELIB_NAME_AW(SetupQueueRenameSection) +UINT WINAPI SetupRenameErrorA( HWND, PCSTR, PCSTR, PCSTR, UINT, DWORD ); +UINT WINAPI SetupRenameErrorW( HWND, PCWSTR, PCWSTR, PCWSTR, UINT, DWORD ); +#define SetupRenameError WINELIB_NAME_AW(SetupRenameError) BOOL WINAPI SetupScanFileQueueA( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_A, PVOID, PDWORD ); BOOL WINAPI SetupScanFileQueueW( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_W, PVOID, PDWORD ); #define SetupScanFileQueue WINELIB_NAME_AW(SetupScanFileQueue) _____ Modified: trunk/reactos/lib/setupapi/misc.c --- trunk/reactos/lib/setupapi/misc.c 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/lib/setupapi/misc.c 2005-08-01 07:46:06 UTC (rev 16931) @@ -25,7 +25,6 @@ #include "wingdi.h" #include "winuser.h" #include "winreg.h" -#include "winver.h" #include "setupapi.h" #include "wine/unicode.h" @@ -162,7 +161,7 @@ { LONG lError; - TRACE("%lx %s %p %p %p\n", + TRACE("%p %s %p %p %p\n", hKey, debugstr_w(lpValueName), lpData, lpType, lpcbData); /* Get required buffer size */ @@ -284,7 +283,7 @@ LPWSTR lpUnicodeStr; int nLength; - TRACE("%s %lu\n", debugstr_a(lpMultiByteStr), uCodePage); + TRACE("%s %d\n", debugstr_a(lpMultiByteStr), uCodePage); nLength = MultiByteToWideChar(uCodePage, 0, lpMultiByteStr, -1, NULL, 0); @@ -327,7 +326,7 @@ LPSTR lpMultiByteStr; int nLength; - TRACE("%s %lu\n", debugstr_w(lpUnicodeStr), uCodePage); + TRACE("%s %d\n", debugstr_w(lpUnicodeStr), uCodePage); nLength = WideCharToMultiByte(uCodePage, 0, lpUnicodeStr, -1, NULL, 0, NULL, NULL); @@ -667,7 +666,7 @@ */ BOOL WINAPI UnmapAndCloseFile(HANDLE hFile, HANDLE hMapping, LPVOID lpBuffer) { - TRACE("%x %x %p\n", + TRACE("%p %p %p\n", hFile, hMapping, lpBuffer); if (!UnmapViewOfFile(lpBuffer)) _____ Modified: trunk/reactos/lib/setupapi/parser.c --- trunk/reactos/lib/setupapi/parser.c 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/lib/setupapi/parser.c 2005-08-01 07:46:06 UTC (rev 16931) @@ -647,7 +647,7 @@ set_state( parser, COMMENT ); return p + 1; case '"': - push_token( parser, token_end ); + push_token( parser, p ); parser->start = p + 1; push_state( parser, KEY_NAME ); set_state( parser, QUOTES ); @@ -699,7 +699,7 @@ set_state( parser, LEADING_SPACES ); return p + 1; case '"': - push_token( parser, token_end ); + push_token( parser, p ); parser->start = p + 1; push_state( parser, VALUE_NAME ); set_state( parser, QUOTES ); _____ Modified: trunk/reactos/lib/setupapi/queue.c --- trunk/reactos/lib/setupapi/queue.c 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/lib/setupapi/queue.c 2005-08-01 07:46:06 UTC (rev 16931) @@ -979,8 +979,8 @@ if ((GetFileAttributesW(target) != INVALID_FILE_ATTRIBUTES) && (GetFileAttributesW(source) != INVALID_FILE_ATTRIBUTES)) { - VersionSizeSource = GetFileVersionInfoSizeW((LPWSTR)source,&zero); - VersionSizeTarget = GetFileVersionInfoSizeW((LPWSTR)target,&zero); + VersionSizeSource = GetFileVersionInfoSizeW(source,&zero); + VersionSizeTarget = GetFileVersionInfoSizeW(target,&zero); } TRACE("SizeTarget %li ... SizeSource %li\n",VersionSizeTarget, @@ -999,9 +999,9 @@ VersionSource = HeapAlloc(GetProcessHeap(),0,VersionSizeSource); VersionTarget = HeapAlloc(GetProcessHeap(),0,VersionSizeTarget); - ret = GetFileVersionInfoW((LPWSTR)source,0,VersionSizeSource,VersionSource); + ret = GetFileVersionInfoW(source,0,VersionSizeSource,VersionSource); if (ret) - ret = GetFileVersionInfoW((LPWSTR)target, 0, VersionSizeTarget, + ret = GetFileVersionInfoW(target, 0, VersionSizeTarget, VersionTarget); if (ret) @@ -1268,6 +1268,26 @@ /*********************************************************************** + * SetupSetFileQueueAlternatePlatformA (SETUPAPI.@) + */ +BOOL WINAPI SetupSetFileQueueAlternatePlatformA(HSPFILEQ handle, PSP_ALTPLATFORM_INFO platform, PCSTR catalogfile) +{ + FIXME("(%p, %p, %s) stub!\n", handle, platform, debugstr_a(catalogfile)); + return FALSE; +} + + +/********************************************************************** * + * SetupSetFileQueueAlternatePlatformW (SETUPAPI.@) + */ +BOOL WINAPI SetupSetFileQueueAlternatePlatformW(HSPFILEQ handle, PSP_ALTPLATFORM_INFO platform, PCWSTR catalogfile) +{ + FIXME("(%p, %p, %s) stub!\n", handle, platform, debugstr_w(catalogfile)); + return FALSE; +} + + +/********************************************************************** * * SetupInitDefaultQueueCallback (SETUPAPI.@) */ PVOID WINAPI SetupInitDefaultQueueCallback( HWND owner ) @@ -1310,6 +1330,7 @@ UINT_PTR param1, UINT_PTR param2 ) { FILEPATHS_A *paths = (FILEPATHS_A *)param1; + struct default_callback_context *ctx = (struct default_callback_context *)context; switch(notification) { @@ -1332,7 +1353,9 @@ TRACE( "end delete %s\n", debugstr_a(paths->Target) ); return 0; case SPFILENOTIFY_DELETEERROR: - ERR( "delete error %d %s\n", paths->Win32Error, debugstr_a(paths->Target) ); + /*Windows Ignores attempts to delete files / folders which do not exist*/ + if ((paths->Win32Error != ERROR_FILE_NOT_FOUND) && (paths->Win32Error != ERROR_PATH_NOT_FOUND)) + SetupDeleteErrorA(ctx->owner, NULL, paths->Target, paths->Win32Error, 0); return FILEOP_SKIP; case SPFILENOTIFY_STARTRENAME: TRACE( "start rename %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); @@ -1341,8 +1364,7 @@ TRACE( "end rename %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); return 0; case SPFILENOTIFY_RENAMEERROR: - ERR( "rename error %d %s -> %s\n", paths->Win32Error, - debugstr_a(paths->Source), debugstr_a(paths->Target) ); + SetupRenameErrorA(ctx->owner, NULL, paths->Source, paths->Target, paths->Win32Error, 0); return FILEOP_SKIP; case SPFILENOTIFY_STARTCOPY: TRACE( "start copy %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); @@ -1372,6 +1394,7 @@ UINT_PTR param1, UINT_PTR param2 ) { FILEPATHS_W *paths = (FILEPATHS_W *)param1; + struct default_callback_context *ctx = (struct default_callback_context *)context; switch(notification) { @@ -1394,10 +1417,12 @@ TRACE( "end delete %s\n", debugstr_w(paths->Target) ); return 0; case SPFILENOTIFY_DELETEERROR: - ERR( "delete error %d %s\n", paths->Win32Error, debugstr_w(paths->Target) ); + /*Windows Ignores attempts to delete files / folders which do not exist*/ + if ((paths->Win32Error != ERROR_FILE_NOT_FOUND) && (paths->Win32Error != ERROR_PATH_NOT_FOUND)) + SetupDeleteErrorW(ctx->owner, NULL, paths->Target, paths->Win32Error, 0); return FILEOP_SKIP; case SPFILENOTIFY_STARTRENAME: - TRACE( "start rename %s -> %s\n", debugstr_w(paths->Source), debugstr_w(paths->Target) ); + SetupRenameErrorW(ctx->owner, NULL, paths->Source, paths->Target, paths->Win32Error, 0); return FILEOP_DOIT; case SPFILENOTIFY_ENDRENAME: TRACE( "end rename %s -> %s\n", debugstr_w(paths->Source), debugstr_w(paths->Target) ); @@ -1425,3 +1450,80 @@ } return 0; } + +/********************************************************************** * + * SetupDeleteErrorA (SETUPAPI.@) + */ + +UINT WINAPI SetupDeleteErrorA( HWND parent, PCSTR dialogTitle, PCSTR file, + UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to delete %s)\n", + w32error, debugstr_a(file) ); + return DPROMPT_SKIPFILE; +} + +/********************************************************************** * + * SetupDeleteErrorW (SETUPAPI.@) + */ + +UINT WINAPI SetupDeleteErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR file, + UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to delete %s)\n", + w32error, debugstr_w(file) ); + return DPROMPT_SKIPFILE; +} + +/********************************************************************** * + * SetupRenameErrorA (SETUPAPI.@) + */ + +UINT WINAPI SetupRenameErrorA( HWND parent, PCSTR dialogTitle, PCSTR source, + PCSTR target, UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to rename %s to %s)\n", + w32error, debugstr_a(source), debugstr_a(target)); + return DPROMPT_SKIPFILE; +} + +/********************************************************************** * + * SetupRenameErrorW (SETUPAPI.@) + */ + +UINT WINAPI SetupRenameErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR source, + PCWSTR target, UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to rename %s to %s)\n", + w32error, debugstr_w(source), debugstr_w(target)); + return DPROMPT_SKIPFILE; +} + + +/********************************************************************** * + * SetupCopyErrorA (SETUPAPI.@) + */ + +UINT WINAPI SetupCopyErrorA( HWND parent, PCSTR dialogTitle, PCSTR diskname, + PCSTR sourcepath, PCSTR sourcefile, PCSTR targetpath, + UINT w32error, DWORD style, PSTR pathbuffer, + DWORD buffersize, PDWORD requiredsize) +{ + FIXME( "stub: (Error Number %d when attempting to copy file %s from %s to %s)\n", + w32error, debugstr_a(sourcefile), debugstr_a(sourcepath) ,debugstr_a(targetpath)); + return DPROMPT_SKIPFILE; +} + +/********************************************************************** * + * SetupCopyErrorW (SETUPAPI.@) + */ + +UINT WINAPI SetupCopyErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR diskname, + PCWSTR sourcepath, PCWSTR sourcefile, PCWSTR targetpath, + UINT w32error, DWORD style, PWSTR pathbuffer, + DWORD buffersize, PDWORD requiredsize) +{ + FIXME( "stub: (Error Number %d when attempting to copy file %s from %s to %s)\n", + w32error, debugstr_w(sourcefile), debugstr_w(sourcepath) ,debugstr_w(targetpath)); + return DPROMPT_SKIPFILE; +} _____ Modified: trunk/reactos/lib/setupapi/setupapi.spec --- trunk/reactos/lib/setupapi/setupapi.spec 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/lib/setupapi/setupapi.spec 2005-08-01 07:46:06 UTC (rev 16931) @@ -248,11 +248,10 @@ @ stdcall SetupCloseFileQueue(ptr) @ stdcall SetupCloseInfFile(long) @ stub SetupCloseLog -@ stdcall SetupCommitFileQueue(long long ptr ptr) SetupCommitFileQueueW @ stdcall SetupCommitFileQueueA(long long ptr ptr) @ stdcall SetupCommitFileQueueW(long long ptr ptr) -@ stub SetupCopyErrorA -@ stub SetupCopyErrorW +@ stdcall SetupCopyErrorA(long str str str str str long long str long ptr) +@ stdcall SetupCopyErrorW(long wstr wstr wstr wstr wstr long long wstr long ptr) @ stdcall SetupCopyOEMInfA(str str long long ptr long ptr ptr) @ stdcall SetupCopyOEMInfW(wstr wstr long long ptr long ptr ptr) @ stdcall SetupCreateDiskSpaceListA(ptr long long) @@ -262,8 +261,8 @@ @ stub SetupDefaultQueueCallback @ stdcall SetupDefaultQueueCallbackA(ptr long long long) @ stdcall SetupDefaultQueueCallbackW(ptr long long long) -@ stub SetupDeleteErrorA -@ stub SetupDeleteErrorW +@ stdcall SetupDeleteErrorA(long str str long long) +@ stdcall SetupDeleteErrorW(long wstr wstr long long) @ stdcall SetupDestroyDiskSpaceList(long) @ stub SetupDiAskForOEMDisk @ stdcall SetupDiBuildClassInfoList(long ptr long ptr) @@ -494,8 +493,8 @@ @ stub SetupRemoveInstallSectionFromDiskSpaceListW @ stub SetupRemoveSectionFromDiskSpaceListA @ stub SetupRemoveSectionFromDiskSpaceListW -@ stub SetupRenameErrorA -@ stub SetupRenameErrorW +@ stdcall SetupRenameErrorA(long str str str long long) +@ stdcall SetupRenameErrorW(long wstr wstr wstr long long) @ stub SetupScanFileQueue @ stdcall SetupScanFileQueueA(long long long ptr ptr ptr) @ stdcall SetupScanFileQueueW(long long long ptr ptr ptr) @@ -503,8 +502,8 @@ @ stub SetupSetDirectoryIdExA @ stub SetupSetDirectoryIdExW @ stdcall SetupSetDirectoryIdW(long long wstr) -@ stub SetupFileQueueAlternatePlatformA -@ stub SetupFileQueueAlternatePlatformW +@ stdcall SetupSetFileQueueAlternatePlatformA(ptr ptr str) +@ stdcall SetupSetFileQueueAlternatePlatformW(ptr ptr wstr) @ stdcall SetupSetFileQueueFlags(long long long) @ stub SetupSetPlatformPathOverrideA @ stub SetupSetPlatformPathOverrideW _____ Modified: trunk/reactos/lib/setupapi/setupx_main.c --- trunk/reactos/lib/setupapi/setupx_main.c 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/lib/setupapi/setupx_main.c 2005-08-01 07:46:06 UTC (rev 16931) @@ -300,7 +300,7 @@ len = MAX_PATH; if ( (hKey) && (LDID_Data[n].RegValName) && (RegQueryValueExA(hKey, LDID_Data[n].RegValName, - NULL, &type, buffer, &len) == ERROR_SUCCESS) + NULL, &type, (LPBYTE)buffer, &len) == ERROR_SUCCESS) && (type == REG_SZ) ) { TRACE("found value '%s' for LDID %d\n", buffer, n); _____ Modified: trunk/reactos/lib/setupapi/virtcopy.c --- trunk/reactos/lib/setupapi/virtcopy.c 2005-08-01 00:06:18 UTC (rev 16930) +++ trunk/reactos/lib/setupapi/virtcopy.c 2005-08-01 07:46:06 UTC (rev 16931) @@ -218,7 +218,7 @@ static DWORD vn_num = 0; static DWORD vn_last = 0; -RETERR16 VCP_VirtnodeCreate(LPVCPFILESPEC vfsSrc, LPVCPFILESPEC vfsDst, WORD fl, LPARAM lParam, LPEXPANDVTBL lpExpandVtbl) +static RETERR16 VCP_VirtnodeCreate(LPVCPFILESPEC vfsSrc, LPVCPFILESPEC vfsDst, WORD fl, LPARAM lParam, LPEXPANDVTBL lpExpandVtbl) { HANDLE heap; LPVIRTNODE lpvn; @@ -266,7 +266,8 @@ return OK; } -BOOL VCP_VirtnodeDelete(LPVIRTNODE lpvnDel) +#if 0 +static BOOL VCP_VirtnodeDelete(LPVIRTNODE lpvnDel) { DWORD n; RETERR16 cbres; @@ -283,6 +284,7 @@ } return FALSE; } +#endif /*********************************************************************** * VcpOpen (SETUPX.200) @@ -452,7 +454,7 @@ return buffer; } -RETERR16 VCP_CheckPaths(void) +static RETERR16 VCP_CheckPaths(void) { DWORD n; LPVIRTNODE lpvn; @@ -470,7 +472,7 @@ return OK; } -RETERR16 VCP_CopyFiles(void) +static RETERR16 VCP_CopyFiles(void) { char fn_src[MAX_PATH], fn_dst[MAX_PATH]; RETERR16 res = OK, cbres; @@ -559,7 +561,8 @@ return OK; } -RETERR16 VCP_RenameFiles(void) +#if 0 +static RETERR16 VCP_RenameFiles(void) { char fn_src[MAX_PATH], fn_dst[MAX_PATH]; RETERR16 res = OK, cbres; @@ -582,6 +585,7 @@ cbres = VCP_Callback(&vcp_status, VCPM_VSTATRENAMEEND, 0, 0, VCP_MsgRef); return res; } +#endif /*********************************************************************** * vcpDefCallbackProc (SETUPX.202) @@ -616,7 +620,7 @@ return retval; } -BOOL VCP_UI_GetDialogTemplate(LPCVOID *template32) +static BOOL VCP_UI_GetDialogTemplate(LPCVOID *template32) { HRSRC hResInfo; HGLOBAL hDlgTmpl32; @@ -646,7 +650,7 @@ return 0; } -void VCP_UI_RegisterProgressClass(void) +static void VCP_UI_RegisterProgressClass(void) { static BOOL registered = FALSE; WNDCLASSA wndClass; @@ -667,7 +671,7 @@ RegisterClassA (&wndClass); } -RETERR16 VCP_UI_NodeCompare(LPVIRTNODE vn1, LPVIRTNODE vn2) +static RETERR16 VCP_UI_NodeCompare(LPVIRTNODE vn1, LPVIRTNODE vn2) { LPCSTR file1, file2; file1 = vsmGetStringRawName16(vn1->vfsSrc.vhstrFileName); @@ -675,7 +679,7 @@ return (RETERR16)strcmp(file1, file2); } -RETERR16 VCP_UI_CopyStart(void) +static RETERR16 VCP_UI_CopyStart(void) { LPCVOID template32; char buf[256]; /* plenty */ @@ -715,7 +719,7 @@ if (RegSetValueExA(hKeyConflict, "Dirty", 0, REG_BINARY, (LPBYTE)&dirty, 1)) return VCPN_FAIL; len = 12; - if (!(RegQueryValueExA(hKeyConflict, "BackupDirectory", NULL, 0, BackupDir, &len))) + if (!(RegQueryValueExA(hKeyConflict, "BackupDirectory", NULL, 0, (LPBYTE)BackupDir, &len))) strcpy(BackupDir, "VCM"); /* create C:\WINDOWS\[BackupDir] and set registry key to it */
19 years, 4 months
1
0
0
0
[hbirr] 16930: Used MmFreeVirtualMemory in MmDeleteTeb because MmFreeMemoryAreaByPtr doesn't free the region list entries.
by hbirr@svn.reactos.com
Used MmFreeVirtualMemory in MmDeleteTeb because MmFreeMemoryAreaByPtr doesn't free the region list entries. Modified: trunk/reactos/ntoskrnl/mm/process.c _____ Modified: trunk/reactos/ntoskrnl/mm/process.c --- trunk/reactos/ntoskrnl/mm/process.c 2005-07-31 23:48:42 UTC (rev 16929) +++ trunk/reactos/ntoskrnl/mm/process.c 2005-08-01 00:06:18 UTC (rev 16930) @@ -104,49 +104,23 @@ } VOID -MiFreePebPage(PVOID Context, - MEMORY_AREA* MemoryArea, - PVOID Address, - PFN_TYPE Page, - SWAPENTRY SwapEntry, - BOOLEAN Dirty) -{ - PEPROCESS Process = (PEPROCESS)Context; - - if (Page != 0) - { - SWAPENTRY SavedSwapEntry; - SavedSwapEntry = MmGetSavedSwapEntryPage(Page); - if (SavedSwapEntry != 0) - { - MmFreeSwapPage(SavedSwapEntry); - MmSetSavedSwapEntryPage(Page, 0); - } - MmDeleteRmap(Page, Process, Address); - MmReleasePageMemoryConsumer(MC_USER, Page); - } - else if (SwapEntry != 0) - { - MmFreeSwapPage(SwapEntry); - } -} - -VOID STDCALL MmDeleteTeb(PEPROCESS Process, PTEB Teb) { PMADDRESS_SPACE ProcessAddressSpace = &Process->AddressSpace; + PMEMORY_AREA MemoryArea; /* Lock the Address Space */ MmLockAddressSpace(ProcessAddressSpace); + + MemoryArea = MmLocateMemoryAreaByAddress(ProcessAddressSpace, (PVOID)Teb); + if (MemoryArea) + { + /* Delete the Teb */ + MmFreeVirtualMemory(Process, MemoryArea); + } - /* Delete the Stack */ - MmFreeMemoryAreaByPtr(ProcessAddressSpace, - Teb, - MiFreePebPage, - Process); - /* Unlock the Address Space */ MmUnlockAddressSpace(ProcessAddressSpace); }
19 years, 4 months
1
0
0
0
← Newer
1
...
64
65
66
67
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
Results per page:
10
25
50
100
200